Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (Dico, AndrewAMD, TipmyPip, NewbieZorro, Grant), 15,791 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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