Figuring out y-axis bounds


Current challenge:

I'm trying to understand the movement constraints. The original tutorial game code  enforces a limit on x axis: you can not move a unit past the right limit of the board. However it does not do so for the y axis: you CAN move a unit past the bottom limit of the board. I hacked it to enforce a y axis boundary: https://github.com/greenmoss/tankies/blob/main/GameBoard/Cursor/Cursor.gd#L49-L50 However I would like to figure out the underlying cause and do this "correctly".

Note you can move units down to the bottom right. The unit movement preview box correctly stops on the right, but NOT on the bottom. I'm guessing this is related.

Files

tankies-html5.zip Play in browser
Version 3 Nov 28, 2023

Leave a comment

Log in with itch.io to leave a comment.