Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Figured out Effective Jumping, but its not very realistic

Author
Message
Uriel The Ignoble
21
Years of Service
User Offline
Joined: 13th Jun 2003
Location: In a tiny box in the attic
Posted: 15th Jun 2003 08:49
After a few hours of pulling my hair out, i figured out how to get a working jump code..
incase anyone else wants it.. it seems so simple now that i figured it out! Get ground height(1,X#,Z#) then Y# = Y#
Position Camera X#,Y#+35,Z#
to keep on the ground plane, without being tied to it.

anyway, its kind of generic feeling. Is there a way to incrementally decrease an integer over a set amount of time.. like after 1 second decrease 10 by one, and next second by one again? Im hoping its not one of those complex math thingies because i havent taken math for 4 years! i hate it! I want to make the jump speed decrease as the height of the jump decreases, to simulate the loss of momentum, and then increase the speed as the player begins to fall. Its a suttle detail, but details matter
haggisman
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 15th Jun 2003 16:30
Heres some old code that might help



project: light/obscurance mapper (80% done)
Uriel The Ignoble
21
Years of Service
User Offline
Joined: 13th Jun 2003
Location: In a tiny box in the attic
Posted: 16th Jun 2003 00:36
hey thanks! this is a really smart code..
if you plug movement variables into your equation you can have real physics! neato!

does your step# thing (60/fps) calculate time? because i've been trying to figure out something that calculates the time, i thought "wait" did it, but i think that is suppose to pause the game, and it never works when i try to use it anyway

what is the point of this?
if jmp=1 then inc time#, (1.0*step#)
why dont u just use step# in your equation? because if your taking step#*1 thats the same as just step# by itself
im not trying to be a smartass or a know it all, im trying to learn.

Uriel The Ignoble
21
Years of Service
User Offline
Joined: 13th Jun 2003
Location: In a tiny box in the attic
Posted: 16th Jun 2003 00:39
i should have mentioned the point of needing to know the time..
i want to make variables that increase an x number every y seconds
so i can make the player only able to jump once every second, or able to attack with a weapon once every 5 seconds.. stuff like that..

Uriel The Ignoble
21
Years of Service
User Offline
Joined: 13th Jun 2003
Location: In a tiny box in the attic
Posted: 16th Jun 2003 08:15
hmm nevermind about that numberical question i asked, i figured it out.. i justed used the INC command.. unless someone knows a better way. I found a problem with haggisman's jump code tho.. but i made an easy fix to it
i'll post the code i have so far if it helps anyone
All i have is a cube on a randomized matrix that can move pretty realstically and jump fairly realistically too.

Login to post a reply

Server time is: 2024-11-10 11:36:55
Your offset time is: 2024-11-10 11:36:55