Minor game

posted in dwn
Published January 14, 2009
Advertisement
Added #define statements around some code blocks to make them optional to compile, and now adding a method to blit the background image fullscreen, 256-color paletted, and stretched. The best part is, I can use the 1MB (inverse) z-buffer to store the background image, since this is a nonocclusional game, and reuse it during 3D segments! That gives 2048x2048 as the ideal resolution for the stretched background image - that's just the right background size for good gameplay, I'd guess! (If you like specialized functions, then this is a good example of why it is best to write your methods as you use them.)

There really is not much at all to the physics of this minigame, but still I am reading up a little to refresh on the Verlet method.

Coding game physics in general can be an all-consumptive process, so these days I'm preferring to keep my eyes on task, and to follow the game design plan. I remember assembling before me the Chris Hecker articles on rigid-body mechanics - spending so many hours figuring out what it all meant, drawing out huge matrices, putting together a general rigid-body physics simulation, setting up input files, editing LinPack, and cleaning up compile issues. At the end of the process came the realization that, try as I might, there is really no good use I could come up with for ragdoll physics in a game. This was at the same time that a certain physics engine claimed to have secret, novel, and more-stable algorithms for doing all these things in 3D. Around that time, I was deciding to eschew floats completely from my code anyway. Ever since it's been only simple wham-bam physics and completely active character control for me. If there's an inexpensive or freely available integer-based dynamics library that works well with my primitives, I will probably use it and like it, but for now I'll stay away from all general-purpose high-precision engines until given a reason to do differently. Server-side physics might enter the creative domain eventually, but hopefully not.

I should now have a solid block of two protected hours per night to work on development projects, without stealing from the sandman. I'm happy about that.
Previous Entry Minor game
Next Entry About gaming
0 likes 2 comments

Comments

Jotaf
How about using Box2D? (It's for a 2D game right?)
January 19, 2009 08:57 PM
DWN
Hey, Jotaf

That is a nice lib! Thanks kindly for the info pointer. Hadn't seen Box2D, although I'd seen it referenced before. The style looks pretty clean, and I'm reading that it has been ported to integer-based methods (http://www.box2d.org/forum/viewtopic.php?f=4&t=175). I might like to put a wrapper around it, or to use it for inspiration in writing a simple physics class one of these days.

For this project, it might be overkill and might not be as efficient as simply writing my own functions. I'm noticing also that it includes glut, although I'm guessing it is separable from that library. I don't know how good the integer support is yet, also.
January 20, 2009 11:31 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

Advertisement