June 11, 2011
Keep taking days “off” when I shouldn’t. Getting down to the wire. Especially when I consider I’ve only got two more weeks in whole, I need to do my independent study and to top it all off I’ll probably be sans-internet for a good while when I get to NYC since my roommate and I haven’t set up the network yet (since he’s rarely there and wants to wait till I’m there). Getting nervous.
So I’ve set about formalizing my messy code into something more organized and modular. Made the mass bodies into a separate class Planetoid which took a stupid amount of time to figure out as it was the first Objective C class I tried to write from scratch. Failing that completely (well my instances couldn’t find their methods) I had to copy a basic, and I mean BASIC, example class from a “Learn Cocoa” webpage and paste in my info. I’m guessing I was missing some semicolon or some other minutiae the debugger didn’t pick up on. Aw the joys of a new language!
Anyways, everything’s back up and working though I still haven’t gotten seen removal to work cleanly but I built it into the dealloc method for planetoids so should work nicely. Also there seems to be a bug with my path tracking (the dots behind bullets) but I did hack that together pretty quick. Seems that the array of X and Y coordinates isn’t getting passed down to the draw method properly after a few shots…though their global variables so I don’t know. My hacky method was to simply store two C arrays (since Objective C arrays are so complex to use for me still) for the last 40 X and Y points logged from the last bullet fired (every 0.01 seconds). Every time a bullets fired, the drawing index is reset.
Hopefully I’ll have all this stuff done ASAP since I need to get to level generation, assets and then animations/sound really quickly. Hoping to have at least a week of extra time (while working on extra credit) to debug and game test. Don’t know if I’ll have time this month but in the future, I could definitely see myself smoothing out the gameplay experience with more animations, score and more. For now I’m trying to keep my goals as realistic as possible while still delivering a fun game experience. Wish me luck!