Now that's an RTS

This week was about adding the ability for a player to create buildings on top of the already expansive area selection done last week. The practicality behind it was to have two objects that look identical (apart from a slight cosmetic change) but behaved quite differently.

The placement object was to act as a visual aid for the player so they know what they are placing down, if the location is a valid placement and an indication if they can afford the building (that's an added feature).
What the placement object looks like (top) compared to the actual object once the building is placed (bottom).

While choosing the location of the building is decided by the current location of the mouse. If I were to expand on this game and make it more complicated and polished, I would look into using a better method for the mouse as I'd imagine like other RTS' and possibly MMOs, mouse usage is incredibly high along with hotkeys. One method could include the use of pre-allocated hotspots for buildings around a player's base of operations to save them time. Going about such a method would require proper thought for the location of the hotspots let alone the implementation of it. But it ends up being in the hands of players if they choose to adopt it or forgo it.

A good example of this is probably Halo Wars, where bases can only be constructed in set locations and buildings surround the base in pre-defined locations.
Image from a Windows Central article detailing the announcement of Halo Wars 2 at E3 2016.



Or possibly a method like StarCraft where you would move a unit around and (in the case of playing as the Zerg) one of your units literally becomes the building.
It all comes down to implementation of the feature and how the players would respond to it.

Depending on the application/implementation of both methods, one would be superior to the other. For example, a RTS on mobile. A placement method like the we implemented in this week's brief wouldn't work very well since it'll be based on where the player touches the screen so it'll just teleport on every touch which effectively removes any fine tuning the player can do. Compare that to Halo Wars' method, it's practically perfect. An implementation where the player can simply choose which building to place in that location. In the end, it all comes down to practicality and the situation at hand.
So while the initial mouse-movement method works perfectly fine, it's all about refinement and the experience the player has. In future projects, I'll employ a method similar to Halo Wars. I'll call it the... All in-one method, perfect!


Another feature we added to the RTS was when a building would finish it's construction animation, it would execute a function. Something that I never knew the animation system had available, it simplifies the process of enabling/activating a building after the animation had finished. No more running your own timer for the exact length of the animation, very helpful addition that I hope will use every time an animation is played in my future projects.


References
StarCraft II. (2010). StarCraft II. Retrieved 16 August 2016, from http://us.battle.net/sc2/en/
Official Halo Wars Community Site. (2009). Halowars.com. Retrieved 16 August 2016, from http://www.halowars.com/

Tom Lynn

Read more posts by this author.

Australia http://rubbix.net