Sign in to follow this  

Using multiple libraries = slow?

This topic is 3838 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

Hi all, I'm planning to build a game engine by mixing various free-of-charge libraries: - OGRE 3D for rendering 3D graphics - Newton Game Dynamics for game physics - SDL for frame-rate control, game logic, and input - FMod for 3D sounds - RakNet for UDP networking But my lack of experience rendered me unable to make decisions based on engine performance... Since I will be using 5 different libraries at the same time, will my game run slow? Which of these libraries will potentially become a bottleneck? Answers are more than welcome, - dadads -

Share this post


Link to post
Share on other sites
All of the above contains functions that you would otherwise need to write yourself, so there's absolutely nothing that should slow down your programs...
...unless each library runs in a separate thread.

The only problem I can think of that external libraries may force you to think in a manner that you usually don't, since all programmer styles are unique. :)

Share this post


Link to post
Share on other sites
Hi I am having trouble loading images in my opengl game.

I am currently using DevIL to load images but it is rather slow.
Does anyone know any fast and free image loading libraries that I can use?
It has to be in dll form so that I can call the functions.

Thanks

Share this post


Link to post
Share on other sites
^ You know thread hijacking isn't nice. There are plenty of free image libraries (I use libpng), but I've used DevIL and there is nothing slow about it. Start your own thread and post your code, and you may receive some help.

Quote:
Original post by dadads
Since I will be using 5 different libraries at the same time, will my game run slow? Which of these libraries will potentially become a bottleneck?

No, and none of them.

You have to profile your code to find a bottle neck. At this point you don't even have code. You may want to start a little smaller though, I would suggest just using SDL and making something simpler first. Once you can handle that, then move to something harder.

Share this post


Link to post
Share on other sites
When mixing libraries performance problems might arise if there are a lot of conversions between different data formats. "Glue code" is sometimes needed to convert the data on the fly (before API calls).

Suppose one library uses a certain vertex format (say for spatial sound) while a rendering library would use a different one. The networking lib would use yet another data structure for positional data (to optimize network bandwidth).

If your game loop would have to update many game objects there could be millions of calls to conversion functions that would not be needed at all if there were a common format shared by all components in your game.

In reality it isn't much of a problem really as most well-known libraries are flexible enough to handle different formats. Those that don't aren't that popular usually.

Share this post


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