{"author_name":"Overkill","cat":"LD #26","comments":[],"epoch":1367018940,"likes":1,"metadata":{"p_key":"46033","p_author":"Overkill","p_authorkey":"1210","p_urlkey":"81694","p_title":"Almost That Time","p_cat":"LD #26","p_event":"LD26","p_time":"1367018940","p_likes":"1","p_comments":"0","p_status":"UPD5","us_key":"1210","us_name":"Overkill","us_username":"overkill","event_start":"1366934400","event_key":"16","event_name":"LD26"},"text":"<p>So, as Ludum Dare approaches, I decided that no matter what the theme, I am probably making a visual novel. And I&#8217;m probably writing the player for HTML5.<\/p>\n <p>It will use a domain specific language, the most recent braindump of which is here\u00a0<a href=\"https:\/\/github.com\/Bananattack\/proze\/wiki\/Script-Syntax\">https:\/\/github.com\/Bananattack\/proze\/wiki\/Script-Syntax<\/a>\u00a0but I&#8217;ll share how it looks at the time of this writing as well:<\/p>\n <div>\n <div id=\"wiki-body\">\n <h3>Comments<\/h3>\n <ul>\n <li><code># this is a comment<\/code><\/li>\n <\/ul>\n <h3><a href=\"https:\/\/github.com\/Bananattack\/proze\/wiki\/Script-Syntax#declarations\" name=\"declarations\"><\/a>Declarations<\/h3>\n <ul>\n <li><strong>event<\/strong>\u00a0<em>name<\/em>, where\u00a0<em>name<\/em>\u00a0is the name of the event being declared.<\/li>\n <li><strong>var<\/strong>\u00a0<em>name<\/em>\u00a0<em>value<\/em>, where\u00a0<em>name<\/em>\u00a0is the name of a variable to declare, and\u00a0<em>value<\/em>\u00a0is the literal integer value it will take on before script is started.<\/li>\n <li><strong>image<\/strong>\u00a0<em>name<\/em>\u00a0<em>path<\/em>, where\u00a0<em>name<\/em>\u00a0is the name of an image to declare, and\u00a0<em>path<\/em>\u00a0is where the resource can be found.<\/li>\n <\/ul>\n <h3><a href=\"https:\/\/github.com\/Bananattack\/proze\/wiki\/Script-Syntax#commands\" name=\"commands\"><\/a>Commands<\/h3>\n <ul>\n <li><strong>say<\/strong>\u00a0<em>text<\/em>, where\u00a0<em>text<\/em>\u00a0is a body of text to display on the screen.<\/li>\n <li><strong>wait<\/strong>\u00a0<em>amount<\/em>, where\u00a0<em>amount<\/em>\u00a0is a value indicating the number of frames to wait.<\/li>\n <li><strong>go<\/strong>\u00a0<em>event<\/em>, where\u00a0<em>event<\/em>\u00a0is the name of an event to jump to.<\/li>\n <li><strong>go<\/strong>\u00a0<em>event<\/em>\u00a0<em>condition<\/em>, where\u00a0<em>event<\/em>\u00a0is the name of an event to jump to if a condition is met, and\u00a0<em>condition<\/em>\u00a0is\u00a0<code>&lt;<\/code>,\u00a0<code>&gt;=<\/code>,\u00a0<code>&lt;&gt;<\/code>\u00a0or\u00a0<code>=<\/code>, acting on the result of the last\u00a0<strong>compare<\/strong>\u00a0instruction.<\/li>\n <li><strong>compare<\/strong>\u00a0<em>ls<\/em>\u00a0<em>rs<\/em>, where\u00a0<em>ls<\/em>\u00a0and\u00a0<em>rs<\/em>\u00a0are values to compare to each other.<\/li>\n <li><strong>set<\/strong>\u00a0<em>variable<\/em>\u00a0<em>value<\/em>, where\u00a0<em>variable<\/em>\u00a0is the name of an existing variable and\u00a0<em>value<\/em>\u00a0is the new value it will take on<\/li>\n <li><strong>add<\/strong>\u00a0<em>variable<\/em>\u00a0<em>value<\/em>, where\u00a0<em>variable<\/em>\u00a0is the name of an existing variable and\u00a0<em>value<\/em>\u00a0is the amount to add.<\/li>\n <li><strong>sub<\/strong>\u00a0<em>variable<\/em>\u00a0<em>value<\/em>, where\u00a0<em>variable<\/em>\u00a0is the name of an existing variable and\u00a0<em>value<\/em>\u00a0is the amount to subtract.<\/li>\n <li><strong>min<\/strong>\u00a0<em>variable<\/em>\u00a0<em>value<\/em>, where\u00a0<em>variable<\/em>\u00a0is the name of an existing variable, and min(\u00a0<em>variable<\/em>,\u00a0<em>value<\/em>) is the the value it will take on.<\/li>\n <li><strong>max<\/strong>\u00a0<em>variable<\/em>\u00a0<em>value<\/em>, where\u00a0<em>variable<\/em>\u00a0is the name of an existing variable, and max(\u00a0<em>variable<\/em>,\u00a0<em>value<\/em>) is the the value it will take on.<\/li>\n <li><strong>fg<\/strong>\u00a0<em>image<\/em>, where\u00a0<em>image<\/em>\u00a0is the name of the foreground image to use.<\/li>\n <li><strong>bg<\/strong>\u00a0<em>image<\/em>, where\u00a0<em>image<\/em>\u00a0is the name of the background image to use.<\/li>\n <li><strong>ask<\/strong>\u00a0<em>question<\/em>\n <ul>\n <li><em>event<\/em>\u00a0<em>text<\/em><\/li>\n <li>&#8230;<\/li>\n <li><strong>end<\/strong>, a collection of choices the user can make, with\u00a0<em>question<\/em>\u00a0being some text presented to the user. For each option, there is an\u00a0<em>event<\/em>naming where to go if that choice is made, and\u00a0<em>text<\/em>\u00a0being the option displayed in-game.<\/li>\n <\/ul>\n <\/li>\n <\/ul>\n <h3><a href=\"https:\/\/github.com\/Bananattack\/proze\/wiki\/Script-Syntax#values\" name=\"values\"><\/a>Values<\/h3>\n <p>For commands that take &#8220;values&#8221; without further clarification, these may either be literal integers like\u00a0<code>123<\/code>\u00a0or names of existing variables like\u00a0<code>hitpoints<\/code>.<\/p>\n <p>&nbsp;<\/p>\n <p>&#8212;<\/p>\n <p>&nbsp;<\/p>\n <p>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&#8217;s how things go!<\/p>\n <\/div>\n <\/div>","time":"April 26th, 2013 6:29 pm","title":"Almost That Time"}