Jump to content
  • Advertisement
Sign in to follow this  
JY

How to access scripted objects..

This topic is 4653 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm developing a simulation engine which is scriptable. I have developed the script parser and interpreter which uses a symbol table (which is a B-tree) to reference data types, function names, constant values etc. All this has come from a book on compilers and interpreters so i think it's pretty standard stuff. My problem comes in knowing how to stitch this together with the engine itself. As entities are added to the simulation I want them to be available to the script interpreter, naturally. However I'm not sure of the best way to do this so I was hoping for some opinions? :) It seems a logical progression to store all the entities in the symbol table so that the script interpreter can access them. However I just have a feeling that this is going to slow things down, particularly for large arrays of values. I was thinking an alternative might be to have a reference type in the symbol table which would simply point back to a C++ object so that the values can be stored in a std::vector (or whatever) for efficiency but still accessed through the script. Methods can already be called through a dispatch interface that is associated with the entity in the symbol table. Should I extend this in a similar way to .NET and add some get()/set() functions to the dispatch definition? I'd appreciate any thoughts, thanks guys.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!