Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 10/06/26 05:32
Purchase A8 full licence version
by jcl. 10/05/26 12:12
Respect History setting for Z systems
by AndrewAMD. 10/02/26 15:43
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
4 registered members (TipmyPip, 3run, Ayumi, VoroneTZ), 8,665 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
JimSimons, julienp, julienper, KelleyAbbey, Yopachi
19246 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