Almost That Time

So, as Ludum Dare approaches, I decided that no matter what the theme, I am probably making a visual novel. And I’m probably writing the player for HTML5.

It will use a domain specific language, the most recent braindump of which is here https://github.com/Bananattack/proze/wiki/Script-Syntax but I’ll share how it looks at the time of this writing as well:

Comments

  • # this is a comment

Declarations

  • event name, where name is the name of the event being declared.
  • var name value, where name is the name of a variable to declare, and value is the literal integer value it will take on before script is started.
  • image name path, where name is the name of an image to declare, and path is where the resource can be found.

Commands

  • say text, where text is a body of text to display on the screen.
  • wait amount, where amount is a value indicating the number of frames to wait.
  • go event, where event is the name of an event to jump to.
  • go event condition, where event is the name of an event to jump to if a condition is met, and condition is <>=<> or =, acting on the result of the last compare instruction.
  • compare ls rs, where ls and rs are values to compare to each other.
  • set variable value, where variable is the name of an existing variable and value is the new value it will take on
  • add variable value, where variable is the name of an existing variable and value is the amount to add.
  • sub variable value, where variable is the name of an existing variable and value is the amount to subtract.
  • min variable value, where variable is the name of an existing variable, and min( variablevalue) is the the value it will take on.
  • max variable value, where variable is the name of an existing variable, and max( variablevalue) is the the value it will take on.
  • fg image, where image is the name of the foreground image to use.
  • bg image, where image is the name of the background image to use.
  • ask question
    • event text
    • end, a collection of choices the user can make, with question being some text presented to the user. For each option, there is an eventnaming where to go if that choice is made, and text being the option displayed in-game.

Values

For commands that take “values” without further clarification, these may either be literal integers like 123 or names of existing variables like hitpoints.

 

 

ANYWAY, I made a proof-of-concept in Plum (my Lua game engine) last night just to see if it was plausible, but it was far from being usable. I want to start from scratch in JS during the contest. Then once the player is fleshed out, I can write the majority of the game in my scripting language. Let’s how things go!