Advertisement

game speed

Started by February 10, 2003 03:26 PM
5 comments, last by Heineken 22 years ago
hi, i''m creating my first 3d game in openGL it now only has a car (27 triangles) with some textures i save the object in a list and rotate it when i run it on a p4 1.8 gHz 1600x1200x32 it runs smooth, but on a pII 350 mHz 800x600x24 it runs a lot slower and stuff why is that? i used to play unreal on it and it looked awesome and smooth, and i think unreal is a lot more complex than my 27 triangles... ok, danny heineken
Maybe if you try to change the resolution or color depth. What kind of graphics hardware does the PII have?
Advertisement
you need time base movement rather than frame based
this will give smooth rotations on both comps
theres more on this at www.gametutorials.com
With my few tests, i found that time based movment actually hindered my FPS, maybe cause I did not tweak on it. But, you need to remember, that going from a 1.8ghz to a 350 is a big leap. Consider the hardware differences.

Dustin Davis
Owner / CEO
Programmers Unlimited
www.Programmers-Unlimited.com
Dustin DavisOwner / CEOProgrammers Unlimitedwww.Programmers-Unlimited.com
the fact your running in 24 bit colour suggests to me that software emulation is rearing it''s ugly head... try 16 bit and you may have more luck

| - Project-X - my mega project.. yup, still cracking along - | - adDeath - an ad blocker I made - | - email me - |
i''ll check out time based movement
thanks!
Advertisement
Time based movement:

OPTIMAL_FPS/YOUR_FPS * OPTIMAL_SPEED

ex.

You have a rotating cube moving 6 degrees every second. that is to say

at 60 FPS it will move .1 each frame, correct?

ok so

if your running at 60 fps
60/60 * .1 == 1 *.1 = .1
if your running at 20 fps
60/20 * .1 == 3 * .1 = .3
so your moving .3 per frame rather then .1, however in total your still running at 6 degress per second.

This all making sense? As i think i have somehwat figured out, most games have a optimum fps of 30 cause it runs pretty smoothly around there. Dont set your optimum at like 100, cause most computers will just have a very choppy image. 30 is what I use.

Now, there is much more complicated ways to do this, personally it works for me, therefore I use it. Obviously you have to add somthing to calculate your FPS, however i figure if you cant do that then you shouldn't be worrying about time based movements.

[EDIT] i would like to add. I remember seeing a demo a while ago that sombody posted (on the fourms not nehe site) that had you edit a file for the game speed (1-5). DONT DO THAT! that is the most un-friendly thing I have ever had to do. Making it constint would be better. I never pointed it cause....well i dunno why i didn't.

[edited by - DarkHunter on February 11, 2003 11:34:33 AM]

This topic is closed to new replies.

Advertisement