@ -1,3 +1,41 @@ |
|||||
# About Project: Doodle |
# About Project: Doodle |
||||
|
|
||||
Lorem ipsum. |
|
||||
|
Project: Doodle is a "drawing-based maze game" themed around hand-drawn mazes |
||||
|
on paper. |
||||
|
|
||||
|
![Screenshot of the level editor](../images/about.png) |
||||
|
|
||||
|
You can draw your own custom maps, freehand or with some basic drawing tools, |
||||
|
and then drag and drop pre-made "[doodads](doodads.md)" into your level for |
||||
|
interactive things like keys, doors and buttons. |
||||
|
|
||||
|
This is an **early alpha build** of the game. Longer term it will include a couple |
||||
|
built-in "single player campaigns" of multiple themed levels, but for now it |
||||
|
just includes a couple example levels and the editor itself. |
||||
|
|
||||
|
## Inspiration |
||||
|
|
||||
|
When I was a kid in the era of Sega Genesys and Super Nintendo, I liked to |
||||
|
draw my own levels with pen and paper and "play" them with my imagination. My |
||||
|
"mouse mazes" had all sorts of features borrowed from videogames I liked. |
||||
|
There were buttons that the player had to push that would open a door far |
||||
|
across the level (and I'd draw a little dotted line showing the connection |
||||
|
between the button and the door). Trapdoors would have the player fall through |
||||
|
and then close behind them so they can't go back. Keys in different shapes |
||||
|
could unlock doors in similar shapes (you'd just have to remember which keys |
||||
|
you've got!) |
||||
|
|
||||
|
When you're drawing with a pen and paper, the level can be anything you want. |
||||
|
You can draw a castle or a cave, place little gizmos and traps throughout the |
||||
|
level (doors, keys, buttons and things) to create puzzles. Do you want the red |
||||
|
pixels to mean "fire" and burn the player? Or do you want to decorate the tops |
||||
|
of "bloody" spikes with red? Either way, the 'fire' attribute on that color will |
||||
|
do the job and you can draw whatever shape you want for your level hazards. |
||||
|
|
||||
|
![Palette editor](../images/palette.png) |
||||
|
|
||||
|
## Mod Friendly |
||||
|
|
||||
|
While the game ships with a [handful of built-in doodads](doodads.md) to |
||||
|
spice up your level, you can also create your own and program them to do |
||||
|
whatever you want, with JavaScript! |
||||
|
@ -1,27 +1,35 @@ |
|||||
# Drawing a Doodad In-Game |
# Drawing a Doodad In-Game |
||||
|
|
||||
Project: Doodle has some **limited** support to draw your doodad sprites |
|
||||
in-game. Currently you can only draw one frame (image) for the doodad |
|
||||
and save it to disk. |
|
||||
|
Project: Doodle has support for drawing your custom doodad sprites in-game, |
||||
|
although for now you may find it more comfortable to use an |
||||
|
[external image editor](edit-external.md) instead. |
||||
|
|
||||
To start a new doodad, open the game and enter the level editor. |
|
||||
|
To start a new doodad, open the game and enter the level editor. Select the |
||||
|
"File -> New Doodad" menu at the top of the screen. You will be prompted for |
||||
|
the square dimensions of your doodad (i.e. `100` for a 100x100 sprite) and |
||||
|
you can begin editing. |
||||
|
|
||||
Select the "New Doodad" button at the top of the screen to start drawing a |
|
||||
new doodad. Choose the size (square) of its sprite when prompted. |
|
||||
|
![Screenshot of the Doodad editor](../images/doodad-editor.png) |
||||
|
|
||||
Doodads saved in-game go in your user config directory for the game. On Linux, |
|
||||
this is at ~/.config/doodle. |
|
||||
|
## Layers |
||||
|
|
||||
If you want to create a doodad with multiple frames (to animate it or have |
|
||||
varying states that change the doodad's appearance in the level), the |
|
||||
`doodad` tool is recommended. See |
|
||||
[drawing images in an external program](edit-external.md). |
|
||||
|
A key difference between Levels and Doodads are that Doodad drawings can have |
||||
|
multiple **layers**. For doodads these are used to store multiple frames of |
||||
|
animation or different states, such as an opened vs. closed door. |
||||
|
|
||||
|
Clicking the **Lyr.** button on the left toolbar or the "Tools -> Layers" |
||||
|
menu will open the Layers window where you can switch your editor between |
||||
|
layers, add and rename them. Layers can be toggled by the doodad's |
||||
|
[JavaScript code](scripts.md) by index number or by name, so giving each layer |
||||
|
a descriptive name is useful. |
||||
|
|
||||
|
Doodads saved in-game go in your [user config directory](../profile-directory.md) |
||||
|
on your system. |
||||
|
|
||||
## Future Planned Features |
## Future Planned Features |
||||
|
|
||||
Creating doodads in-game is intended to be a fully supported feature. The |
Creating doodads in-game is intended to be a fully supported feature. The |
||||
following features are planned to be supported: |
following features are planned to be supported: |
||||
|
|
||||
* Support editing multiple frames instead of only the first frame. |
|
||||
* Implement some features only available on the `doodad` tool using in-game |
* Implement some features only available on the `doodad` tool using in-game |
||||
UI, such as attaching JavaScripts to the doodad. |
UI, such as attaching JavaScripts to the doodad. |
||||
|
@ -0,0 +1,129 @@ |
|||||
|
# Doodads |
||||
|
|
||||
|
Project:Doodle comes with several built-in doodads that you can use in your |
||||
|
levels. You may also [create your own](custom-doodads/index.md) custom doodads |
||||
|
and program them to do whatever you want! |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## Flags |
||||
|
|
||||
|
The **Start Flag** sets the player spawn point in your level. There should be |
||||
|
only one start flag. |
||||
|
|
||||
|
The **Exit Flag** sets a goal point for the level. The player must touch this |
||||
|
flag to win the level. |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## Trapdoors |
||||
|
|
||||
|
Trapdoors come in four varieties: **Left**, **Right**, **Up**, or down (**Trapdoor**). |
||||
|
|
||||
|
A trapdoor is a one-way passage. If the player or other mobile doodad touches |
||||
|
the door from the "correct" side, the door will swing open. After the mobile |
||||
|
doodad has passed, the door will swing shut again. |
||||
|
|
||||
|
When the door is shut, you can not open it from the "wrong" side and it behaves |
||||
|
as a solid wall. If the door is open you may run in from the wrong side. |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## Locked Doors & Keys |
||||
|
|
||||
|
There are four pairs of **Colored Locked Doors and Keys** you can use on your level. |
||||
|
|
||||
|
Colored doors are locked and behave as a solid wall until the player or another |
||||
|
mobile doodad "picks up" the Key of the same color. The doors may then be |
||||
|
permanently unlocked if the player walks into them while holding the key. |
||||
|
|
||||
|
Should the player lose the keys later, previously opened doors will remain |
||||
|
unlocked but the player will need to find another key to open more doors. |
||||
|
|
||||
|
Each key/door pair also has a distinct shape: |
||||
|
|
||||
|
* **Red Key** (triangle) |
||||
|
* **Green Key** (cross) |
||||
|
* **Yellow Key** (star) |
||||
|
* **Blue Key** (diamond) |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## Electric Door |
||||
|
|
||||
|
The sci-fi electric door can only be opened when it receives a "power" signal |
||||
|
from a linked button or switch. See [Linked Doodads](#linked-doodads) below. |
||||
|
|
||||
|
When the door receives a "power: on" signal it will open and allow passage to |
||||
|
the player or other mobile doodads. When it receives a "power: off" signal it |
||||
|
will close. |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## Buttons |
||||
|
|
||||
|
**Buttons** will emit a "power: on" signal to all doodads that they are |
||||
|
[Linked](#linking-doodads) to when the button is pressed by the player or |
||||
|
another mobile doodad. |
||||
|
|
||||
|
When the button stops being pressed, it will emit a "power: off" signal to |
||||
|
all connected doodads, which will generally close electric doors. |
||||
|
|
||||
|
Buttons come in three varieties: |
||||
|
|
||||
|
* **Button:** a button with a grey arrow that pops back up when pressed. |
||||
|
* **Button Type B:** a variation without the grey arrow but behaves the same. |
||||
|
* **Sticky Button:** a button with a red arrow that stays pressed in once pressed. |
||||
|
|
||||
|
When a sticky button is pressed, it emits a "power: on" signal once and stays |
||||
|
pressed in forever. If the Sticky Button itself _receives_ "power: on" from another |
||||
|
button, it will pop back up. |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## Switches |
||||
|
|
||||
|
**Switches** will emit a `power: on` signal to [linked](#linked-doodads) doodads |
||||
|
when touched by the player or other mobile doodad, and then a `power: off` |
||||
|
signal when touched again. |
||||
|
|
||||
|
They come in various aesthetic flavors: |
||||
|
|
||||
|
* Wall switch (left, right) |
||||
|
* Floor switch |
||||
|
* On/Off "background" wall switch facing the screen |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## Crumbly Floor |
||||
|
|
||||
|
The **Crumbly Floor** behaves as a solid ceiling when hit from below, and a |
||||
|
solid floor when walked on from above, but watch out! The floor will shake |
||||
|
and collapse after a moment beneath your feet. |
||||
|
|
||||
|
The floor will respawn after a while and forbids passage from the underside |
||||
|
of the doodad. |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## State Blocks |
||||
|
|
||||
|
**State Blocks** are blue and orange squares that keep opposite state from one |
||||
|
another. In one state the block is solid, in another it is passable. |
||||
|
|
||||
|
The ON/OFF block will toggle all state blocks on the level to their opposite |
||||
|
setting whenever it's touched by the player or other mobile doodad. |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## Red Azulian (Test Mob) |
||||
|
|
||||
|
The red Azulian is a test mobile character. Not really an enemy, as he doesn't |
||||
|
care about the player. |
||||
|
|
||||
|
The Azulian's A.I. just has it run left and right until it meets resistance. |
||||
|
It can pick up keys, activate buttons and switches that it passes by, and can |
||||
|
unlock doors. |
||||
|
|
||||
|
This mob will probably go away in future releases of the game and will remain |
||||
|
in the code as a hidden easter egg. |
@ -0,0 +1,15 @@ |
|||||
|
# Experimental Features |
||||
|
|
||||
|
Some upcoming gameplay features that aren't _quite_ working well yet will |
||||
|
be 'hidden' behind some feature flags and not turned on by default. |
||||
|
|
||||
|
To start up the game with ALL experimental features enabled, pass the |
||||
|
--experimental option to the program's command line: |
||||
|
|
||||
|
```bash |
||||
|
# Unix-like environments |
||||
|
$ ./doodle --experimental |
||||
|
|
||||
|
# Windows. |
||||
|
> doodle.exe --experimental |
||||
|
``` |
@ -0,0 +1,172 @@ |
|||||
|
# Hacking |
||||
|
|
||||
|
This page discusses some advanced features of the game. |
||||
|
|
||||
|
I've always loved it when developers kept debugging features in their released |
||||
|
games, and playing around with those and figuring out what makes the game tick. |
||||
|
I purposely left some debug features in the game that you can play around with. |
||||
|
|
||||
|
## Developer Console |
||||
|
|
||||
|
Pressing the `Enter` key at any time will open the developer console at the |
||||
|
bottom of the screen (all gameplay logic is paused while the console is open). |
||||
|
|
||||
|
In the console you can type anything from simple commands, to hidden cheat |
||||
|
codes, to JavaScript commands to operate on some of the game's internal code! |
||||
|
|
||||
|
![Screenshot of the developer console](../images/shell.png) |
||||
|
|
||||
|
Pressing `Enter` again without typing a command will close the console. |
||||
|
|
||||
|
## Commands |
||||
|
|
||||
|
At the white **>** prompt you can type a command. Typing `help` will show |
||||
|
a listing of available commands; typing `help` and then a command name will |
||||
|
show further usage of that command. For example, `help echo`. |
||||
|
|
||||
|
The answer to your command is "flashed" in blue text at the bottom of the |
||||
|
screen and the developer console is closed. Pressing `Enter` will re-open the |
||||
|
console and show the recent history, including the answer to your last command. |
||||
|
|
||||
|
``` |
||||
|
>help echo |
||||
|
Usage: echo <message> |
||||
|
Flash a message back to the console |
||||
|
``` |
||||
|
|
||||
|
The following commands are supported: |
||||
|
|
||||
|
* `help`, `help <command>` |
||||
|
|
||||
|
Shows the list of commands, or further help on a specific command. |
||||
|
|
||||
|
* `echo <message>` |
||||
|
|
||||
|
Flashes your custom message on the bottom of the screen. |
||||
|
|
||||
|
* `alert <message>` |
||||
|
|
||||
|
Pop up an alert box modal with a custom message. |
||||
|
|
||||
|
* `new` |
||||
|
|
||||
|
Go to the "New Drawing" screen. |
||||
|
|
||||
|
* `save [filename]` |
||||
|
|
||||
|
Save the current drawing. If the drawing has not been saved |
||||
|
before, a filename is required, including the `.level` or |
||||
|
`.doodad` suffix. |
||||
|
|
||||
|
* `edit <filename>` |
||||
|
|
||||
|
Open a file for editing. The filename is a path on disk relative |
||||
|
to the game's working directory. |
||||
|
|
||||
|
* `play <filename>` |
||||
|
|
||||
|
Open a file for playing. The filename is a path on disk relative |
||||
|
to the game's working directory. A wrong filename will play a |
||||
|
new, blank level where Boy just falls to the bottom of the map. |
||||
|
|
||||
|
* `close` |
||||
|
|
||||
|
Close the current level being edited and return to the title screen. |
||||
|
|
||||
|
* `quit`, `exit` |
||||
|
|
||||
|
Close the developer console (an empty command would also work). |
||||
|
|
||||
|
## Cheat Codes |
||||
|
|
||||
|
Typing these messages in the console will toggle various mundane cheat |
||||
|
codes within the game: |
||||
|
|
||||
|
* `unleash the beast` |
||||
|
|
||||
|
Do not cap the frames per second target of 60, allowing the game |
||||
|
to run as fast as it's capable of. May or may not actually work. |
||||
|
|
||||
|
* `don't edit and drive` |
||||
|
|
||||
|
While playing a level, this makes the level canvas editable and |
||||
|
you can draw new pixels by clicking. Note that drawn pixels do not |
||||
|
"commit" to the level until you release the cursor. |
||||
|
|
||||
|
* `scroll scroll scroll your boat` |
||||
|
|
||||
|
While playing a level, this allows scrolling the level with arrow |
||||
|
keys as if you're editing it. The camera still keeps the player |
||||
|
character in view. |
||||
|
|
||||
|
* `import antigravity` |
||||
|
|
||||
|
While playing a level, this turns off gravity for the player |
||||
|
character. In this state the arrow keys can freely move the |
||||
|
character in any direction. [Relevant xkcd](https://xkcd.com/353/) |
||||
|
|
||||
|
* `ghost mode` |
||||
|
|
||||
|
Disable collision detection for the player character. This |
||||
|
will also enable antigravity, otherwise you would fall to the |
||||
|
bottom of the level. |
||||
|
|
||||
|
* `give all keys` |
||||
|
|
||||
|
Gives all four colored keys to the player. |
||||
|
|
||||
|
* `drop all items` |
||||
|
|
||||
|
Removes all keys and items from the player's inventory. |
||||
|
|
||||
|
## JavaScript Shell |
||||
|
|
||||
|
The developer console also features a JavaScript shell, which exposes |
||||
|
many of the game's internal data types and functions that can be |
||||
|
useful when debugging the game, or just fun to see what you can |
||||
|
break within the game! |
||||
|
|
||||
|
In the developer console, the `eval` or `$` command will run a single |
||||
|
line of JavaScript code. |
||||
|
|
||||
|
``` |
||||
|
>$ 2 + 2 |
||||
|
4 |
||||
|
>$ d.Flash("This is %s", d.Title()) |
||||
|
This is Project: Doodle v0.4.0-alpha |
||||
|
``` |
||||
|
|
||||
|
The following native objects are exposed to the JavaScript shell: |
||||
|
|
||||
|
* `d` is the master game object. |
||||
|
* `function RGBA(red, green, blue, alpha uint8)` creates a native |
||||
|
Color type, each value is range 0 to 255 |
||||
|
* `function Point(x, y int)` creates a native Point type. |
||||
|
* `function Rect(x, y, w, h int)` creates a native Rect type. |
||||
|
* `function Tree(ui.Widget)` prints a tree of UI widgets drawn on the |
||||
|
screen -- if you can find the widgets somewhere under `d` |
||||
|
|
||||
|
``` |
||||
|
>$ RGBA(255, 153, 0, 230).String() |
||||
|
Color<#ff9900+e6> |
||||
|
>$ Object.keys(d) |
||||
|
Debug,Engine,Scene,ConfirmExit,DrawCollisionBox,DrawDebugOverlay,... |
||||
|
>$ typeof(d.Debug) |
||||
|
boolean |
||||
|
>$ typeof(d.Flash) |
||||
|
function |
||||
|
>$ d.Flash("Flash a custom message, like the `echo` command") |
||||
|
undefined |
||||
|
>$ d.EditDrawing("filename.level") |
||||
|
``` |
||||
|
|
||||
|
It helps if you run Project: Doodle itself from a command line terminal, |
||||
|
so you can see its developer console output also on your terminal |
||||
|
window. Using `Object.keys(d)` will show all the exported functions and |
||||
|
variables from the internal game state. |
||||
|
|
||||
|
Understanding that my game's [rendering engine](https://git.kirsle.net/go/render) and |
||||
|
[user interface toolkit](https://git.kirsle.net/go/ui) are open source projects |
||||
|
you can have fun reconfiguring widgets to change colors or whatever. |
||||
|
|
||||
|
![Screenshot of the JavaScript REPL](../images/jsrepl.png) |
@ -0,0 +1,54 @@ |
|||||
|
# Shortcut Keys |
||||
|
|
||||
|
Here are all the hotkeys/shortcuts used within Project: Doodle. |
||||
|
|
||||
|
* [Global Shortcuts](#global-shortcuts) |
||||
|
* [Level Editor](#editor-only) |
||||
|
* [Gameplay](#gameplay-only) |
||||
|
|
||||
|
## Global Shortcuts |
||||
|
|
||||
|
| Key | Action | |
||||
|
|----------|------------------------------------------------------------| |
||||
|
| `Escape` | Exit the application (after confirmation modal). | |
||||
|
| `F1` | Open the Guidebook (this site). | |
||||
|
| `Enter` | Open the [developer console](hacking.md#developer-console) | |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## Editor Only |
||||
|
|
||||
|
Only while editing a level or doodad: |
||||
|
|
||||
|
| Key | Action | |
||||
|
|----------|------------------------------------------------------| |
||||
|
| Arrows | Scroll the view of the level you're editing. | |
||||
|
| `p` | Playtest the current level (press `e` to edit again) | |
||||
|
| `d` | Open the Doodads window to drop them in your level | |
||||
|
| `f` | Pencil Tool (**f**reehand) | |
||||
|
| `l` | **L**ine Tool | |
||||
|
| `r` | **R**ectangle Tool | |
||||
|
| `c` | Ellipse Tool (**c**ircles) | |
||||
|
| `x` | Eraser Tool | |
||||
|
| `+=` | Zoom in (with [--experimental](experimental.md)) | |
||||
|
| `-_` | Zoom out ([--experimental](experimental.md)) | |
||||
|
| `1` | Reset zoom ([--experimental](experimental.md)) | |
||||
|
| `0` | Scroll level back to origin (0,0) | |
||||
|
| `Ctrl-N` | Create a new level | |
||||
|
| `Ctrl-S` | Save the current drawing | |
||||
|
| `Ctrl-O` | Open a drawing | |
||||
|
| `Ctrl-Z` | Undo | |
||||
|
| `Ctrl-Y` | Redo | |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
## Gameplay Only |
||||
|
|
||||
|
| Key | Action | |
||||
|
|---------|----------------------------------------------------------| |
||||
|
| `Left` | Move the player character towards the left. | |
||||
|
| `Right` | Move the player character towards the right. | |
||||
|
| `Up` | Jump | |
||||
|
| `e` | Return to the level editor (only if you game from there) | |
||||
|
|
||||
|
|
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 79 KiB |
After Width: | Height: | Size: 687 B |
After Width: | Height: | Size: 717 B |
After Width: | Height: | Size: 709 B |
After Width: | Height: | Size: 626 B |
After Width: | Height: | Size: 679 B |
After Width: | Height: | Size: 709 B |
After Width: | Height: | Size: 752 B |
After Width: | Height: | Size: 648 B |
@ -0,0 +1,10 @@ |
|||||
|
# Profile Directory |
||||
|
|
||||
|
Project: Doodle stores your user-created levels and custom doodads in your |
||||
|
operating system's profile directory for your account. |
||||
|
|
||||
|
This will typically be found at the following locations based on your platform: |
||||
|
|
||||
|
* **Linux:** `$XDG_CONFIG_HOME` or `$HOME/.config/doodle` |
||||
|
* **Windows:** `%APPDATA%` or `C:\Users\%USER%\AppData\Roaming\doodle` |
||||
|
* **Mac OS:** `$HOME/Library/Application Support/doodle` |