However, there needs to be a way to indicate who's being attacked. This way, soldiers won't physically overlap even if their sprites do (because one's in the foreground), and they can recognize when an enemy is near. Also when reaching a grid point, consider attacking if there's an adjacent point occupied by an enemy. On success, mark it occupied, mark their current point unoccupied, and start moving. When a soldier's AI runs, if it has reached a grid point, look for an adjacent point that's not marked as occupied. Let there be a grid defined in code, where soldiers move smoothly (Lerp) between points and each point can hold one soldier. My thinking so far is, use a 3D camera to get scaling of sprites foreground->background. What do you think about a good way of setting that up? They ran left and right, attacking anyone they encountered, but there were also around 10 rows of sprites reaching into the background, and soldiers could run along the foreground-background axis. There was a 2D battlefield where armies of maybe 100 guys on a side fought. I'm thinking about imitating the basic battle mechanics of the old Sega game "Dragon Force", seen below.
0 Comments
Leave a Reply. |