Writting an event-scripter
I would like to create a simple scripting language to script events for my game.
The scripts would look something like:
name act1_scripts
event DOOR_BLOWUP
{
some scripting code here
blah
blah
}
event ANOTHER_EVENT
etc etc etc
my problem is I dont quite know how to read in and parse the file. I want it to look for "commands" first and then look for the parameters (ex: in the above example, "name" would be the command and "act1_scripts" would be the parameter).
Any suggestions would be greatly appreciated =)
Timothy Roff
USC iNteractive
AIM: neocyrius
Timothy RoffUSC iNteractiveAIM: neocyrius
Look up a scripting language called LUA. It''s a great little pascal-ish language implemented as a C library. I''m using it in my current project and it''s working out great.
Morbo
Unless, of course, you want to learn how to make a compiler. In which case, go pick up a book called "Implementing a modern compiler using C".
Morbo
Unless, of course, you want to learn how to make a compiler. In which case, go pick up a book called "Implementing a modern compiler using C".
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement