High cpu usage

2007/7/10, Jesse P. :

Well, my game is a work in progress.

Hi,
I just hate installers, do you really need that ?

What about a zip-ped archive ?
I don’t think SDL-based games needs to copy files everywhere in the system
:-)–
SkunkGuru.

Jesse P. ha scritto:

Yes the game has an installer.
(and a perfectly working un-installer as well)

no doubt, but…

and a zipped game may be too
advanced for some users.

… but not for many other users, that prefers
check what happens on their computer :slight_smile:

I don’t think that prepare 2 file is too much work
:slight_smile:

and yes, I know InnoSetup, very good ;-)–
SkunkGuru.

Yeah I’ll post an announcement on here when it’s done. I mostly made it for
learning and for fun, but also to have a really cool, and free tetris game
to play.–
Adam Stevenson

Would be even better to reduce the time you delay with the time you
need for getting your ideal fps.

ie:

Uint32 timeNeeded = 1000 / IDEAL_FPS;
Uint32 timeTaken = 1000 / FPS;
SDL_Delay(timeTaken - TimeNeeded);

Stefan

2007/7/10, Adam Stevenson :> In your main loop add somthing like this

this_tick = SDL_GetTicks();
if ( this_tick < next_tick )
{
SDL_Delay(next_tick-this_tick);
}
next_tick = this_tick + (1000/FRAMES_PER_SEC);
SDL_Flip(gScreen);

Trish x

Alright yeah, thanks for the code.


Adam Stevenson


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Stefan Hendriks

http://www.fundynamic.nl