• Welcome to Valhalla Legends Archive.
 

Argh, game scripting

Started by iNsAnE-MS, May 18, 2005, 11:11 AM

Previous topic - Next topic

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.

Banana fanna fo fanna

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)

K

If you want to write your own scripting language, you should check out  spirit, which is part of the boost library.

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...  >.>

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


indulgence

<3

sixb0nes