Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 02/23/26 21:52
WFO Training with parallel cores Zorro64
by Martin_HH. 02/23/26 15:29
Camera always moves upwards?
by clonman. 02/21/26 09:29
Zorro version 3.0 prerelease!
by TipmyPip. 02/20/26 13:22
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, AndrewAMD, Quad), 5,623 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Time, how much is too much #5845
07/19/01 15:40
07/19/01 15:40

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



I have a question about the command TIME.
I know you use TIME to adjust your code to make the game run relatively the same speed on different machines BUT!, when exaclty should you use it?

This comes about from me working on 2 diffent PC's, 1 has an INTEL815 inegrated video chip set & runs much slower then my Gforce2mx machine.

I'm still doing my car code & I've been using TIME liberally through the code but I think it may be causing problems.

Look at this pseudo code:
//----------------------------------
Accel = Keyforce.X * 0.75;
Drag = Speed * TIME * 0.005;
Speed = Speed + TIME * (Accel - Drag);

Temp.x = Speed * TIME * 0.5;
Temp.y = 0;
Temp.z = 0;

Distance = ent_mov(Temp,nullvector);
//----------------------------------
Is it ok to use TIME in 3 places or should I only use it in the line;
Temp.x = Speed * TIME * 0.5;

I'm also using TIME multiple times throughout my steering & gravity code.

Should it only be used ONCE within every movement you want. I ask this as things end using TIME multiplied by itself 3 times thoughout the codes cycle.

Now I ask this because the when I change the resolution on the Intel815 machine the speed of the car changes, it has readouts of speeds & gravity & such, & they change depending on the resolution I run in.

Any ideas appreciated...


Re: Time, how much is too much #5846
07/19/01 15:50
07/19/01 15:50

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



I am currently having some problems with TIME also, read this forum: Swaying Code Problem.... I still am working on the problem but the forum is still going and i have no idea what i am doing.
-matt

Re: Time, how much is too much #5847
07/19/01 23:43
07/19/01 23:43
Joined: Jul 2000
Posts: 1,570
Windsor, CT 06095
W
WildCat Offline
Expert
WildCat  Offline
Expert
W

Joined: Jul 2000
Posts: 1,570
Windsor, CT 06095
shovel,

I have not yet done exhaustive testing across multiple platforms, but I always make a point of doing all my calculations first with the regular numbers and formulas.

Then, just before the move, rotate, or whatever statement, I vec_scale my vector by time and then apply it. This has worked great for me so far.

-WildCat



Visit us at [url=http://www.vertexgames.com]Vertex Games[/url]!
Re: Time, how much is too much #5848
07/20/01 14:26
07/20/01 14:26

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Thanks Wildcat, your info is good for movement vectors but there are times when you are doing calculations that don't use vectors.
I might have to revisit my code and see if the outcome I want can be served by using the vector method you describe.

I think you are on the correct track in that you only apply the TIME once per movement.

Anymore than this seems to cause problems.


Re: Time, how much is too much #5849
07/21/01 01:21
07/21/01 01:21

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



I am no time correction expert (actually, I am having my problems with it), but if you don't use vector, I think you could do it just and only before every wait(1) instruction. I think this could work because the problem is all in the duration of the frame cicle.


Moderated by  HeelX, Spirit 

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