[Very, very] Simple Scripting Engine

Community Forums/Showcase/[Very, very] Simple Scripting Engine

N(Posted 2004) [#1]
This is a veeeeeeeeeeeery simple scripting engine. The only real problem so far is the lack of functions to parse scripts and send bytecodes to the call stack for processing. Most of what I want to fix by now can be resolved through somewhat clever coding. Though I guess it's hard to be clever when you're bored out of your bloody mind.

Anyhow, the code:


No media required.

If anyone would like to try to help me to improve upon this, I'd be happy. Of course, this is another open source project of mine.


Jeremy Alessi(Posted 2004) [#2]
Cool!


N(Posted 2004) [#3]
Updated code, now there are base functions for tokenizing and parsing a string:



Mind you, there still aren't functions to turn these parsed strings into bytecodes.


Dragon57(Posted 2004) [#4]
Very nice Noel!


RifRaf(Posted 2004) [#5]
yes, very nice. keep it up


N(Posted 2004) [#6]
Progress so far, and through this I've only given myself more questions that answers. Along with a few distortions to my eyesight...




N(Posted 2004) [#7]
Picked it up again and made some changes. No more crap in the main program, variables, calls, and (binary) operators are handled differently, and the functions for parsing and such are being worked on now.



Ultimately, this is turning into something I may end up using. It may even be possible to implement function calls.


wizzlefish(Posted 2004) [#8]
What exactly does it do?


N(Posted 2004) [#9]
Well, at the moment (in the version I have on my computer, not the one up there) it allows you to push calls to certain functions onto the call stack and call them. You can define procedures (functions) outside of Blitz, among other things. This, when expanded upon and objects such as entities, types, and the like are added, allows you to make a modifiable product without releasing the source code to the engine itself.

Similar to how Doom 3's game system works- it's all done up in scripts, no more DLLs to screw with. You could also, by the way, call game logic update functions from within your engine to an external DLL via CallDLL (I finally found a use for that old function).


wizzlefish(Posted 2004) [#10]
I'm still confused....