SmartZoos / Toolset

Gaming platform for SmartZoos project
MIT License
0 stars 1 forks source link

Flashier ending of games #123

Open kaimikael opened 7 years ago

kaimikael commented 7 years ago

As a game designer, it would be nice if I could add an ending page to a game, so that when a player has finished all activity items, they can get suitable congratulations based on their score. This would require a set of messages, at the minimum text, but ideally images as well, from which one will be selected based on the number of points the player has collected. This message is then shown when the game is finished.

pjotrsavitski commented 7 years ago

This is a discussion item, unless concrete texts, images and logics are provided.

As of the moment, we do not give points for anything, just correctly or incorrectly answered questions.

kaimikael commented 7 years ago

Let's start from there. At the end of a game we know that we have x correctly answered questions out of a maximum of y, right? So a game designer could set up an activity and an endgame logic that says, e g: For x in [0, 5] display the following HTML fragment: For x in [6, 10] display the following HTML fragment: … For x in [y, y] display the following HTML fragment:

A trivial way of doing it is to have lines with min and max values for the selection and an input box similar to the ones we use for all the other HTML input. New lines can then be added for each selection we want to make.

I think it would make sense to explicitly assign points to answers (the default presumably being 1), since that would allow us to give more credit for more difficult questions, etc, but that is a separate issue, let's start with the simple version first.

pjotrsavitski commented 7 years ago

I'd propose starting with some general code-side logic and messages. That kind of approach should allow to be multilingual and would be looking the same for all games.

Allowing HTML input should still have limitations and use special cleaner modules to disallow anything not whitelisted (should also help prevent possible XSS issues).