Doodle is the game engine for Sketchy Maze written in Go. https://www.sketchymaze.com/
Go to file
Noah Petherbridge 27fafdc96d Save and restore maps as JSON files
First pass at a level storage format to save and restore maps.

To save a map: press F12. It takes a screenshot PNG into the
screenshots/ folder and outputs a map JSON in the working directory.

To restore a map: "go run cmd/doodle/main.go map.json"
2018-06-17 10:31:44 -07:00
cmd/doodle Save and restore maps as JSON files 2018-06-17 10:31:44 -07:00
draw Save and restore maps as JSON files 2018-06-17 10:31:44 -07:00
events Milestone: Screenshot to PNG Test Feature 2018-06-17 07:56:51 -07:00
level Save and restore maps as JSON files 2018-06-17 10:31:44 -07:00
render Stabilize frame rate, add debug overlay 2018-06-16 19:59:23 -07:00
types Save and restore maps as JSON files 2018-06-17 10:31:44 -07:00
.editorconfig Initial commit 2017-10-26 18:03:11 -07:00
.gitignore Save and restore maps as JSON files 2018-06-17 10:31:44 -07:00
Changes.md Milestone: Screenshot to PNG Test Feature 2018-06-17 07:56:51 -07:00
config.go Stabilize frame rate, add debug overlay 2018-06-16 19:59:23 -07:00
doodle.go Save and restore maps as JSON files 2018-06-17 10:31:44 -07:00
fps.go Milestone: Screenshot to PNG Test Feature 2018-06-17 07:56:51 -07:00
log.go Stabilize frame rate, add debug overlay 2018-06-16 19:59:23 -07:00
Makefile Some initial pixel drawing with the mouse 2017-10-26 19:26:54 -07:00
README.md Milestone: Screenshot to PNG Test Feature 2018-06-17 07:56:51 -07:00
screenshot.go Save and restore maps as JSON files 2018-06-17 10:31:44 -07:00

Doodle

Milestones

As a rough idea of the milestones needed for this game to work:

SDL Paint Program

  • Create a basic SDL window that you can click on to color pixels.
    • Connect the pixels while the mouse is down to cover gaps.
  • Implement a "screenshot" button that translates the canvas to a PNG image on disk.
    • F12 key to take a screenshot of your drawing.
    • It reproduces a PNG image using its in-memory knowledge of the pixels you have drawn, not by reading the SDL canvas. This will be important for making the custom level format later.
    • The PNG I draw looks slightly different to what you see on the SDL canvas; maybe difference between Renderer.DrawLine() and my own algorithm or the anti-aliasing.
  • Create a custom map file format (protobufs maybe) and "screenshot" the canvas into this custom file format.
  • Make the program able to read this file format and reproduce the same pixels on the canvas.

Platformer

  • Start implementing a platformer that uses the custom map format for its rendering and collision detection.
  • ???

Building

Fedora dependencies:

$ sudo dnf install SDL2-devel SDL2_ttf-devel