Geeks With Blogs
George Clingerman

Well, I've been battling movement in my PacMan level (Feeding Frenzy) for quite a while now. I had it to a fairly decent point with Bob, but then when I started working on the Jellyfish A.I. it just became apparent that the problem wasn't really gone.

So I think I'm finally going to have to do it. I've resisted this since I first started working on this level, but I think I'm finally going to have to stop treating it like objects placed on a table and more like objects placed in a grid. If I actually have a playing field grid with cells occupied by wall, pellets, ghosts and bobs things will just be a lot easier.

Much easier to determine if you're at a junction. Much easier to detect collisions with wall, must easier to do the pathfinding. Or at least that's my hope.

So anyway, that's where I'm at. Three levels that are complete, still working on the Feeding Frenzy level and the fifth level has just barely been started. I did however get some refactoring done, got some code cleaned up and was able to dramatically improve some load times. My Feeding Frenzy level used to take about 19 seconds to load and now it's just a second. I had to change the way I thought about DirectX sprites and textures. I now understand why many games combine multiple images into a single graphic file. I never quite understood that before, but it's all clear to me now.

Oh and before I forget here's a little lesson that I learned tonight. When you store your XPosition as a Single and your YPosition as a Single and your Height as a Single and your Width as a Single, do NOT do your collision detection with a Rectangle object created with your XPosition converted to an Integer, your YPosition converted to an Integer, your Height converted to an Integer and your Width converted to an Integer. Yeah, if you do it that way your collisions might just be a TAD incorrect. Got to remember to use RectangleF when you're not using Integers. Yep, gotta remember that.

Posted on Wednesday, June 14, 2006 7:16 PM GWB Game Design Challenge | Back to top

Comments on this post: 2 Steps Back and 1 Step Forward (...I hope)

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © George Clingerman | Powered by: