June 12th, 2011
The collision detection is complete; walls, ramps, jumping and falling. I’ve gotten the friction, gravity, and velocity-increment values tweaked to my liking. It flows about as smoothly as I can see it ever being. It’s time for the next step, which I’m not looking forward to at all.
1) Physics and Collision
2) Scrolling levels <--
3) Sprite Animation
4) Enemy Behavior
5) Weapons and items
6) Dialogues and unique event handlers
After all of that has been finished, I should be able to call the game engine complete, and start actually working on level design. I’ve been toying with the idea of making an actual level editor, like from Aquaria- something to make the actual creation of levels easier than opening up a text file and filling it out with 1’s and 0’s. Maybe I can make actual tiles to use? But that takes away from my original idea of having everything implemented with invisible blocks, and the actual back- and fore-grounds static non-tiled artwork. That’s still a long ways from now, though. Burn that bridge when I get there. For now I need to focus on scrolling. The easiest way to do it is to move the level around the guy when pressing the arrow keys, but that’s so completely backwards from what I have right now, it would require a complete redesign. I’m hoping that the way pygame handles screens can help me out.
I found a way to implement scrolling, but it forced me to go back and fix a really hacked-together piece of code that controlled the character’s movement. I then spent almost 3 hours trying to figure out why my ramps suddenly wouldn’t work before I realized that when you round() to 0 places in python, it still leaves a trailing .0 on the end, which was screwing around with my other calculations. I got all that fixed, and now I need to track down the reason that the character sometimes falls right through blocks if he has some sideways momentum. Not to mention that I need to finish up scrolling; it’s all manual now, controlled with WASD, but it needs to keep the screen centered on the character as he moves through the level. I don’t foresee many issues there, but this collision detection problem will likely take me a while. I’ve been sitting in front of my laptop coding for about 13 hours now, and luckily work is about to provide me with a mandated 6-hour break while I go stand watch. After that, I should probably consider getting some sleep before another 6 hours of watch. I’ve made pretty ridiculous progress just over the past two days, and I still have 6 months to go; I can afford to slow down.