command and conquer movement
lukas.bao@o2.pl
Member Posts: 11
Hi guys,
Im planning on creating a realtime strategy game like command and conquer but im stuck with a certain problem...
I want to tap on a unit and then tap on a destination and the unit start walking to its destination, ok thats kinda easy.. but what if the way to the destination isn't straight and during the way, theres for example a tree or the unit has to find the easiest/ shortest way by itself?
do you have some advice for me?
thaaaaaaaanks
Im planning on creating a realtime strategy game like command and conquer but im stuck with a certain problem...
I want to tap on a unit and then tap on a destination and the unit start walking to its destination, ok thats kinda easy.. but what if the way to the destination isn't straight and during the way, theres for example a tree or the unit has to find the easiest/ shortest way by itself?
do you have some advice for me?
thaaaaaaaanks
Comments
Our C&C template might help.
http://www.deepblueapps.com/selection-box-template/
Also check out our free drag around template.
http://www.deepblueapps.com/drag-around/
Darren.
http://en.wikipedia.org/wiki/A*_search_algorithm
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Hero collides with barrier, barrier then spawns a set of way points around itself using the heroes X and Y in relation to find the quickest way around and onto the destination.
Darren.
www.rossmanbrosgames.com
It does't have the actor avoidance but you might be able to use this demo by @KevinCross which follows winding paths if you wanted to do the waypoints like @DeepBlueApps suggested.
http://forums.gamesalad.com/discussion/52494/spare-code-dump-it-here/p8
https://www.dropbox.com/s/uzul514osg7yzow/GameSalad-Follow-A-Winding-Path.zip
★ My Apps | Gamesalad Tutorials : Youtube Channel , Website. ★
@blueelefant: the top down shooter template i pretty much the same like the CandC template. It creates a linear path for the unit and doesnt let it find its own way through a barrier.
I decided to let the player create an individual path for the units every time he clicks on them, I think this would more fun for the player and guarantee the "strategic factor" for this game, just like in :
problem is if someone could guide me how to code this...
★ My Apps | Gamesalad Tutorials : Youtube Channel , Website. ★
★ My Apps | Gamesalad Tutorials : Youtube Channel , Website. ★
As you can see i fill the templates with step by step guides via notes but if you do get stuck we offer a free support service for paid templates.
Darren.