PROJECT UPDATE - COSMONAZIS

I didn’t get to all the things I wanted to do this week, but I did get to most of my week’s goals.
I made it so pressing UP while jumping won’t fire the weapon up (there isn’t an animation, and honestly, there’s no good scenario to use that mechanic), the player animation would also revert to an “idle” pose if you held UP while jumping, landed, and tried to fire up - even though the bullet would go straight up - so I corrected that.
The problem I was having with that stuff is when you’re making the player controls you really have to think of it like a flow-chart, and I tend to think totally linearly. In fact, I’ve learned from this (my first) project that when designing games, you really need to think “50 moves ahead” in the sense that you don’t just jump in and start coding willy-nilly, but you have to consider how different objects interact with each other, how to code them efficiently, and how to organize them so that things are grouped right, objects extend the right classes, and when you’ve got a decent project going, you can look at the code and make sense of it.
I also added an “Area Cleared” screen at the end of the level that awards you bonus points based on your performance. After doing it, and adding extra code for different areas, I feel like I should have made universal rules. So instead of this behavior:
if (Registry._area == 2 && Registry._timer <= 50) _timerBonus = 500
-which ends up being a mess of code once I enter in all of the areas and conditions, I could have used something more like:
if (Registry._timer <= Registry._goalTime * 0.5) _timerBonus = 500
So adding a public static var _goalTime in the Registry (just where I’m putting Global variables - see this excellent post by Photonstorm),and then just setting it in the different Area classes, I could have cut the code in the Area Cleared screen by almost three quarters. I might go back and change it, but the point is, lesson learned.
In lieu of working on enemy behaviors, I put the entire project up on GitHub. Feel free to poke around - and if you’re an Actionscript guru - feel free to berate me and give me tips in my Ask Box!
Things to do for next week’s update:
- ENEMY BEHAVIOR!!!
- Fix those grammatical errors!
- Finalize Area 4’s art, start working on Area 1’s art.
- Start designing Area 4 in DAME.
Play CosmoNazis 0.2b on MEGAswf!
PS - Sorry there wasn’t a Hero of the Week this week - I was up noodling around in Northern VA and Bethesda, MD attending the Small Press Expo and hanging with friend, ally and collaborator Mark! So the Hero of the Week is…me! HOH HOH HOH!