Author | Message | Time |
---|---|---|
iNsAnE-MS | Well, right now I'm in the process of writing a somewhat flexible game engine for my friends and I to create games with (we have cool ideas). Most of it is done but now I'm on the part of writing a scripting engine. Help me guys, it's starting to get crazy! I'm just starting to get into making my scripts multi-threaded to allow for multiple simultanous executions... is this normal?! My game is starting to turn into an entirely new platform... almost like a console... If anyone has any tips or ideas on how to implement powerful scripting in a game I would appreciate it. | May 18, 2005, 4:11 PM |
St0rm.iD | I'd say that it's a bad idea to write your own scripting language, since there will likely be limitations, bugs, and a lot of time wasted. You have several options: - DLL (or other dynamically loaded code) based plugin system (the easiest route) - Embed a scripting language like VBScript or JScript via ActiveX scripting (if you're on windows, this is a snap) - Embed another scripting language (a bit harder, but a pretty cool one is www.python.org and a lot of commercial games use it) | May 19, 2005, 1:10 AM |
K | If you want to write your own scripting language, you should check out spirit, which is part of the boost library. | May 19, 2005, 3:25 AM |
iNsAnE-MS | Well at the moment my scripting engine is basically like machine code/assembly, and then later I was going to create basically a compiler for it. I was hoping for some tips on how to develop the scripting engine not a quick fix for it. :) I'm doing this all from scratch for the hell of it and for knowledge, not just to grab somebody else's plugin. I also have a lot of free time on my hands... >.> | May 19, 2005, 6:41 AM |
iNsAnE-MS | Few limitations I should hope, and if there are limitations hopefully it's something I can go back and fix. As for bugs... they don't live long, I tend to test write things modularly for my programs and test each procedure after I write it to make sure it produces proper results. And if I learn anything then the time is not wasted. :D | May 19, 2005, 6:56 AM |
St0rm.iD | See http://mitpress.mit.edu/sicp/ | May 23, 2005, 11:58 PM |
indulgence | LUA ftw | June 14, 2005, 11:38 PM |
sixb0nes | LUA or Squirrel (http://www.squirrel-lang.org/) ftw | October 13, 2005, 3:47 AM |