- Jan 4, 2018
- 677
- 754
I'm working on making a game with VN elements in Godot, and I don't like any of the existing solutions for storing and retrieving text and defining scenes. I've been planning to build a VN framework on top of Godot for a while now, but for now I'll settle for putting together a very simple markup language for describing scenes and a parser for stepping through and utilizing that data. My plan is to make each line in a scene file a sequential command, where each line starts with a keyword to tell the parser what sort of command it is, followed by the appropriate data to go with it.
For instance there could be a keyword like "text" or "t" to signal that the next thing it should do is display the text that follows the space after that keyword. A related one would be for dialog, which could use "dialog" or "d" and it gets followed by an identifier that the parser uses to fill in a name label to attribute the following text to. You should be getting the general picture by now.
I'm also planning to have one or more files where a number of things can be defined and/or given aliases on a global scale for use by all scene files. Some things that can be done in these files will include defining UI layouts, so you can easily swap between different screen layouts from a scene script with a simple one-liner like everything else.
So my question for all of you is what do you feel are essential commands needed for executing a VN scene.
Please let me know if you can think of anything I've missed!
Edit: Oh, forgot two points. The parser will ignore leading whitespace and blank lines. Also I'll probably use # as a keyword for comment lines, to tell the parser to ignore lines starting with that and move to the next valid line to execute instead.
For instance there could be a keyword like "text" or "t" to signal that the next thing it should do is display the text that follows the space after that keyword. A related one would be for dialog, which could use "dialog" or "d" and it gets followed by an identifier that the parser uses to fill in a name label to attribute the following text to. You should be getting the general picture by now.
I'm also planning to have one or more files where a number of things can be defined and/or given aliases on a global scale for use by all scene files. Some things that can be done in these files will include defining UI layouts, so you can easily swap between different screen layouts from a scene script with a simple one-liner like everything else.
So my question for all of you is what do you feel are essential commands needed for executing a VN scene.
You don't have permission to view the spoiler content.
Log in or register now.
Please let me know if you can think of anything I've missed!
Edit: Oh, forgot two points. The parser will ignore leading whitespace and blank lines. Also I'll probably use # as a keyword for comment lines, to tell the parser to ignore lines starting with that and move to the next valid line to execute instead.