# Available Small Open Source Game Engines for tutorial [closed]

I'm learning to create a game engine from scratch in XNA. I'm seeking examples of very small game engines, specifically the architecture and structure of source files, etc. It should include a scripting engine. Articles are also appreciated.

More specifically, I have a problem knowing how to connect the scripting engine to the rest of the game engine, like loading a models from the script.

• Just out of interest, why do you need a scripting engine? C# itself already solves almost all of the problems a scripting engine is used to solve. And XNA is already a "very small game engine" that can load models. – Andrew Russell Sep 5 '10 at 1:09
• The guy who I'm working with said he wants a scripting engine so he doesn't have to recompile the game whenever something in the story changes. – Shawn Mclean Sep 5 '10 at 2:27
• Just so you know, there are pure C# solutions to that problem: stackoverflow.com/questions/1353456/… (the C# compiler is part of the runtime). – Andrew Russell Sep 5 '10 at 3:21

Once you have a scripting engine, I would keep separate the 3D models from the scripts. Scripts are typically in the logic side of things, while 3D models are most certainly the presentation/view side of things, and those shouldn't really be mixed. When a script commands a character to "walk to (3,5)", it doesn't need to say "load walking animation, set velocity to (-1,1), wait 3 seconds, set velocity to zero, load idle animation"; you'd typically just have a walkTo(x,y) function available to the script, and the intermediate code would take care of 3D models, animations, etc.