The all-purpose crate

Published March 17, 2008
Advertisement
I worked on the punching animation and added the generic item crate to the game:


This was also the first test of my simple physics objects, and it seems to have worked. As is shown in the screenshot, the crates can sit on the moving platform with almost no problem (curse that one pixel difference!). The player can punch the crates and send them flying a certain distance, on a path that follows projectile motion.

I added frames in between each punch in the animation, and already it looks alot better. However, now the input of the combo is screwed up, so I'll probably have to redo that code. Next I have to add the ability to pick up and throw things, such as the crate.
Previous Entry Brawl is really good
0 likes 10 comments

Comments

rip-off
Looks like great fun. Everyone knows its not a real game unless there are crates.
March 17, 2008 11:12 AM
Stompy9999
Quote:Original post by rip-off
Looks like great fun. Everyone knows its not a real game unless there are crates.


Very true. The only thing I'm missing now are explosive barrels[grin]
March 17, 2008 11:44 AM
Stompy9999
Quote:Original post by rip-off
Looks like great fun. Everyone knows its not a real game unless there are crates.


Very true. The only thing I'm missing now are explosive barrels[grin]
March 17, 2008 11:45 AM
Swattkidd
Video Video Video!!! :D
Code examples Code examples Code examples!!!:D <--not as catchy:P
March 17, 2008 01:25 PM
sanch3x
I thought your Blocky games were interesting before but I've become pretty excited about this one. There's something really appealing about your sprite, maybe it triggered nostalgia? I'm looking forward to the demo you slated for next week*.


(*yeah remember... we were at the bar... and like... you promised)
March 17, 2008 03:06 PM
Stompy9999
I can release a small demo next week. It won't be much, but it would be good to get feedback on the animation (which has been the part I've been having the most trouble with). I'll also put some code with the demo, for anyone who wants to take a look.
March 17, 2008 06:41 PM
OrangyTang
Looks neat [grin] I've been doing a platformer/beat-em-up over the last month so I'm following this with interest to see how it goes.

How are you handling the attack states and animations btw? I spent a lot of time messing around with state machines and various other approaches trying to get something which doesn't suck and controls nicely.
March 18, 2008 11:40 AM
Stompy9999
Quote:Original post by OrangyTang
Looks neat [grin] I've been doing a platformer/beat-em-up over the last month so I'm following this with interest to see how it goes.

How are you handling the attack states and animations btw? I spent a lot of time messing around with state machines and various other approaches trying to get something which doesn't suck and controls nicely.


I've actually had to rewrite the attack animation code twice now, but I now have something that seems to work. I'm using a state machine for animation, with one state for the attack combo. Once the combo is started, it only continues if a certain flag is on. That flag only turns on if the player presses the attack button again. If the flag is on, the player goes to the next frame in the animation, and the flag is turned off again.

I also had to add frames in between each punch to make the animation look better. All in all, I'm satisfied with the result, although now I have to make animation for throws, air attacks, and special moves(maybe a hadoken-type move).
March 19, 2008 01:21 AM
OrangyTang
Sounds similar to what I eventually settled down with. A state machine does seem to make the most sense but I'm having trouble keeping the movement responsive. However I'm starting to think that this is due to my artist's tendency to create long animation sequences without the opportunity to break out early if the player wants to do something else.
March 19, 2008 08:58 AM
Stompy9999
Quote:Original post by OrangyTang
Sounds similar to what I eventually settled down with. A state machine does seem to make the most sense but I'm having trouble keeping the movement responsive. However I'm starting to think that this is due to my artist's tendency to create long animation sequences without the opportunity to break out early if the player wants to do something else.


Initially once the player had pressed attack again, it would only respond at the end of the animation. To go into detail about that, I have a timer which measures when to go to the next frame, and the next attack animation only happened when that timer got to the end. So, I set it to have a minimum time at which, if the player had pressed attack again, the animation would go to the next frame without running the timer.

Ofcourse, it would be alot harder having long attack animations, as each attack animation in my game is only two frames long. However, I think the same concept might apply, depending on what the frames are.
March 19, 2008 09:36 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement