user: I want to make a fantasy-themed endless runner game. Give me a game design document detailing the basic lore, enemies, mechanics, abilities, power-ups, skills, artstyle etc. for this game. I don't want a generic theme for the game. It should also have a gimmick that makes the game easy to learn but hard to master.

assistant: Game Design Document: "Fantasy Runners"

I. Introduction
Fantasy Runners is an endless runner game with a unique fantasy theme. The player controls a character who must run through a magical, mystical world filled with danger and adventure. The game combines fast-paced action with strategic elements, making it easy to learn but challenging to master.

II. Lore
In a far-off land, the players will experience a world filled with magic and wonder. A world where dragons, unicorns, and other mystical creatures roam free. The player is a hero on a quest to save the kingdom from the forces of darkness. They must use their agility and cunning to avoid danger and collect valuable treasures along the way.

III. Art Style
The art style of Fantasy Runners is vibrant and imaginative, inspired by classic fantasy literature and RPGs. The environment is rich with detail, with lush forests, rugged mountains, and sprawling cities to explore. Character designs are whimsical and distinctive, and each enemy and power-up has a unique look and feel.

IV. Mechanics
Fantasy Runners is an endless runner game, meaning that the player must run as far as possible without dying. The game is played from a side-scrolling perspective, and the player must jump, slide, and dodge obstacles to progress. The player must also collect coins and other items along the way to increase their score and purchase upgrades.

V. Abilities
The player character has a variety of abilities that can be used to overcome obstacles and defeat enemies. These abilities include:

Jump: The player can jump over obstacles and gaps.
Slide: The player can slide under low obstacles.
Dash: The player can perform a quick dash to avoid danger.
Magic: The player can use magic to defeat enemies and break obstacles.
VI. Power-Ups
Fantasy Runners features a variety of power-ups that can be collected during the game. These power-ups include:

Coin Magnet: Attracts coins to the player, making it easier to collect them.
Shield: Protects the player from damage.
Speed Boost: Increases the player's running speed.
Fireball: Allows the player to shoot fireballs and defeat enemies.
VII. Skills
In addition to abilities and power-ups, the player can also unlock and upgrade skills as they progress through the game. These skills include:

Double Jump: Allows the player to jump twice in quick succession.
Wall Climb: Allows the player to climb walls and reach higher areas.
Magic Bolt: An upgraded version of the magic ability, with increased damage and range.
VIII. Enemies
Fantasy Runners features a variety of enemies that the player must avoid or defeat. These enemies include:

Goblins: Small, green creatures that attack the player.
Dragons: Large, fearsome creatures that breathe fire.
Wizards: Powerful mages who use magic to attack the player.
Skeletons: Undead warriors who wield swords and shields.
IX. Gimmick
The gimmick of Fantasy Runners is its unique "choice" system. Throughout the game, the player will encounter branching paths and must make decisions about which way to go. These choices can have a big impact on the player's experience, altering the path they take, the enemies they encounter, and the power-ups they collect. This creates a sense of unpredictability and keeps the game fresh and exciting.

X. Conclusion
Fantasy Runners is a fast-paced, action-packed endless runner game with a unique fantasy theme. The game is easy to learn but challenging to master, with a variety of abilities, power-ups, skills, and enemies to keep players engaged. The choice system adds an extra layer of depth and strategy, making each run different from the last. The whimsical art style and rich lore create an immersive world that players will want to explore. With its addictive gameplay, Fantasy Runners is sure to be a hit with players of all ages.

user: Write a character controller that maps keystrokes to the different character abilities described.

assistant: Here is pseudocode how a character controller might look like: 

PROCEDURE handle_keyboard_input(event)
    IF event is a KEYDOWN event THEN
        IF event.key is UP arrow THEN
            Perform jump ability
        ELSE IF event.key is DOWN arrow THEN
            Perform slide ability
        IF event.key is UP arrow AND event.mod is SHIFT THEN
            Perform dash ability
        ELSE IF event.key is LEFT arrow THEN
            Perform move left ability
        ELSE IF event.key is RIGHT arrow THEN
            Perform move right ability
        ELSE IF event.key is SPACEBAR THEN
            Perform attack ability
    END IF
END PROCEDURE

WHILE program is running DO
    FOR each event in event queue DO
        IF event is a QUIT event THEN
            Quit program
        ELSE
            handle_keyboard_input(event)
    END FOR
END WHILE