Quote:
Original post by cmp
i think if you would have multiple parents, you would have to use sub children, as ever attribute may only occur once, at least as far as i know.
When I was writing that, I was just about to put interfaces and packages - but then I did remember that you can only have single attributes. But it will be good for if, for and while statements, and it could be possible to have source_file=... and source_line=... attributes, which would be quite cool.
Quote:
Quote:
Maybe I should make the parser using a state machine, and run it off a bnf. But that sounds like too much work to me.
i also thought about this, at least it would sound very cool to be independtent from external tools.
but the first thing is, that i will write my own xml like langauge, since it is really a pain to write everthing in xml and i only use a small subset of xml (tags, attribute).
i thout something like this:
*** Source Snippet Removed ***
i tried to write a simple converter yesterday, but had some bug, but it should just be 100 lines of code and would save from a lot of writing.
I'm going to write a design document first - with all the features that voodoo will have, and examples of the syntax. Then I think I will work on the virtual machine, doing the parser last.
I don't think xml is an acceptable format for bytecode - I think I will have to go with a binary file.
An idea that I had was that the constants in my language get exported to an xml file, and they can be overridden by other files. This way there will be less compilation.
To add extra features to the engine, you will have to compile the part of the engine that has the extra features (C++)
To add extra game logic you will have to compile the script with the new logic (voodoo)
To tweak the ingame constants you will have to edit an xml file (easy)
Also I think the file can store any constant - it won't be an error if the actual constant doesn't exist, it will be a sort of database. Constants will also be editable ingame, using a console type thing. I was also thinging about having an ingame script editor, so you don't even have to leave the game to create new functionality.
Also triggers can be setup in the console (like binding in the quake engine).
There will be two types of triggers, ones that need to be checked all the time, and others that can be called by code (key presses, events). This way the overhead for the trigger system can be lessened.
Update:
I no longer have access to "always on" internet, now on dialup. I will still be able to check this thread - it will just have to be once a day only.
[Edited by - umbrae on November 13, 2004 1:39:54 AM]