Skip to main content
gamedev.net
🔒 Locked

Scripting ideas

Started by Zimans Sep 16, 2000 at 11:19 AM 5 replies 250+ views
Original Post
Zimans
Zimans
I''ve been doing some thinking lately on various ways to implement a scripting engine for my game. One of the main things That I''m not sure would be best is the execution of the script code. Should the script be compiled to actual x86 ASM codes and run directly, or should the asm codes be interpretted by my VM and my VM performs the correct action. The first seems like it would be alot faster, but the latter seems like it would be better for ease of implementation and would make the scripts more stable since they are more contained.. The second thing I''ve been thinking about is how exactly to make the VM. The system is event driven (Every ''Object'' has an attached script, that script recieves events caused by that objects interaction, think, etc..) So i figured having registers, and a stack would be sufficient. Then there would be all custom asm codes for operations etc. But I need some "Global" mem for the script cause otherwise no vars can be stored outside of a script call.. I''m just rambling now but hey. I''m open to any comments or suggestions. Thx -Zims
a38750
a38750
Do you really need such low level stuff? I''d have thought a scripting system would only provide basic maths and high level functions that manipulate the engine and other objects.

Frank
Ironblayde
Ironblayde
I would think so too... my scripting engine is so simple you could teach a monkey to operate it, yet it can still get a lot of stuff done.

-Ironblayde
 Aeon Software
"Your superior intellect is no match for our puny weapons!"
ahw
ahw
there is an *excellent* serie of articles on the subject of developing a scripting engine from scratch at flipcode.com

youpla :-P
-----------------------------Sancte Isidore ora pro nobis !
Mike
Mike
I''ve been working on a scripting language of and on for a while now. You can get the old source code at http://mike010.hypermart.net. I''ve recently changed the parser. If you have any questions about it feal free to ask me.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.