Realistic Jump?
Blitz3D Forums/Blitz3D Programming/Realistic Jump?
| ||
How can I make a jump code that looks as real as playstation2? Like I need my model to jump then animate, then show a landing animation. |
| ||
Well, you're looking for two concepts combined here. First off, the actual jump. This is pretty simple; if your program has gravity, then you just have to create a "Jump#" variable which acts almost like reverse gravity, and decreases over time while in the air. As far as animating you model, investigate the LoadAnimMesh(), LoadAnimSeq() and Animate() commands. there's a demo in the "mak" folder of the B3D samples which shows animation of meshes; check it out. And remember, of course, you have to create the actual animation in your 3D modeler. |
| ||
Well, I need to see a code in order to learn. doesnt matter how small it is. I know how to decrease. BUT I dont know how to use a timer to do this. |
| ||
Right, that's why I suggested looking at mak's animation demo; it's a complete working program, albeit small. It should give you enough to go on, if you combine it with the Blitz HelpDocs. As far as using a timer goes, what kind of timer are we talking here? A value timer? While Not KeyHit(1) ... Timer = Timer + 1 ... Wend A Millisecond timer? While Not KeyHit(1) ... If MilliSecs() => LastTick + Timer ... EndIf ... Wend Or a timer timer? Timer = CreateTimer(60) While Not KeyHit(1) ... WaitTimer Timer ... Wend |
| ||
To be honest, I don't recommend actually making the character jump in an animation sequence. If you doing it, have an animation sequence of the character lifting off, jumping up, falling, and hitting the ground. That way you have much more control over the jump. As for physics and gravity. I used a cos loop to generate the increasing speed. I'm not quite sure what a Playstation 2 jump is though. |
| ||
OH, wait wait wait, you mean a timer for your jumping! Oh, okay, well here's a jumping snippet from my current project, with comments & spacing added for ease of understanding: That's from memory, so it may need some tweaking, but it should work. It's also really simple math & coding, no complex geometry or anything. Hope it helps! |
| ||
ive never seen a playstation2 jump, ive seen a few 'fall' and get smashed to pieces on youtube though ;) remember that EA ps3 tech demo where they said the player could only have 8 directions of movement on a ps2 yet the power of the ps3 allowed them to have fluid 360 smoth spinning and animation aka utter hog wash as it was lazy animation/programming by EA that gave players 16bit console style movement |
| ||
Yeah, and that's ludicrous anyway, since I've seen many PS2 games, like the Sly Cooper series, where movement was most definitely not restricted to eight directions, even with a moving camera. Console power has nothing to do with program quality. :P |