Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 02/27/26 22:06
WFO Training with parallel cores Zorro64
by Martin_HH. 02/26/26 16:03
Zorro version 3.0 prerelease!
by TipmyPip. 02/25/26 16:38
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (TipmyPip, alibaba, 1 invisible), 5,511 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
the1, alx, ApprenticeInMuc, PatrickH90, USER0328
19200 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
jump code #240846
12/12/08 21:24
12/12/08 21:24
Joined: Jul 2008
Posts: 27
Italy, Sicilia, Palermo
Azrael85 Offline OP
Newbie
Azrael85  Offline OP
Newbie

Joined: Jul 2008
Posts: 27
Italy, Sicilia, Palermo
hi! i'm trying to optimize the jump code i'm using as base the kingdom heart movement in lite c i've got some problem first on switching fullscreen and windowed mode cause in windowed thechar make a tiny jump in fs char make a good height jump
the code from khmovements was this:
Code:
if ((key_space) && spacebar_clear)
		{
			spacebar_clear = 0;
			
			if (distance_to_ground < 3)
			{
				move_to_vector.z = 9.4;
			}
		}		
		if (!key_space) spacebar_clear = 1;

then cause in a movement generally i see other put the time_step val to obtain correct ratio fps/time adaptation
and i've tried this
Code:
if ((key_space) && spacebar_clear)
		{
			spacebar_clear = 0;
			
			if (distance_to_ground < 3)
			{
				move_to_vector.z = 9.4*time_step;
			}
		}		
		if (!key_space) spacebar_clear = 1;

now in both full and windowed mode the char made the same jump
and i was half happy because every jump the char does has not the same intensity, does someone know how to solve this?thanks:D

Re: jump code [Re: Azrael85] #241246
12/15/08 01:40
12/15/08 01:40
Joined: Oct 2008
Posts: 218
Nashua NH
heinekenbottle Offline
Member
heinekenbottle  Offline
Member

Joined: Oct 2008
Posts: 218
Nashua NH
Time_step (for me) averages about .4-.5. So you'll need to play with 9.4, try making it bigger?


I was once Anonymous_Alcoholic.

Code Breakpoint;

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | 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