Page 1 of 1

Making a game engine, do you recommend .dll or .lib?

Posted: Fri Oct 01, 2010 7:26 pm
by Lil Margin
If your making a game engine what would you use? a static library or a dynamic library?

I am thinking of using a .dll for smaller file size and faster performance but then again a static library makes it easier to distribute...

So what are your guys though on this matter?

Posted: Fri Oct 01, 2010 9:05 pm
by Lonesome Ducky
I'm all for dll personally. It wouldn't be much harder to distribute, as games mostly have more than their executable anyways, so if you can distribute the images etc., you can surely do the dll as well with few or no problems whatsoever.

Posted: Tue Oct 05, 2010 6:23 am
by Midnight
I intend to change the source a bit to suit my needs and have no reason to expose the core systems, I will probably go with static.

the purpose of a dll is to share the library, for example you might have a seperate editor that uses the engine. dll's were probably originally intended to be at an operating systems core and shared by many applications to reduce resources like file sizes. In the future present we all know that projects are far too branched to make this possible in many cases. even games like those that used the quake3 engine which were plentiful did not share each others engine libraries and were self contained.

however dll's have a unique ability compared to static, lets say you had two quake 3 games and both had their own indentical dll and one of those had become corrupted. you could then easily copy the others dll to fix it rather then reinstalling the entire application for that one file.

again though it's the future and even when engines are shared they are usually modified, and it's not really a huge factor when deciding which way to compile but more of a handy inherent feature.

dlls are also very handy when hacking an application, now that might seem like a bad thing in most cases but some of the greatest modifications to games in the past have been hacked in this way.

I'm sure there are much better arguments to this subject but I'm no expert on it. anyway hope that gives you a little insight, happy coding. 8)

Posted: Wed Oct 20, 2010 10:32 am
by johnsmith
For making a game engine, I would like to use a dynamic library because It will be helpful to add more games on it. I think that you should use .dll files for smaller sizes of files which are very helpful to increase the speed of the game engine.

Posted: Wed Oct 20, 2010 10:52 am
by Luben

Re: Making a game engine, do you recommend .dll or .lib?

Posted: Wed Oct 20, 2010 12:11 pm
by Bate
Lil Margin wrote:I am thinking of using a .dll for smaller file size and faster performance
Static librarys are always faster! Often, depending on the situation though, the performance gain is negligible. In some cases, however, it could make a real difference.

Performance testing shared vs. static libs