• Writing a general purpose 2D engine
    1 replies, posted
I was inspired by Botch and the snippet of code seen [url=http://www.facepunch.com/showpost.php?p=16072961&postcount=908]here[/url], so I started setting up the general structure of my engine. However, I'm facing some problems with the linking. I've looked at the file structure Garry uses in his Botch and how the Source engine is set up, but I'm still confused. My current setup looks like this: [img]http://i31.tinypic.com/2642hys.png[/img] When launcher.exe is started, it loads engine.dll which in turn loads game.dll. The problem is that while game needs to be dynamically linked, it needs to be statically linked to engine.dll at the same time to interact with the render interface. I guess I'm doing it completely the wrong way. Eventually I want to have a launcher.exe with a couple of dlls like graphics.dll, physics.dll which load game.dll which in turn does everything it needs to run the game. So, what do I need to change to get what I want? I don't know a lot about linking, so that's probably why I'm facing this problem.
You need to use interfaces and use classes only internally (in the dll). Then provide a global pointer or a factory (preferred) for these interfaces.
Sorry, you need to Log In to post a reply to this thread.