Skip to main content
gamedev.net
🔒 Locked

[.net] Engine Design

Started by blanky 3 replies 1.1k views
Original Post
blanky
blanky
Hey guys I'm going to try to build a 2D Engine with XNA. I'm wondering though, what is the typical design? Er, vague question. What I mean is, should I just roll the whole thing into one big .dll? Or should I build stuff like name.render.dll, name.network.dll, name.scripting.dll, etc.? Thanks, sorry for the vague question, if you still don't understand please tell me and I'll try to clarify. If my second question (The scripting one) doesn't make sense please tell me and I'll try to clarify, I have a feeling it's more confusing. Thanks guys I really appreciate the help!
silencer3
silencer3
don't split engine into several modules unless you need to. you could consider using another dll for rendering if you would have multiple rendering systems to choose from etc..
joelmartinez
joelmartinez
I'll have to agree with silencer here ... don't do it unless you need to. In fact, I'll even go as far as to say that you should explicitly keep it all in one .dll and build your engine for the express purpose of building a game. The "engine" should contain no more functionality than what is required by the game you're building. And, for example, if your game will have networked multiplayer, all that code goes in the .Network namespace.

If and when you finish that game and start working on another game, only break out the pieces that you will not use in this game. So if your second game will not include network multiplayer, then you can break out the .Network namespace into its own .dll.

Taking that approach, you end up with only the modularity that you need :-)
Joel Martinez
http://codecube.net
[twitter]joelmartinez[/twitter]
blanky
blanky
Cool, thanks guys, I appreciate it.
AntonyCoder
AntonyCoder
Personally I'd suggest splitting up core components that do not require each other.

So say you had,

Engine, Networking, Physics and Scripting,

Make them all a seperate dll.

The immediate benefit is reduce compile times when you've wrapped paticular aspect of the engine, and the longer term beneift is how easy you can write support tools or even entirely new applications that only borrow the aspects of the engine you need.

In C# anyway. If it was C++ then i wouldn't split it up, but c# makes it so easy i see no reason not to.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.