Advertisement

Writting an event-scripter

Started by October 12, 2000 10:17 AM
1 comment, last by cyrius 24 years, 2 months ago
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".
Advertisement
hey thanks! Lua looks really cool and helpful


Timothy Roff
USC iNteractive
AIM: neocyrius
Timothy RoffUSC iNteractiveAIM: neocyrius

This topic is closed to new replies.

Advertisement