Brief update

Published April 06, 2005
Advertisement
I am busy with my Masters coursework this week, so have had little time for game code. However I did implement the basic pixel-based movement, which for now seems to work perfectly. The changes involved:

- Calling the movement update more often
- Calculating a direction vector from the current position to the middle of the next destination tile
- Making that vector's magnitude equal to the character's speed
- Moving the character's position according to that vector
- Checking if the character is near enough to the next node, and if so, moving the path iterator to the next node.

I can see several potential issues arising from this method. The first step will need to be tweaked to get a good update rate: I hear 30Hz mentioned quite often. I also need to look into how that interacts with the graphics, which presumably requires an interpolation/extrapolation layer for the smoothest animation. The second step is also a bit dubious since there are times when I may not be in the middle of a tile, but I hope testing will show how much of a problem that is likely to be. And the last step is a bit of a hack since I have no rigorous guarantee that the character will ever end up close enough to a given node. Currently there is nothing stopping them from arriving there but in the future I can see this breaking. Still, I will cross that bridge when I come to it.

So, I have 5 characters wandering across the map simultaneously. It's virtually an RTS already. ;) Next up is probably a better map and maybe some rudimentary editing facilities.
Previous Entry Day 4
Next Entry Amusement
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

Advertisement