Jump to content

3 Minute Adventure


Antriel
 Share

Recommended Posts

A short interactive story. Get equipment, go fight a dragon, talk with a princess. Epic adventure.

Created using Phaser 3 and Haxe, with custom (and for now very simple) "narration engine story" language for writing the actual story in and compiling down to data the game uses to handle the interactions.

trailer.gif.3d07b6105debeb37dac2e65ea900f9d6.gif

Play the game here: http://nextrealmgames.com/games/3-min-adventure/

You can put the game on your portal using this url. The game is also available for licensing.

Link to comment
Share on other sites

4 minutes ago, Milton said:

Great fun. I think if our hero does not want to come out of the closet you shouldn't force him to. You have to be PC these days

Hah :D Just to be safe: it's a reference to Stanley's Parable.

6 minutes ago, Milton said:

What externs are you using? (your own)?

Actually none. It's a bit cumbersome with all the untyped code, but so far it hasn't slowed me down more than making good externs would. I always planned on doing them, but didn't get around it so far. The code I wrote for the TS definitions would be a good entry point though.

Link to comment
Share on other sites

5 minutes ago, totor said:

you mean you don't use the haxe phaser3 bindings? so how do you bind your haxe code with phaser?

As soon as something is typed `Dynamic`, I can do whatever and Haxe won't complain (but won't autocomplete nor do any error checks). So if I got my `var scene:Dynamic`, I can do `scene.add.image(...)` without issues.
For creating objects in the first place, I either make dummy empty extern class that `implements Dynamic` (so I can make an instance and it acts as if it was Dynamic) or I do something like `var game = untyped __js__("new Phaser.Game()")`

It's not optimal as I said before, but given how little I actually access Phaser's API it's doable.

If there would be a major interest in Haxe externs for Phaser 3, I could look into porting the typescript definitions code I wrote into making Haxe externs too. But I can't justify it just for me and I can't afford such work financially right now anyway. There's https://github.com/sebbernery/haxe-phaser3 but I'm not sure how good they are, and they don't have comments.

Link to comment
Share on other sites

20 minutes ago, totor said:

i am curious about what a "narration story engine" looks like, is it like the ink language?

Never heard of ink language, looking at it, it does seem to have very similar concepts. I kind of went into it without doing any research (on purpose). Right now it's only a simple parser and compiler. The syntax looks like this:

You are sitting in a local pub, thinking about what you just heard.
"I repeat," says scared-looking peasant, "will you save our princess?"
[choice]
	Yes => [goto yes]
	I will think about it =>
		"Please sir knight! We are desperate!"
		[id choice] [choice]
			Yes => [goto yes]
			No => [goto no]
	No => [goto no]
[id no]
[if please=0] "Please!" [set please 1] [goto choice]
[if please=1] "Pleasee!" [set please 2] [goto choice]
[if please=2] "Pleaseee!" [goto choice]
[id yes] "That's wonderful! Praise you good knight. The dragon isn't even that big..."

It's supposed to be text first, with not too big emphasis on whitespace, although it does use tabs/offset to handle choice options and substories.
Plan is to gradually improve this, right now I'm adding syntax highlighting, then error checking, etc.

This gets compiled down to:

[...,
{"next":5,"type":0,"text":"You are sitting in a local pub, thinking about what you just heard."},
{"next":6,"type":0,"text":"\"I repeat,\" says scared-looking peasant, \"will you save our princess?\""},
{"type":1,"choices":[{"choice":"Yes","node":17},
{"choice":"I will think about it","node":7},
{"choice":"No","node":9}]},
{"next":8,"type":0,"text":"\"Please sir knight! We are desperate!\""},
{"type":1,"choices":[{"choice":"Yes","node":17},
{"choice":"No","node":9}]},
{"type":2,"condition":{"op":1,"left":{"op":5,"left":"please"},"right":{"op":0,"left":0}},"yes":10,"no":12},
{"next":11,"type":0,"text":"\"Please!\""},
{"next":8,"type":3,"id":"please","val":{"op":0,"left":1}},
{"type":2,"condition":{"op":1,"left":{"op":5,"left":"please"},"right":{"op":0,"left":1}},"yes":13,"no":15},
{"next":14,"type":0,"text":"\"Pleasee!\""},
{"next":8,"type":3,"id":"please","val":{"op":0,"left":2}},
{"type":2,"condition":{"op":1,"left":{"op":5,"left":"please"},"right":{"op":0,"left":2}},"yes":16,"no":17},
{"next":8,"type":0,"text":"\"Pleaseee!\""},
{"next":18,"type":0,"text":"\"That's wonderful! Praise you good knight. The dragon isn't even that big...\""},
...]

 

Link to comment
Share on other sites

3 hours ago, totor said:

nice and simple. I"d thought more of a visual story graph editor, things can get very messy when you have big stories with multiple narrative branches like in adventure gamebook as The Warlock of Firetop Mountain.
 

Visual editor might come later, I'm finding things out as I go. Not sure it would be more clear with big stories though, maybe just easier to build and see how it connects, but the details itself would probably be of same difficulty.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...