- Splat
🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
how would you implement a script?
Unless you wanted to implement an advanced script language of your own with a compiler, parser, etc., then yes, you will want to just read it in line by line and read its first word (being the command), use that to locate in an array a function pointer, then call that function with the remainder of that line (parameters).
would you have a file w/ the script info that could be loaded by your game...
like this:
mov, t, 23, u, l, r, d
could mean to move a tile(23) up, left, right and down.
would you have a function to read the script and then a switch to act upon it?
like this:
mov, t, 23, u, l, r, d
could mean to move a tile(23) up, left, right and down.
would you have a function to read the script and then a switch to act upon it?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement