[C++] importing map files

Started by
11 comments, last by Kwizatz 15 years, 8 months ago
You could embed a Lua interpreter into your application and just "execute" the file, it could come in handy afterward for AI and UI scripting as well, its likely to be less work than say write a parser in lex and yacc.
Advertisement
Quote:Original post by Kwizatz
You could embed a Lua interpreter into your application and just "execute" the file, it could come in handy afterward for AI and UI scripting as well, its likely to be less work than say write a parser in lex and yacc.
I thought about suggesting that, but it's even more complicated than my original suggestion, heh.

Of course, it could be worth it if he ended up using the scripting functionality for other parts of his game.
Quote:Original post by brent_w
I thought about suggesting that, but it's even more complicated than my original suggestion, heh.

Of course, it could be worth it if he ended up using the scripting functionality for other parts of his game.


Well, he can read a line, tokenize it and then iterate over the resulting tokens to find out what to execute, cast integers, floats, etc and then make the function call, its probably about as much work as embedding Lua would take.

This topic is closed to new replies.

Advertisement