SamSuka
Drone Commander
Drone Commander

patreon


Let's learn a powerful gamedev technique

Sorry guys, might not be much visual demos today (I may share some older work though). 

This is because i'm working on the RTS part of drone commander today.


One of the things that is really hard with an RTS, or any kind of tactics game is "How do you manage all those unit's interactions?"

Imagine you had 50 units, the enemy had 50 units.

What happens if one of your unit touches another?
What happens if one of your units touches theirs?

What happens if one of their units touches their own?

Now do this again for bullets, buildings and so on. 


That means the computer would have to do a LOT of checking every second.


Rather than go through every single permutation, a simpler way is to get every unit, bullet and building to 'report their position'.

Hi, i'm attack drone alpha, i'm currently in quadrant 2B.

Now the computer simply checks all quadrants, is there another unit in 2B? Nope? Ok, no more checks for that unit needed. 


This is known as spacial partitioning


Split the map up into cells, and just check each cell, if there are more than one unit in that cell - then assume they are touching. 




Let's learn a powerful gamedev technique

Comments

Haha thanks buddy - always so happy to see your messages! Happy to say i've managed it already! I'm looking forward to showing you the RTS once i've finished a first campaign. My hope is the game will have this kind of feeling: 1. You chat to people 2. Plot adds tension, you are pulled into events. 3. You prepare for battle, manage your drone squadrons, buy upgrades, talk to people who can help you unlock more buffs. 4. Go into battle. 4.1. Battle will have pivotal moments (including some dialogue scenes) 4.2 finish battle. 5. Go back to the ship to talk to your crew, reflect on what happened. talk about the aftermath and philosophical aspects. 6. Play some minigames and do more research/management. Repeat

Mr Adam McMurchie

Not gonna lie, that sounds really complicated and I can't make heads or tails on how to begin interpreting what you need to do to make it work. Good luck though and know that you have all of our support to make it through.

Cneaus Fechine


More Creators