Ducking?
by Chumpy · in TGB Platformer Kit · 05/13/2008 (1:19 pm) · 6 replies
The PSK product listing talks about recreating classic platforming games. How difficult would it be to incorporate ducking or other actions that change a character's collision polygon? I'm thinking of games like Super Mario Bros here.
About the author
#2
05/13/2008 (5:57 pm)
Mr. Ford hit the nail on the head. The PSK has various base "states" that the actor is in and update physical attributes of the actor according to the state. The main ones are onGround, onLadder, inAir and isDead (from memory). You could either add an isCrouching state and update physics accordingly, or have another element in the onGround physics updates.
#3
05/13/2008 (6:34 pm)
Sounds really handy, thanks! You might want to consider adding something about that to the feature list; it certainly seems like a selling point to me.
#4
05/13/2008 (7:06 pm)
Hey, would the different states also make it easy to set up hitboxes during certain states (ie slashing/punching)?
#5
the collision polygons would have to change with most frames of animation, and there might even have to be multiple collision polygons. one as the players 'attack box', which would determine where that player causes damage to other players. another would be a 'block box' which would determine where the player will receive less damage than normal if hit. finally, multiple 'hit boxes', so strikes to the head, torso, and legs will do different damages. all these boxes need to be animated with the sprites, and some boxes will appear and disappear for maybe a frame at a time.
i probably won't have time to figure all this out for TGB, so i'm just waiting for T2D and hoping it's easy there. anyone else who has ideas though?
11/10/2009 (8:01 pm)
i have a simular idea (hopefully features in Torque2D will make this easy) where i want to make a beat-em-up kind of game, and also a 1 on 1 fighting game.the collision polygons would have to change with most frames of animation, and there might even have to be multiple collision polygons. one as the players 'attack box', which would determine where that player causes damage to other players. another would be a 'block box' which would determine where the player will receive less damage than normal if hit. finally, multiple 'hit boxes', so strikes to the head, torso, and legs will do different damages. all these boxes need to be animated with the sprites, and some boxes will appear and disappear for maybe a frame at a time.
i probably won't have time to figure all this out for TGB, so i'm just waiting for T2D and hoping it's easy there. anyone else who has ideas though?
#6
%this.owner.setCollisionPolyCustom(7, "0.350 -0.350 0.500 0.00 0.350 0.350 0.000 0.500 -0.350 0.350 -0.500 0.000 -0.350 -0.350 0.000 -0.500");
You basically just go around from the first to the last poly location and enter that in.
11/23/2009 (4:37 pm)
I've done this before with TGB and it was pretty easy. You can change it on the fly with this example command.%this.owner.setCollisionPolyCustom(7, "0.350 -0.350 0.500 0.00 0.350 0.350 0.000 0.500 -0.350 0.350 -0.500 0.000 -0.350 -0.350 0.000 -0.500");
You basically just go around from the first to the last poly location and enter that in.
Associate James Ford
Sickhead Games