Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Imhotep, opm), 785 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Tip of the Week #9: Gravity and Jumping? No Problem! #425263
06/30/13 21:11
06/30/13 21:11
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
A new Tip of the Week, learn how to create a robust gravity and jumping code (that works on low framerates, too)!



http://opserver.de/pwik7/index.php?title=Tip_of_the_Week

Last edited by Superku; 12/23/13 11:39.

"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Tip of the Week #9: Gravity and Jumping? No Problem! [Re: Superku] #425264
06/30/13 21:49
06/30/13 21:49
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Offline
Expert
alibaba  Offline
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
Wow! You are just awesome!!

This was one of the most annoying problems which occured during developement, but now it´s solved thanks to you laugh


Professional Edition
A8.47.1
--------------------
http://www.yueklet.de
Re: Tip of the Week #9: Gravity and Jumping? No Problem! [Re: alibaba] #425265
06/30/13 22:07
06/30/13 22:07
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Whenever I tried to create a player script I had huge problems with gravity and jumping grin
... so this is just perfect.

Thaks a lot laugh


POTATO-MAN saves the day! - Random
Re: Tip of the Week #9: Gravity and Jumping? No Problem! [Re: Kartoffel] #425273
07/01/13 11:42
07/01/13 11:42
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Thanks guys, I'm glad you find it useful!


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Tip of the Week #9: Gravity and Jumping? No Problem! [Re: Superku] #425326
07/02/13 20:15
07/02/13 20:15
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
using c_trace after c_move is a very good hint.

However I had huge problems getting a proper time corrected jump.
What I did in the end was introducind a jump timer. This timer increments to a certain value and during that time I apply a z-force (which has to be big enough to overcome gravity). Then I used vec_acclerate to get a speed out of my force vector and handed it over to c_move.

Not sure if this is the correct solution, but it seemed to eliminate all my framerate dependencies.

Re: Tip of the Week #9: Gravity and Jumping? No Problem! [Re: FBL] #428970
09/06/13 10:17
09/06/13 10:17
Joined: Jun 2010
Posts: 590
California
Ruben Offline
User
Ruben  Offline
User

Joined: Jun 2010
Posts: 590
California
Superku: When I click on either of your three links, I am forwarded to some website called "Compact Dictionary of the Infinite", at this link:

*any website*

I don't think this is the website you intended your links to be connected to, is it?

Last edited by rayp; 09/06/13 15:03. Reason: removed link
Re: Tip of the Week #9: Gravity and Jumping? No Problem! [Re: Ruben] #428996
09/06/13 14:38
09/06/13 14:38
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
it is now nwiki5 instead of mwiki4


Visit my site: www.masterq32.de
Re: Tip of the Week #9: Gravity and Jumping? No Problem! [Re: MasterQ32] #428998
09/06/13 14:50
09/06/13 14:50
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,107
Germany
@Ruben
Added a working link in SuperKu's first post above.


Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: Tip of the Week #9: Gravity and Jumping? No Problem! [Re: rayp] #434459
12/19/13 07:05
12/19/13 07:05
Joined: Jun 2013
Posts: 108
Alberta, Canada
C
CanadianDavid Offline
Member
CanadianDavid  Offline
Member
C

Joined: Jun 2013
Posts: 108
Alberta, Canada
Works nicely except do you know why the player can go through ceilings and off the map when walking up slopes or stairs? See the attached map and walk to the end of the map. It is possible to jump off the map as well as jump onto the platform. I presume it is due to manually adjusting the my.z, circumventing collision detection.

Attached Files
bug.zip (89 downloads)
Re: Tip of the Week #9: Gravity and Jumping? No Problem! [Re: CanadianDavid] #434464
12/19/13 07:52
12/19/13 07:52
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Thanks for noticing that, I've updated the code (wiki download link) and improved it in 1-2 other situations.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Page 1 of 2 1 2

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1