A modifiable dialogue system.
A simple dialogue system that is highly modifiable with some programming knowledge. This version is written in C# with Raylib-cs, but the original version (now the Speech-Java branch) was written in Java. However it isn't actively in development anymore.
The following lines (excluding: 1., 2. and 3.) can be copied into the Define class in the function "DefineLines".
- line = SetLine("bg", "BLACK", WHITE, 0, 0, 0);
- line = SetLine("say", "Hello World", WHITE, 0, 0, 1);
- line = SetLine("end", "END", WHITE, 0, 0, 2);
Explanation:
- Sets the Background (bg) to a png called "BLACK", it is drawn in WHITE (how you normally see the png), than you define the x and y position, last you set when in the timeline it happens.
- "Says" (shows) the text "Hello World", the text color is set to WHITE, than you define the x and y position, last you set when it happens in the timeline.
- Ends the program, "END", WHITE and the x and y position don't do anything currently, last you set when it happens in the timeline.
There is a Parser that looks at the command (1st one). Let's say it's a "say" command, than the Parser will see what you put after that (this is reffered to as the "object"). Let's say you set the object to "HELLO". Than the Parser goes to the drawing method and uses the color and two numbers you put in after that (x and y positions) to draw the text. If you want some event to happen later in the story than you just need to change the last number, the index, and set it to a higher number. The index determines when somehting happens.
Here is a list of the currently available commands:
- "say" = draws text onto the screen
- "pic" = draws image to the screen
- "bg" = sets background
- "audio" = plays audio
- "end" = ends app
- "choice" = make choice
- "goto" = sets index as given number
- "if" = make statement that checks if a variable is a certain value
- "load" = loads given value as current "loadednumber"
- "set" = sets certain variable to value of "loadednumber"
My goal is to make a small game with it (maybe 2 hours long or something) and publish it without having to change the entire engine. I made a short todo-list:
0.1:
Showing text [X]
Showing images [X]
End the game [X]
0.2:
Background [X]
Audio [X]
0.3:
Choice [X]
Goto [X]
If [X]
Change variables [X]
0.4 (optional):
Custom mini games [O]
Read commands and stuff from file [O]
Mouse input [O]