How to integrate game logic in game engines

Posted by MahanGM on Game Development See other posts from Game Development or by MahanGM
Published on 2012-02-23T20:18:17Z Indexed on 2012/03/21 23:41 UTC
Read the original article Hit count: 377

Filed under:
|
|

Recently I'm working on a 2d game engine example in .Net with C#. My main problem is that I can't figure out how I should include the game logic within the game. Currently I have a base engine which is a set of classes that they are running sub-systems like Render, Sound, Input and Core functionality. There is an editor which helps the user to add resources, build levels, write scripts and other stuffs.

I came up with an idea to use Reflection and CSharpCodeProvider from my editor to compile the written code. This way I can get an executable of my product too. This way is quite well but I would like to know what's really the solution and architecture to do this.

My engine's role is 2d platform. The scripting language is C# right now because I can't consist any other embeddable language for now. The game needs compilation and CSharpCodeProvider is the only way for me to do it meantime.

© Game Development or respective owner

Related posts about c#

Related posts about engine