Doodle is the game engine for Sketchy Maze written in Go.
https://www.sketchymaze.com/
Noah Petherbridge
27fafdc96d
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" |
||
---|---|---|
cmd/doodle | ||
draw | ||
events | ||
level | ||
render | ||
types | ||
.editorconfig | ||
.gitignore | ||
Changes.md | ||
config.go | ||
doodle.go | ||
fps.go | ||
log.go | ||
Makefile | ||
README.md | ||
screenshot.go |
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