h1

Awww… his first steps

July 17, 2010

I wrote a little Actor class which is going to handle character movement and animation, and hooked it up to my user interaction and pathfinding so I can now move a little white block (my actor) around by clicking in various places on the screen. My code takes the clicked position and finds the closest possible position the actor can get to that location and then the actor begins to move there. I am also able to interrupt the actor’s current path and send him somewhere else which is pretty neat.

Here’s a little video (the first one on this blog. YAY!) of my actor finding his way from the front door to the door behind the desk. It’s the same path (roughly) that you’ve seen in the last post, but I’ve taken all the debug graphics out so that it looks a bit more like a game. I don’t have any depth sorting implemented, so the actor is not going to go behind the desk visually, but you can see how he steers around the desk. (the fraps.com watermark at the top is because I’m too broke to fork out and buy the app that I’m using to capture this video). Enjoy!

Leave a comment