Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 20:05
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, AndrewAMD, TedMar), 1,306 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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 | 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