08-31-2025, 11:46 AM
(This post was last modified: 08-31-2025, 11:48 AM by Stuart McLachlan.)
(08-31-2025, 11:36 AM)Kurt Kuzba Wrote: You can improve the look of it by a higher resolution to your map. But then, you have the track space issue, where moving inside the map has to be limited to specific map spaces. So, for instance, where you have X for a wall and a space for an open area, you could also have another character to designate a motion track, within the open areas. This will reduce the code required to track the movement to the space, since it can only move to a track space. Testing for walls and the like becomes a non-problem.
I don't get the difference between a "space" and a "track space". You should be able to move to any adjacent space.
There are only four possible directions to move. The key value will tell you which of those directions the player is trying to move. On every attempted move, just test whether the adjacent cell in that direction is a block or a space. If it is a space, then move. If it is a block, then don't move.