June 29th, 2011
Tragedy. I’m writing this from Windows Safe Mode. The other day, while reading through a pdf of Preacher and listening to some music, my computer froze (karma for procrastinating on that collision fix?), and I’ve not been able to get it to boot normally since. A CHKDISK freezes about a quarter of the way into it, defrag won’t make it past the initial analysis, and the bios memory checker says there’s no problem. A system restore didn’t fix anything, and the event logger had something about a faulty file structure at the time of the crash. I’m going to have to reformat and restore to factory conditions. Hopefully I can find someone with an external hard drive who will let me back up my documents, music, and programming stuff. I’ll just have to eat most of my games as losses; most of them were installed off of Steam back when I had an internet connection.
Also, I’ve decided on a rework of the physics engine, based more off of the enemy collisions. I think once it’s done that it will look more natural and be easier to work with. I just have to take care of the overall computer issue first.
Edit: No reformat necessary! I loaded up in safe mode, made a list of all the services that were “necessary,” disabled all but those, and then loaded windows normally. Using the windows console, I re-enabled the services one at a time until I found the offender, something called SuperFetch (used to improve access to memory locations). After disabling it (and a lot of other useless crap), all is back to normal. Now, time to get back to work.
1) Fix player collision detection
2) Finish coding in all the Japan enemy behaviors
3) Health and weapons
4) Code a top-down engine for the waking sequences
5) Work on modularizing the code so that japan-enemies have a file separate from other-world-enemies
6) Code all other enemy behaviors
June 26th, 2011
I’ve finished the first season of Farscape, and read through all of I Kill Giants, and now it’s time to get back to work. I’ve been putting it off, because what really needs to happen is a redesign of the physics engine. The way I’m handling player collisions needs to be more similar to the enemy collisions, but there’s lots of things that make it not-that-easy to translate over, and I’m really dreading it. We got a portable AC unit for the office, and while the overall temperature still sticks around 94, if you sit right in front of the AC, it’s almost comfortable.
June 22nd, 2011
The animation module is complete, and works perfectly. However, it ended up revealing some more issues with my collision detection, and three days later I’m still trying to figure out why the player sometimes can’t jump off of a ramp. I think I need to take a small break; I’ve been working on this thing for almost two weeks straight. Of course, the office I’m working out of is also about 94 degrees now (ranging from about 92 in the morning to 98 in the afternoon), and that makes it awfully hard to concentrate. The other day, my supervisor walked in after I’d fallen asleep in my chair and thought I’d passed out from heat stroke. “Pawlowski, I thought you’d just sweated yourself to death!” Unfortunately, I don’t see the physical conditions getting better until after we leave the middle east, which will be months down the road; I might have to try and find somewhere else to work. On the upside, I got my stitches out yesterday, and my head wound is healing up rather nicely.
June 17th, 2011
I’ve completed a fairly decent amount of the game engine at this point, despite numerous setbacks. I spent almost an entire day trying to come up with a way to rotate a rectangular bitmap around a point without it taking a couple years to render before I realized that the game library I’m using has a function that does just that. Many times I had something working fine, and then something else I’d implement would require me to go back and completely redo the original piece of code. Not to mention the physical setback when I managed to hurt myself pretty badly on a stairwell; I ended up with a pretty decent head injury that required some stitches, painkillers, and most of a day of bedrest. As for coding, this is what I have so far:
Auto-scrolling, WASD movement in addition to arrow keys, an enemy interpreter that works with melee and ranged enemies with unique behaviors, a projectile interpreter that works with both player-originated and enemy-originated projectiles, a completely finished collision detection including ramps (also applicable to enemy movement). I also spent some time compartmentalizing a lot of my code into functions and subroutines that are a lot easier to modify than what I had before. I know the next-most-efficient thing would be to create classes for some of the objects I’m simply using arrays for right now, but I’m not as comfortable creating classes in Python as I was in C++. Besides, my arrays work pretty well; the only real advantage would be readability for anyone who would be modifying my code after me. And since I don’t intend to let anyone else take a crack at it, readability isn’t a concern of mine.
The only ongoing bug is the fact that projectiles actually display their sprite twice per frame, which will get fixed as soon as I implement sprite animation, which unfortunately needs to happen next. I know I had weapons next on the list, but the longer I put off animations, the more convoluted and bastardized my coding is going to become. It’s already going to require a bit of a redesign to get things working the way I want them to in the first place; I can’t afford to have too much more to change. I just need to suck it up and make it happen; I already have a good idea of some methods to try out.
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.
June 10th, 2011
I finally managed to download the correct version of the compiler that I needed and get it installed. There were a few incompatibilities, but nothing that I couldn’t work around. I’ve started out trying to translate the platformer I wrote using the built-in Microsoft Visual Basic engine in Microsoft Access on the ship’s LAN. I’ve run into a couple snags, though I suspect that they’re more based on my lack of understanding regarding Python than any sort of software issues. Progress is being made, albeit remarkably slowly.