{"id":48543927,"url":"https://github.com/jonathanperis/super-mango-editor","last_synced_at":"2026-05-16T21:15:24.712Z","repository":{"id":347361697,"uuid":"1193783543","full_name":"jonathanperis/super-mango-editor","owner":"jonathanperis","description":"Classic 2D side-scrolling platformer built with C and SDL2 — playable in the browser via WebAssembly","archived":false,"fork":false,"pushed_at":"2026-05-08T16:31:14.000Z","size":49385,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-08T16:36:13.614Z","etag":null,"topics":["2d-game","c","emscripten","game-development","gamedev","open-source","pixel-art","platformer","sdl2","webassembly"],"latest_commit_sha":null,"homepage":"https://jonathanperis.github.io/super-mango-editor/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonathanperis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"jonathanperis","buy_me_a_coffee":"jonathanperis"}},"created_at":"2026-03-27T15:20:22.000Z","updated_at":"2026-05-08T16:28:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"2d902fd2-2ae9-4f59-8efb-e42a3c2a6036","html_url":"https://github.com/jonathanperis/super-mango-editor","commit_stats":null,"previous_names":["jonathanperis/super-mango-game","jonathanperis/super-mango-editor"],"tags_count":158,"template":false,"template_full_name":null,"purl":"pkg:github/jonathanperis/super-mango-editor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanperis%2Fsuper-mango-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanperis%2Fsuper-mango-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanperis%2Fsuper-mango-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanperis%2Fsuper-mango-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonathanperis","download_url":"https://codeload.github.com/jonathanperis/super-mango-editor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanperis%2Fsuper-mango-editor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32795416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2d-game","c","emscripten","game-development","gamedev","open-source","pixel-art","platformer","sdl2","webassembly"],"created_at":"2026-04-08T06:01:20.997Z","updated_at":"2026-05-16T21:15:24.705Z","avatar_url":"https://github.com/jonathanperis.png","language":"C","funding_links":["https://github.com/sponsors/jonathanperis","https://buymeacoffee.com/jonathanperis"],"categories":[],"sub_categories":[],"readme":"# super-mango-editor\n\n\u003e 2D side-scrolling platformer written in C using SDL2 -- browser-playable via WebAssembly\n\n[![Build Check](https://github.com/jonathanperis/super-mango-editor/actions/workflows/build.yml/badge.svg?event=pull_request)](https://github.com/jonathanperis/super-mango-editor/actions/workflows/build.yml) [![Main Release](https://github.com/jonathanperis/super-mango-editor/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/jonathanperis/super-mango-editor/actions/workflows/build.yml) [![CodeQL](https://github.com/jonathanperis/super-mango-editor/actions/workflows/codeql.yml/badge.svg)](https://github.com/jonathanperis/super-mango-editor/actions/workflows/codeql.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\n**[Live demo →](https://jonathanperis.github.io/super-mango-editor/)** | **[Documentation →](https://jonathanperis.github.io/super-mango-editor/docs/)**\n\n---\n\n## About\n\nSuper Mango is a 2D side-scrolling platformer built in C11 with SDL2, designed as an educational project with well-commented source code that can be read as a learning resource for C + SDL2 game development. The game features multi-screen TOML levels with parallax backgrounds, one-way platforms, floating platforms, crumble bridges, floor gaps, collectible coins, climbable vines/ladders/ropes, six enemy types, seven hazard types, bouncepads, animated water, fog overlays, a start menu, HUD, level-completion summary, and next-phase flow. Levels are defined in TOML and loaded at runtime, with a standalone visual level editor for creating and editing levels. It renders at a 400x300 logical resolution scaled 2x to an 800x600 window for a chunky pixel-art look, with frame-rate-independent movement via delta-time physics. The project builds natively on macOS, Linux, and Windows, and compiles to WebAssembly via Emscripten for browser play.\n\n## Tech Stack\n\n| Technology | Version | Purpose |\n|-----------|---------|---------|\n| C | C11 | Language standard (`clang -std=c11`) |\n| SDL2 | 2.x | Window, renderer, input, events, timing |\n| SDL2_image | 2.x | PNG texture loading |\n| SDL2_ttf | 2.x | TrueType font rendering |\n| SDL2_mixer | 2.x | Sound effects and music |\n| tomlc17 | vendored | TOML v1.1 parser for level definitions |\n| Emscripten | latest | WebAssembly compilation for browser play |\n\n## Features\n\n- 2D side-scrolling platformer with dynamic multi-screen TOML worlds, from the 4-screen sandbox to longer volcanic stages\n- 32 render layers drawn back-to-front: parallax background, platforms, floor, enemies, player, fog, HUD, debug overlay\n- Delta-time physics for frame-rate-independent movement at 60 FPS (VSync + manual fallback)\n- Six enemy types: spiders, jumping spiders, birds, faster birds, fish, faster fish\n- Seven hazard types: spike rows, spike blocks, spike platforms, circular saws, axe traps, blue flames, fire flames\n- Collectibles: coins (100 pts each, 3 coins restore a heart), star yellow, star green, star red health pickups, end-of-level last star\n- Climbable vines, ladders, and ropes; three bouncepad variants (small, medium, high)\n- TOML-based level format with runtime level loading (`--level path/to/level.toml`) and `next_phase` transitions\n- Pause, game-over, and end-of-level overlays: Esc/Start pauses or resumes gameplay, game over waits for Enter/Start before restarting, and Enter/Start continues to the next phase when a completion overlay is shown\n- Start menu, HUD (hearts/lives/score), lives system, invincibility blink on damage\n- Keyboard and gamepad (hot-plug) controls\n- Debug overlay (`--debug` flag): FPS counter, CPU frame time, memory usage, collision hitbox visualization, scrolling event log\n- Builds natively on macOS, Linux, and Windows; WebAssembly build via Emscripten\n\n## Level Editor\n\nSuper Mango includes a standalone visual level editor built with C11 and SDL2. The editor lets you create and edit levels with a point-and-click interface, then save them as TOML files or export them as C source for embedding.\n\nEditor features:\n\n- Scrollable canvas with zoom, grid snapping, and select/place/delete tools\n- Entity palette with all game objects: platforms, enemies, hazards, collectibles, surfaces, effects\n- Per-entity property editing (position, size, speed, animation, behavior)\n- TOML serialization (save/load `.toml` level files)\n- C code exporter (generates `.c`/`.h` files for compiled-in levels)\n- Undo/redo history, copy/paste, recent files, autosave, and dirty-state indicators\n- Validation status for the active level; validation errors block save, export, and playtest\n- Native file dialogs\n- Headless smoke mode for CI (`--smoke-test`)\n\nBuild and run the editor:\n\n```sh\nmake editor       # build the editor binary into out/\nmake run-editor   # build and run the editor\n```\n\n## Development Crew\n\nSuper Mango is developed with the help of four specialized [Claude Code](https://docs.anthropic.com/en/docs/claude-code) agents, each owning a distinct part of the project. Call them by name with slash commands in any Claude Code session inside this repository.\n\n| Agent | Command | Role | Owns |\n|-------|---------|------|------|\n| **Bosser** | `/bosser-engineer` | Chief Engineer | C source, SDL2 engine, editor, Makefile, architecture, bug fixes |\n| **Lugio** | `/lugio-creator` | Level Builder | TOML level files, entity placement, theming, difficulty balancing |\n| **Goobma** | `/goobma-designer` | Pixel Art Designer | Sprite assets, palette remapping, frame layout analysis |\n| **Warro** | `/warro-inscriber` | Documentation Inscriber | README, CLAUDE.md, wiki, GitHub Pages docs, cross-referencing |\n\n### When to call whom\n\n| You want to... | Call |\n|----------------|------|\n| Add a new enemy, surface, or hazard type | `/bosser-engineer` |\n| Fix a bug or refactor engine code | `/bosser-engineer` |\n| Create a new level or redesign an existing one | `/lugio-creator` |\n| Design a new sprite or create a theme variant | `/goobma-designer` |\n| Update documentation or audit for accuracy | `/warro-inscriber` |\n\n### How to get the best results\n\n- **Be specific about what you want.** \"Add a spider that jumps higher\" gives Bosser a clear target. \"Make the game better\" does not.\n- **One agent at a time.** Each agent stays in their lane. If you ask Lugio to fix a bug, he'll tell you to call Bosser. That's by design.\n- **Bosser delegates.** If you're unsure who to call, start with `/bosser-engineer` -- he'll route the work to the right crew member or handle it himself.\n- **Lugio needs a theme.** When requesting a level, tell him the theme (forest, volcanic, sky), difficulty (easy/medium/hard), and length (number of screens). He'll ask if you don't.\n- **Goobma needs a reference.** When requesting a sprite, point him at an existing asset in the same category. He matches dimensions, palette, and style automatically.\n- **Warro verifies against code.** He reads source files and runs analysis tools before writing a single word. If the docs say one thing and the code says another, Warro trusts the code.\n\n## Getting Started\n\n### Prerequisites\n\nA C11-compatible compiler (`clang` or `gcc`), `make`, and the SDL2 development libraries.\n\n**macOS:**\n\n```sh\nbrew install sdl2 sdl2_image sdl2_ttf sdl2_mixer\nxcode-select --install   # provides clang and make\n```\n\n**Linux (Debian/Ubuntu):**\n\n```sh\nsudo apt update\nsudo apt install build-essential clang \\\n    libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libsdl2-mixer-dev\n```\n\n**Windows (MSYS2 UCRT64):**\n\n```sh\npacman -S mingw-w64-ucrt-x86_64-clang \\\n          mingw-w64-ucrt-x86_64-make \\\n          mingw-w64-ucrt-x86_64-SDL2 \\\n          mingw-w64-ucrt-x86_64-SDL2_image \\\n          mingw-w64-ucrt-x86_64-SDL2_ttf \\\n          mingw-w64-ucrt-x86_64-SDL2_mixer\n```\n\n**WebAssembly:** Install the [Emscripten SDK](https://emscripten.org/docs/getting_started/downloads.html) and ensure `emcc` is on `PATH`.\n\n### Quick Start\n\n```sh\nmake CC=clang                         # build the game binary into out/\nmake run CC=clang                     # build and run\nmake run-debug CC=clang               # build and run with debug overlay\nmake run-level CC=clang LEVEL=levels/00_sandbox_01.toml         # run a specific TOML level\nmake run-level-debug CC=clang LEVEL=levels/00_sandbox_01.toml   # run a level with debug overlay\nmake editor CC=clang                  # build the level editor\nmake run-editor CC=clang              # build and run the level editor\nmake test CC=clang                    # build and run 11 native regression tests\nmake validate-levels                  # validate all levels/*.toml files\nmake web                              # build to WebAssembly (requires Emscripten)\nmake clean                            # remove all build artifacts\n```\n\n\u003e For local/CI parity, pass `CC=clang` explicitly. GNU Make has a built-in `CC=cc`, so the Makefile's `CC ?= clang` default may not select clang on every machine unless overridden.\n\nOr just **[play in your browser](https://jonathanperis.github.io/super-mango-editor/)** -- no build required. Full project documentation is available at the **[docs site](https://jonathanperis.github.io/super-mango-editor/docs/)**.\n\n## Project Structure\n\n```\nsuper-mango-editor/\n├── Makefile                          Build system (clang, sdl2-config, ad-hoc codesign)\n├── levels/                           TOML level definitions\n│   ├── 00_sandbox_01.toml           Level data loaded at runtime\n│   ├── 01_lugio_01.toml             Level data loaded at runtime\n│   └── 02_lugio_02.toml             Level data loaded at runtime\n├── src/                              C source files and headers\n│   ├── main.c                        Entry point: SDL init/teardown\n│   ├── game.h                        Shared GameState/constants declarations\n│   ├── collectibles/                  Pickup items\n│   │   ├── coin.h / .c               Coin (100 pts, 3 restore a heart)\n│   │   ├── star_yellow.h / .c        Yellow star health pickup\n│   │   ├── star_green.h / .c         Green star health pickup\n│   │   ├── star_red.h / .c           Red star health pickup\n│   │   └── last_star.h / .c          End-of-level star\n│   ├── collision/                     Gameplay collision and damage passes\n│   ├── core/                          Runtime lifecycle, window/resources, loop, update, camera, completion\n│   │   ├── debug.h / .c              Debug overlay (FPS, CPU, memory, hitboxes, event log)\n│   │   ├── entity_utils.h / .c       Shared entity helper functions\n│   │   ├── game_lifecycle.c          game_init / game_cleanup orchestration\n│   │   ├── game_loop.c               Main native/WebAssembly game loop\n│   │   └── game_resources.h / .c     Texture, audio, and level resource loading\n│   ├── editor/                        Standalone visual level editor\n│   │   ├── editor_main.c             Editor entry point\n│   │   ├── editor.h / .c             Editor state, main loop, event handling\n│   │   ├── canvas.h / .c             Scrollable canvas with zoom and grid\n│   │   ├── palette.h / .c            Entity palette panel\n│   │   ├── properties.h / .c         Per-entity property editing\n│   │   ├── tools.h / .c              Selection, placement, and manipulation tools\n│   │   ├── ui.h / .c                 Immediate-mode UI widgets\n│   │   ├── serializer.h / .c         TOML save/load orchestration\n│   │   ├── serializer_load_*.h / .c  Staged TOML load helpers (header, geometry, collectibles, enemies, hazards, surfaces, climbables, layers, config)\n│   │   ├── exporter.h / .c           C code export (.c/.h generation)\n│   │   ├── file_dialog.h / .c        Native file dialogs\n│   │   └── undo.h / .c               Undo/redo history\n│   ├── effects/                       Visual effects\n│   │   ├── fog.h / .c                Fog overlay\n│   │   ├── parallax.h / .c           Multi-layer scrolling background\n│   │   └── water.h / .c              Animated water strip\n│   ├── entities/                      Enemies\n│   │   ├── spider.h / .c             Spider (ground patrol)\n│   │   ├── jumping_spider.h / .c     Jumping spider\n│   │   ├── bird.h / .c               Bird (sine-wave sky patrol)\n│   │   ├── faster_bird.h / .c        Fast bird\n│   │   ├── fish.h / .c               Fish (jumping water patrol)\n│   │   └── faster_fish.h / .c        Fast fish\n│   ├── hazards/                       Damaging obstacles\n│   │   ├── spike.h / .c              Ground spike rows\n│   │   ├── spike_block.h / .c        Rail-riding spike\n│   │   ├── spike_platform.h / .c     Elevated spike\n│   │   ├── circular_saw.h / .c       Rotating saw\n│   │   ├── axe_trap.h / .c           Swinging axe\n│   │   └── blue_flame.h / .c         Blue flame / fire flame\n│   ├── input/                         SDL keyboard/gamepad input handling\n│   ├── levels/                        Level system\n│   │   ├── level.h                    Shared level definitions (LevelDef struct)\n│   │   ├── level_loader.h / .c       TOML level loading and switching\n│   │   ├── level_physics.h / .c      Level physics override/default helpers\n│   │   ├── phase_transition.h / .c   next_phase resolution and progress helpers\n│   │   ├── level_validate.c          LevelDef count validation\n│   │   └── exported/                  Auto-generated C level data\n│   │       └── 00_sandbox_01.h / .c  Generated C level export\n│   ├── player/                        Player module\n│   │   └── player.h / .c             Input, physics, animation, render\n│   ├── render/                        Frame rendering and overlays\n│   ├── screens/                       Game screens\n│   │   ├── start_menu.h / .c         Start menu\n│   │   └── hud.h / .c                HUD (hearts, lives, score)\n│   └── surfaces/                      Traversable objects\n│       ├── platform.h / .c           One-way platform pillars (9-slice)\n│       ├── float_platform.h / .c     Hovering platforms (static/crumble/rail)\n│       ├── bridge.h / .c             Crumble walkways\n│       ├── bouncepad.h / .c          Bouncepad base + 3 variants (small/medium/high)\n│       ├── rail.h / .c               Rail path system\n│       ├── vine.h / .c               Climbable vine\n│       ├── ladder.h / .c             Climbable ladder\n│       └── rope.h / .c               Climbable rope\n├── assets/                            All game assets\n│   ├── sprites/                       PNG sprites and tilesets\n│   │   ├── backgrounds/              Parallax background layers\n│   │   ├── foregrounds/              Fog and foreground overlays\n│   │   ├── collectibles/             Coins, stars\n│   │   ├── entities/                 Enemy sprite sheets\n│   │   ├── hazards/                  Hazard sprite sheets\n│   │   ├── levels/                   Floor tiles and level-specific assets\n│   │   ├── player/                   Player sprite sheet\n│   │   ├── screens/                  Menu and HUD sprites\n│   │   ├── surfaces/                 Platforms, bridges, vines, ladders, ropes\n│   │   └── unused/                   Reserve assets from asset pack\n│   ├── sounds/                        WAV sound effects\n│   │   ├── collectibles/             Pickup sounds\n│   │   ├── entities/                 Enemy sounds\n│   │   ├── hazards/                  Hazard sounds\n│   │   ├── levels/                   Level music and ambient\n│   │   ├── player/                   Player action sounds\n│   │   ├── screens/                  Menu sounds\n│   │   ├── surfaces/                 Surface interaction sounds\n│   │   └── unused/                   Reserve sound files\n│   └── fonts/                         TrueType fonts\n│       └── round9x13.ttf            Debug overlay font\n├── vendor/                            Vendored third-party libraries\n│   └── tomlc17/                      TOML v1.1 parser (tomlc17.c/.h)\n├── tests/                             Native regression test harnesses\n├── docs/                              Astro GitHub Pages documentation site\n├── web/                               Emscripten shell template\n└── .github/workflows/                 CI/CD pipelines\n    ├── build.yml                      Build check (PRs) + release creation (main)\n    ├── codeql.yml                     Code security analysis\n    ├── docs.yml                       Docs lint/build checks\n    └── deploy.yml                     GitHub Pages deployment\n```\n\n## CI/CD\n\nFour GitHub Actions workflows:\n\n| Workflow | File | Trigger | Purpose |\n|----------|------|---------|---------|\n| Build \u0026 Release | `build.yml` | Push to `main`, pull requests | Multi-platform build (Linux x86_64, macOS arm64, Windows x86_64, WebAssembly); on main push: GitHub Release creation |\n| Docs | `docs.yml` | Docs pull requests, manual | Bun install, docs lint, and Astro docs build |\n| CodeQL | `codeql.yml` | Push/PR to `main`, weekly | Automated code security and quality analysis |\n| Deploy Pages | `deploy.yml` | Successful main Build \u0026 Release workflow | Builds docs, copies WebAssembly artifacts, and deploys GitHub Pages |\n\nThe Build \u0026 Release workflow runs `make`, `make test`, `make validate-levels`, `make editor`, native smoke tests for the game/editor, WebAssembly build, WebAssembly artifact checks, and release creation on `main`. The Docs workflow runs `bun run lint` and `bun run build` for PRs touching `docs/`. The Deploy Pages workflow publishes the Astro docs output plus WebAssembly artifacts to GitHub Pages.\n\n## License\n\nMIT -- see [LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanperis%2Fsuper-mango-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanperis%2Fsuper-mango-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanperis%2Fsuper-mango-editor/lists"}