Woohoo! Above you will find the first fruits of my attempts at videogaming. Alright, it's modest. And the graphics are pretty rushed. And there isn't really an objective. In fact, it's really just a platformer physics engine, and even then the controls are kinda sluggish. But here's the cool part! You can click those little arrows in the upper-right corner to change the physics constants: gravity, land speed, jump speed, and the coefficients of friction in the air and on land. Just use the arrow keys to move the little dumpy thumb-guy. It's pretty self-explanatory.
AWESOME FEATURES!
- The height of your jump depends on the duration you hold down the "up" button. Whoah, cool!
- Real simulated physics includes a vague semblance of momentum! Ga-roovy!
- Crouching increases your friction with the ground, sacrificing speed but increasing control. Duuuuuude!
Some technical notes of varying nerdliness:
- Sorry about the arrow button controls. It would obviously be easier to just have a text entry field for each variable, but for some reason I didn't realize this until I had written an entire Class for the arrow buttons with a bunch of neat little bells and whistles, and now I'm too attached to it. I guess I can go back and change it if it's that bad... also, if you think one of the variables increments too much or too little with each click, message me and I'll fix the code.
- Just to clarify, the friction values are coefficients for the character's speed, so lower number = more friction. The other values work the opposite. Bigger number = more gravity, etc.
- Okay, this one's really nerdy: ActionScript is weird. For some reason, when I fed a global Number variable of the game's main class to an instance of the Up/Down Button class, it copied the variable's value and left the original unchanged. Okay, normal. But when I did the same with a TextField variable, it actually went and updated the original. So yeah, I'm not really sure how pointers work in this language. There is still much to learn.
nathan
No comments:
Post a Comment