Jump to content
  • Advertisement
Sign in to follow this  
medevilenemy

Optimization and cool stuff like that

This topic is 4850 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I have been working on writing a kind of top-down space shooter game for some time now and i have noticed a few things which i need to work on. 1) I need to figure out how to speed up the game on slower systems 2) I need to figure out how to slow the game down on very fast systems 3) I need to figure out how to draw DXF models in OpenGL Does anyone know how to do any of these things? Any input would be very helpful.

Share this post


Link to post
Share on other sites
Advertisement
Time-based movement would solve the first two cases. I don't know about the third, but getting a file format spec and loading it yourself is my best guess.

Share this post


Link to post
Share on other sites
Try the Delta3D game engine; it's free and uses OpenSceneGraph - which handles many many 3D file formats.
Graham

Share this post


Link to post
Share on other sites
For 1) and 2), time based movement is the way to go. Basically, you have to find the amount of time between the frames, then use that to figure out how far each object moves.

The way I do this (which is probably not the best way) is to find the time between each frame (using Environment.tickcount() or timeGetTime depending on the language) to finbd how many milliseconds have passed. I divide that by 1000 to find how many seconds. I then multiply my speed (which is in m/s) by that to move the object by an appropriate amount. This is extremely easy to do and it works fine for me. It only uses about 5 extra lines of code.

For 3), I can't help you much. I am not familiar with DXF models. My gues is that you will have to rite you own file parser and deal with the data yourself. YOu could also look to see if anyone has samples or free code to do this. Another solution would be to convert the file into a more common format and load that...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!