[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing a simple embedded interpretter



>>I'm currently porting/rewriting an adventure game(see BASS in .sig) to
>>linux and as most of the original code was asm I decided to rewrite the
>>darned thing in C++ for max portability. Anyway, I need to write some sort
>>of interpretter to handle the game script, albeit I have never written
>>anything like this before, anyone got some suggestions on writing an
>>interpetter that allows me to use C++ functions in a manner such as
>>PLAYWAV INTRO.WAV
>>                        SETBG INTRO1.PNG
>>etc, etc...if anyone catched my drift...
Sorry if I didn't really explain properly, but I was meaning to write my
own interpretter, or a compiler that converts the script into pcode tokens,
so i can get help when writing the script without the other person(s)
having to worry about fuzzy code.


>Flex and Bison. They'll do the syntactic analysis for you. You can then
produce
I looked at flex as well as yacc, but in the end I gave up as it really
doesn't suit my needs. The biggest problem with making adventure games is
the need for completely new code between games, unless you restrict
yourself with something like SCI.


-
Cheers,
Outlaw Jim

################################################################
#"asm is like a bicycle, when you fall off you kill yourself"  #
#(°-  Check out LinuxGamer at:  http://linux.fsgs.com          #
#//\  BASS for Linux: http://linux.fsgs.com/bass               #
#_/_  Cult following: http://www.geocities.com/rabid_tony/     #
################################################################