Archived

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

popatr

interpreters and the like

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