-
Logic questions
Hello,
I'm really new at game development, and I have a few questions that the books I have or tutorials online don't seem to cover. I'd appreciate any input.
1. The main loop,
currently my main loop looks like:
1. think (physics, process key input, do almost everthing)
2. render (render the world, all entities)
3. swap buffers & poll input
4. repeat steps 1-4
step 1 should be unlimited FPS yes? am I allowed to limit step 2's FPS? Or is there a standard way to go around it?
2. Could I get away with doing everything in a single thread? Granted loading times would be longer, but I like linear logic.
3. Am I allowed to legally use the quake3 bsp format or even the md3 format without releasing my source? I wrote my source from scratch from documentation on the format. In other words, do id software own the format? I've tried searching but I really don't know.
4. What's the best way to store/retrieve CVARS? I was thinking of a hash table, but is that going to be too slow if called every frame? eg like if the user can set gravity. Looking up the value of gravity each physics frame from a hash table seems like a wrong way to go.
Thanks in advance.
-
it is alway better to use some timer and tricks to keep a constant say 30 fps rate this helps your game look smooth regardless of the machine processing power although it will not speed up frame rate on slow machines but is definitely needed on faster machines where your alien ship will be traveling 1000 pixels per milliseconds. think about it.