I wonder if someone can help me with the example below.
I want to make the player move by itself for the dotted line using an array with the coordinates.
In order for the player to start moving, the user has to click a button or press a key in the keyboard.
Thanks in advance,
<img src="http://i580.photobucket.com/albums/ss249/jennifershea/td-game.jpg" border="0" />
Perhaps one of these links will be helpful:
Develop games in your browser. Powerful, performant & highly capable.
Awesome examples but I'm looking for something more simple and that needs less coding. That's why I was thinking about using arrays.
My goal is to create a tower defense game where the enemies would follow a path to the base.
If you're looking for something really simple you could just create a basic waypoint system with sprites:
Very good example. I think this one will work.
My only concern is that how will this work for a great number of objects moving at the same time.
It'll be fine with a few more events. You'll probably need to loop through the enemies with a "For each" loop to check them individually.
Here's another example I did a while back with a few more enemies: