dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
575
share rss forum feed


stateq2
control the code
Premium
join:2003-03-27
Jackson, MS

[SDL programming] setting framerate?

downloadSinbo01.tar.gz 20,017 bytes
i've recently been trying to code w/ SDL, and just started working on my first game. i can't figure out how to get a low framerate. it's a simple break out clone (no where near done), and the ball bounces at warp speed. it runs at 138 fps, but i think i need to get it down to 30.....not sure though. if anyone has experience w/ SDL development, i would appreciate it if you would please have a look at the code, and compile. the README file has all the directions. thanks alot
--
Dean


alien9999999
Your Head Looks Nice
Premium
join:2002-05-21
B-3000
that's quite easy:
you make a multithreaded application; and then do a nanosleep in the visual thread; depending on the time it took and the fps you want to get...

I've never programmed with SDL before, in fact, I refuse to use SDL, and we develop using X and GL only...

if you are interested in developping a 3D engine; take a look at »oriongame.sourceforge.net/ . at this moment we are in the process of making it multithreaded, so the CVS is not functional at this point; but the release works...
--
Alien is my name and headbiting is my game.


stateq2
control the code
Premium
join:2003-03-27
Jackson, MS
reply to stateq2
multithreaded....that's a start. thanks....i'm also using thread to host the file while asking in other forums too funny you brought up 3d engine, because that was my ultimate goal....i was just making this game to get aquaited w/ sdl, then i was going to use that, as well as gl to start a small 3d engine. thanks for the info, because looking at an engine in early development will give me a good idea about what i'm tryin to accomplish
--
Dean


alien9999999
Your Head Looks Nice
Premium
join:2002-05-21
B-3000
you got that right, early development! besides if you really want to program & learn: we are looking for help... and there's really only 2 of us who are developing...

our 3D is on the move, but the 2D support is very minimal still, we need to improve on that.

btw: we feel that SDL really is not required, the mouse works adequatly, the keyboard works not quite better then release 0.0.1; all visualization is handled by X and GL and audio will probably be done with an ALSA plugin, so there's no need for SDL at all. it's a dependency too much, too much overhead, and totally unnecessary.

btw: I'll be using _pthread_ .
--
Alien is my name and headbiting is my game.


stateq2
control the code
Premium
join:2003-03-27
Jackson, MS
reply to stateq2
great, i'll look into the engine tomorrow. i'll be happy to contribute any way i can btw, when you introduce a project to sourceforge, do they automatically host your project website for free?
--
Dean


alien9999999
Your Head Looks Nice
Premium
join:2002-05-21
B-3000
if you are accepted, yes


stateq2
control the code
Premium
join:2003-03-27
Jackson, MS
reply to stateq2
nice