Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

popatr

interpreters and the like

This topic is 5775 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

Can any of you point me to some information on how to implement an interpreter? My question is not so much about parsing a text expression right now- It''s more along the lines of how to efficiently run through sections of ''virtual machine'' code, like Java does, I guess. The reason that I want to explore this area a bit is that I imagine making a game engine, like rm2k or gamesfactory. The user would give instructions that would need to be encoded into their game file and interpreted at run time. Most of their commands would not need to be parsed, since they would involve clicking a button and filling out some parameters. In other words, I had not planned to use scripting as part of the maker. One major concern is mathematical expressions. If I allow a user to enter a complex expression, I guess I have to get down and dirty with parsing after all. I did this once, but it was in a scheme class, and there was a library that greatly eased the whole thing. If it is possible to quickly summarize the methods that various game engines use, maybe you could post them.

Share this post


Link to post
Share on other sites
Advertisement
You could also use .NET to write it in - which can compile and run user entered code on the fly. Just an off the wall thought.

Share this post


Link to post
Share on other sites

  • 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!