Doodle is the game engine for Sketchy Maze written in Go. https://www.sketchymaze.com/
 
 
 
 
 
 
Go to file
Noah b17ca34de2 Bindata: Embedding Doodads and Levels (for WASM)
* Use `go-bindata` to embed built-in doodads and levels directly into
  the Doodle binary. `make bindata` produces the bindata source file.
* Add `FromJSON()` method to Levels and Doodads to load objects from
  JSON strings in memory (for bindata built-ins or WASM ajax requests)
* Update file loading functions to check the embedded bindata files.
  * pkg/config.go#EditFile:
    * Supports editing a level from bindata (TODO: remove this support)
    * If the "assets/levels/%(simple-name.level)" exists in bindata,
      edits that drawing.
    * No such support for editing built-in doodads.
    * WASM has no filesystem access to edit files except built-in
      levels (yet)
  * pkg/doodads#ListDoodads:
    * Prepends built-in doodads from bindata to the returned list.
    * WASM: no filesystem access so gets only the built-ins.
  * pkg/doodads#LoadFile:
    * Checks built-in bindata store first for doodad files.
    * WASM: tries an HTTP request if not found in bindata but can go no
      further if not found (no filesystem access)
  * pkg/filesystem#FindFile:
    * This function finds a level/doodad by checking all the places.
    * If the level or doodad exists in bindata built-in, always returns
      its system path like "assets/doodads/test.doodad"
    * WASM: always returns the built-in candidate path even if not found
      in bindata so that ajax GET can be attempted.
  * pkg/level#ListSystemLevels:
    * New function that lists the system level files, similar to the
      equivalent doodads function.
    * Prepends the bindata built-in level files.
    * WASM: only returns the built-ins (no filesystem support)
    * Desktop: also lists and returns the assets/levels/ directory.
  * pkg/level#LoadFile:
    * Like the doodads.LoadFile, tries from built-in bindata first, then
      ajax request (WASM) before accessing the filesystem (desktop)
* Menu Scene: TODO, list the built-in levels in the Load Level menu.
  This feature will soon go away when WASM gets its own storage for user
  levels (localStorage instead of filesystem)
2019-06-27 15:07:34 -07:00
assets/wallpapers Add blank white wallpaper 2019-06-25 18:10:57 -07:00
cmd Add Branding Module for Centralized Game Info 2019-06-23 17:52:48 -07:00
dev-assets/doodads WASM Texture Caching 2019-06-27 12:03:52 -07:00
docker Fedora Dockerfile for building 2019-04-05 13:16:33 -07:00
docs Clean up documentation 2019-06-25 18:58:48 -07:00
lib Refactor Render Texture-Cache Interface 2019-06-27 13:01:01 -07:00
pkg Bindata: Embedding Doodads and Levels (for WASM) 2019-06-27 15:07:34 -07:00
types Save and restore maps as JSON files 2018-06-17 10:31:44 -07:00
wasm Texture Caching for WASM Canvas Engine 2019-06-26 22:44:08 -07:00
.editorconfig Initial commit 2017-10-26 18:03:11 -07:00
.gitignore Bindata: Embedding Doodads and Levels (for WASM) 2019-06-27 15:07:34 -07:00
Building.md Initial WebAssembly Build Target 2019-06-26 18:40:40 -07:00
Changes.md Milestone: Screenshot to PNG Test Feature 2018-06-17 07:56:51 -07:00
Debug Notes.md Add JS + History to Shell, Add Main Scene 2018-07-25 19:38:54 -07:00
Ideas.md Port over code from old collision dev PR 2019-04-09 19:17:56 -07:00
Makefile Bindata: Embedding Doodads and Levels (for WASM) 2019-06-27 15:07:34 -07:00
README.md Clean up documentation 2019-06-25 18:58:48 -07:00
kirsle.env Draw Actors Embedded in Levels in Edit Mode 2018-10-19 13:32:25 -07:00
mp2json.py WIP: MsgPack stubs, Level Filesystem Module 2019-05-06 12:41:46 -07:00

README.md

Project: Doodle (Working Title)

Project: Doodle is a drawing-based maze game written in Go.

Features

(Eventually), the high-level, user-facing features for the game are:

  • Draw your own levels freehand and then play them like a 2D platformer game.
  • In Adventure Mode you can play through a series of official example levels that ship with the game.
  • In Edit Mode you can draw a map freehand-style and lay down physical geometry, and mark which lines are solid or which ones behave like fire.
  • Drag and drop Doodads like buttons, doors and keys into your level and link them together so that buttons open doors and levers activate devices.
  • In Play Mode you can play your level as a 2D platformer game where you collect keys, watch out for enemies, and solve puzzles to get to the exit.
  • Easily Share your custom maps with friends.

Mod-friendly

(Eventually) all these features will support custom content in the game:

  • Users can create Custom Doodads to extend the game with a scripting language like JavaScript. The sprites and animations are edited in-game in Edit Mode, but the scripting is done in your text editor.
  • In Edit Mode you can drag custom doodads into your maps.
  • To Share your maps, you can choose to bundle the custom doodads inside your map file itself, so that other players can play the map without needing to install the doodads separately.
  • If you receive a map with custom doodads, you can install the doodads into your copy of the game and use them in your own maps.

Keybindings

Global Keybindings:

Escape
  Close the developer console if open, without running any commands.
  Exit the program otherwise.

Enter
  Open and close the developer console, and run commands while the
  console is open.

F3
  Toggle the Debug Overlay.

F4
  Toggle debug collision hitboxes.

In Play Mode:

Cursor Keys
  Move the player around.
"E" Key
  Edit the map you're currently playing if you came from Edit Mode.

In Edit Mode:

Cursor Keys
  Scroll the view of the map around.
"P" Key
  Playtest the current map you're working on.

Built-In Doodads

A brief introduction to the built-in doodads available so far:

  • Characters
    • Blue Azulian: this is used as the play character for now. If dragged into a level, it doesn't do anything but is affected by gravity.
    • Red Azulian: an example mobile mob for now. It walks back and forth, changing directions only when it comes across an obstacle and can't proceed any further.
  • Doors and Keys
    • Colored Doors: these act like solid barriers until the player or another doodad collects the matching colored key.
    • Colored Keys: these are collectable items that allow the player or another doodad to open the door of matching color. Note that inventories are doodad-specific, so other mobs besides the player can steal a key before the player gets it! (For now)
    • Electric Door: this mechanical door stays closed and only opens when it receives a power signal from a linked button.
    • Trapdoor: this door allows one-way access, but once it's closed behind you, you can't pass through it from that side!
  • Buttons
    • Button: while pressed by a player or other doodad, the button emits a power signal to any doodad it is linked to. Link a button to an electric door, and the door will open while the button is pressed and close when the button is released.
    • Sticky Button: this button will stay pressed once activated and will not release unless it receives a power signal from another linked doodad. For example, one Button that links to a Sticky Button will release the sticky button if pressed.

Developer Console

Press Enter at any time to open the developer console.

Commands supported:

new
  Show the "New Level" screen to start editing a new map.

save [filename]
  Save the current map in Edit Mode. The filename is required if the map has
  not been saved yet.

edit [filename]
  Open a map or doodad in Edit Mode.

play [filename]
  Open a map in Play Mode.

echo <text>
  Flash a message to the console.

clear
  Clear the console output history.

exit
quit
  Close the developer console.

Building

Fedora dependencies:

$ sudo dnf install SDL2-devel SDL2_ttf-devel

Author

Copyright (C) 2019 Noah Petherbridge. All rights reserved.