Gamestudio Links
Zorro Links
Newest Posts
Performance report in trade mode
by jcl. 01/18/20 09:25
oldschool fps project
by 3run. 01/14/20 19:15
Question about Clipping
by Dooley. 01/13/20 04:16
Simple backtest for SPX intra weeklies
by interzonez. 01/13/20 03:42
Trojan Agent
by jcl. 01/12/20 08:36
Multiplayer c-script example
by Truth. 01/10/20 19:45
Virtual hedging @OANDA
by jcl. 01/10/20 12:53
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
2 registered members (AndrewAMD, Iglarion), 688 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Leohermoso, matchristrading, pablomfz, tenrally, TradeOperator
18357 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,848
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,848
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,091
NRW/Germany
alibaba Offline
Expert
alibaba  Offline
Expert

Joined: May 2008
Posts: 2,091
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,848
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,848
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,856
F
Firoball Offline
Senior Expert
Firoball  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,856
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: Firoball] #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: 1,978
Germany
rayp Offline

X
rayp  Offline

X

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


My entry...your exits
Zombies dont like pink glow slime, fact!
"We gonna rock down to electric avenue" "One way ... or anotha ..."
"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
-=GOOGLE IS SKYNET=-
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 (32 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,848
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,848
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