2016-01-15 03:06:03 +02:00
|
|
|
# Your game goes here
|
2016-01-15 10:10:12 +02:00
|
|
|
dialogue "Yes", "start", "question2", """
|
|
|
|
Good, because you'll have to read the sources. A lot.
|
|
|
|
|
|
|
|
Salet is *not* a library or a framework you can slap something on.
|
|
|
|
It's more a game you can hack into your game.
|
|
|
|
(Like Undum, yeah.)
|
|
|
|
|
|
|
|
I hope to change that in the future but for now it's a weird mix of CoffeeScript classes and Undum core Javascript functions.
|
|
|
|
And Undum is notorious for making some hardcoded calls to how your game should *look and feel*.
|
|
|
|
The point of Salet is to have some freedom to change the user interface however you like.
|
|
|
|
But you'll have to code it first.
|
|
|
|
|
|
|
|
For example, notice the lack of "Character" section?
|
|
|
|
The qualities and tools?
|
|
|
|
The functionality is still there but you'll have to style it yourself if you want it.
|
|
|
|
|
|
|
|
So, that's the bad news. The good news are just a click ahead of you.
|
|
|
|
"""
|
|
|
|
|
|
|
|
dialogue "No", "start", "question2", """
|
|
|
|
Okay, this is going to be tough but you'll have to pick up *something* to use this.
|
|
|
|
|
|
|
|
Salet is *not* a library or a framework you can slap something on.
|
|
|
|
It's more a game you can hack into your game. (Like Undum, yeah.)
|
|
|
|
|
|
|
|
There is no cool editor or clear instructions.
|
|
|
|
You'll have to copy the source code and edit the CoffeeScript files in the `game` folder.
|
|
|
|
Then *compile* them.
|
|
|
|
|
|
|
|
So, that's the bad news. The good news are just a click ahead of you.
|
|
|
|
"""
|
|
|
|
|
|
|
|
dialogue "Dialogue functions", "question2", "world", """
|
|
|
|
Let's start with a relatively small feature: dialogues.
|
|
|
|
|
|
|
|
Undum's arguably not the best thing for menu-style dialogues because while it gives the author a great dialogue engine,
|
|
|
|
he has to write a lot of code for a single reply.
|
|
|
|
So I did a shortcut function.
|
|
|
|
|
|
|
|
This is Undum's implicit choice, which you can use in you dialogues or floating modules:
|
|
|
|
|
|
|
|
dialogue "Title", "start_tag", "end_tag", "content", "code"
|
|
|
|
|
|
|
|
where:
|
|
|
|
|
|
|
|
* `title` is a text the player clicks on,
|
|
|
|
* `start_tag` is a tag for *this* room (no `#` or arrays),
|
|
|
|
* `end_tag` is a tag for the choices in this room (no `#` or arrays)
|
|
|
|
* `code` is a piece of Javascript that gets executed once the player clicks on a choice.
|
|
|
|
|
|
|
|
You still need to write a Situation for each reply, sorry.
|
|
|
|
But now you can do it faster!
|
|
|
|
|
|
|
|
Okay, with this aside, let me show you... The World.
|
|
|
|
"""
|
|
|
|
|
|
|
|
room "world",
|
|
|
|
tags: ["world"],
|
|
|
|
optionText: "Enter the world",
|
|
|
|
ways: ["university"]
|
|
|
|
content: """
|
|
|
|
### Rhinestone Room
|
|
|
|
|
|
|
|
You're in a large room carved inside a giant milky rock mountain.
|
|
|
|
The floor and walls are littered with signs and signatures of the previous visitors.
|
2016-01-15 03:06:03 +02:00
|
|
|
|
2016-01-15 10:10:12 +02:00
|
|
|
A steep narrow #{textlink("well", "well")} proceeds upward.
|
2016-01-15 03:06:03 +02:00
|
|
|
"""
|
2016-01-15 10:10:12 +02:00
|
|
|
writers:
|
|
|
|
well: "There is only one passage out. See the „Other rooms“ block popped up? Click it."
|
2016-01-15 03:06:03 +02:00
|
|
|
|
2016-01-15 10:10:12 +02:00
|
|
|
room "university",
|
2016-01-15 03:06:03 +02:00
|
|
|
before: () ->
|
|
|
|
undum.game.situations["supermarket"].destination()
|
|
|
|
"""
|
|
|
|
You leave the University.
|
|
|
|
"""
|
|
|
|
content: """
|
|
|
|
Okay, now to the supermarket.
|
|
|
|
"""
|
|
|
|
|
|
|
|
room "supermarket",
|
|
|
|
content: """
|
|
|
|
A trendy supermarket.
|
|
|
|
"""
|