Moving into the city
Units can now move into the city. This is a precursor to taking a city in combat. For now they can just move into it.
I removed alpha/transparency from the tank icon so it looks better when its icon is over the city icon. In this case, I minified the tank icon so you can still see the city underneath.
Interesting corner case: if a unit is already in a city, the Godot ray cast randomly returns either the city or the unit. One approach is to raycast multiple in a loop, with exceptions. Great, except this breaks when the ray target is terrain. I get an error about unexpected node type.
After spending an hour trying to figure that out, I have given up for now. Instead I handle either case: if ray cast hits a unit, deny. If ray cast hits an occupied city, deny. If ray cast hits an unoccupied city, move.
Files
tankies
Iterating to get to an ancient Mac game called "Strategic Conquest"
Status | In development |
Author | greenflysau |
Genre | Strategy |
Tags | html5--playable-in-browser |
Languages | English |
More posts
- Boaty McBoatfaceJul 08, 2024
- stack-tasticJun 22, 2024
- Just fightersJun 16, 2024
- Tank FightersJun 13, 2024
- Tank MetropolisJun 03, 2024
- Tank SneakersMay 29, 2024
- Tank MarchMay 01, 2024
- Team RedApr 28, 2024
- New WorldMar 14, 2024
Leave a comment
Log in with itch.io to leave a comment.