Sign in to follow this  
  • entries
    686
  • comments
    1952
  • views
    386310

The all-purpose crate

Sign in to follow this  

221 views

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.
Sign in to follow this  


10 Comments


Recommended Comments

Looks like great fun. Everyone knows its not a real game unless there are crates.

Share this comment


Link to comment
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]

Share this comment


Link to comment
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]

Share this comment


Link to comment
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)

Share this comment


Link to comment
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.

Share this comment


Link to comment
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.

Share this comment


Link to comment
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).

Share this comment


Link to comment
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.

Share this comment


Link to comment
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.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now