Jump to content

  • Log In with Google      Sign In   
  • Create Account

DLL versus STATIC


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 Alundra   Members   -  Reputation: 926

Like
0Likes
Like

Posted 14 February 2013 - 10:00 PM

Hi everyone,

I start this topic to have your point of view about one subject who is DLL and STATIC linking.

The subject is about an engine compilation who could have multiple renderer ( OGL,D3D11,... ).

Do you think it's a good design to have differents .lib by renderer or have DLL module who set the renderer ?

The STATIC option output multiple exe by renderer says : Game-OGL.exe / Game-D3D11.exe ....

What is your point of view about this one ?

Thanks


Edited by Alundra, 14 February 2013 - 10:01 PM.


Sponsor:

#2 Hodgman   Moderators   -  Reputation: 31851

Like
4Likes
Like

Posted 14 February 2013 - 10:05 PM

I personally use the static method, because, you probably don't need to have a Game-OGL and a Game-D3D11 in the one installation -- When you install the game on Win7, you install Game-D3D11, and when you install the game on MacOS, you install Game-OGL, so I just call them both Game (Windows and Mac version)...


Edited by Hodgman, 14 February 2013 - 10:06 PM.


#3 zacaj   Members   -  Reputation: 643

Like
0Likes
Like

Posted 14 February 2013 - 10:31 PM

Making separate executables for DX11/9 seems to be the standard practice for most games I've seen.



#4 TheChubu   Crossbones+   -  Reputation: 4766

Like
1Likes
Like

Posted 15 February 2013 - 12:35 AM

STALKER series have one main exe and a .dll for each renderer: DX8 (in ShoC), DX9, DX10 and DX11. I think Crysis series does that too.

 

Assassin's Creed has different exes for the different renders. Far Cry 3 too.

 

So, both approaches have been taken by big studios.


Edited by TheChubu, 15 February 2013 - 12:39 AM.

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

 

My journals: dustArtemis ECS framework and Making a Terrain Generator


#5 KaiserJohan   Members   -  Reputation: 1237

Like
0Likes
Like

Posted 15 February 2013 - 12:44 AM

Games usually ship in DX9 and DX11 executables.

Don't you get to skip some boilerplate code aswell for dll-loading when using .lib? Not critical but nice nonetheless.



#6 LorenzoGatti   Crossbones+   -  Reputation: 2773

Like
0Likes
Like

Posted 15 February 2013 - 02:59 AM

A DLL is slightly more flexible because it can be loaded dynamically (e.g. try OpenGL or DX9 on Windows as a fallback, according to user options), replaced (e.g. with a logging/debug proxy that calls the real renderer during development), etc.


Produci, consuma, crepa

#7 __SKYe   Members   -  Reputation: 1099

Like
0Likes
Like

Posted 15 February 2013 - 02:14 PM

Like LorenzoGatti said, one of the good things about DLLs is that they can be replaced.

 

Imagine you have your game, and you make changes to the render only, either to add new features, or fix bugs, etc. If you statically link the renderer to your project, you'd have to replace the executable, but if you used DLLs, then you could replace only the renderer DLL, maintaining your original executable intact.

 

This also helps to keep the executable size smaller.



#8 Satharis   Members   -  Reputation: 1264

Like
1Likes
Like

Posted 16 February 2013 - 06:17 AM

They both have pros and cons, pretty much the whole point of dll's is that they are -dynamic- as in you can swap them out without replacing the executable if code changes in a helper library. Depending on code design that can be a big help or a big annoyance, depends on your needs.

 

I will say dll hell is a bit of a problem with some companies, it is -not- good design to make a thousand dll's for everything and link them all and pretend that is easily modifiable code. That's just bloat and leaves a mess. Using them responsibily is good though, just like using your own code in seperate libs responsibly is.



#9 Norman Barrows   Crossbones+   -  Reputation: 2322

Like
0Likes
Like

Posted 16 February 2013 - 12:22 PM

go static unless you need the ability to swap dll's.

 

easier, simpler, faster.


Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

 

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

 

 





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS