GB Studio Guide

How to Build a Super Mario-Inspired Game in GB Studio and Serve It on gb.spqw.net

This guide is for making a side-scrolling, jump-driven Game Boy platformer that captures the feel of early Mario games without copying Nintendo art, names, characters, music, or level layouts. It covers design constraints, asset prep, scene setup, event logic, level structure, performance limits, web export, and the simplest deployment shape for gb.spqw.net.

Target GB Studio web-exported platformer with Game Boy constraints intact.
Best Fit A compact 2D platformer with clear jump arcs, enemy timing, checkpoints, and short levels.
Avoid Direct Nintendo IP reuse, oversized scenes, too many animated sprites, and single-scene mega-levels.
Legal line: copy structure, pacing, verbs, and readability, not protected expression. Make your own hero, enemy designs, tiles, music, world map, item names, and UI framing.

1. What GB Studio Is Good At

GB Studio is strongest when you design around Game Boy rules instead of fighting them. A Mario-inspired game works best if you keep movement readable, level chunks compact, enemy patterns simple, and collectible logic event-driven rather than physics-heavy.

2. Current Technical Constraints You Need to Design Around

The official GB Studio docs remain the source of truth for hard limits. The most important ones for a platformer are these:

Area Constraint Why it matters for a Mario-like game
Backgrounds PNGs in assets/backgrounds, 4-color palette, dimensions in multiples of 8px, minimum 160x144, maximum width/height 2040px, max 192 unique 8x8 tiles. Your terrain kit must be modular. Ground, pipes, bricks, clouds, and slopes need heavy tile reuse.
Sprites PNGs in assets/sprites, 4-color sprite palette, frames are 16x16 arranged horizontally. Animated actors commonly use 96x16 sheets. Every extra enemy animation costs budget. Keep enemies simple and reuse shared frames.
Web export Export Web builds to $PROJECT_ROOT/build/web with touch controls on mobile. Deployment is just static hosting. No backend is required unless you add analytics or scoreboards.
Custom events Reusable event procedures can take variables and actor inputs. Use them for stomps, hit reactions, coin pickup, checkpoints, and scene transitions so stage scripts stay maintainable.
Engine eject You can eject engine code if you are comfortable editing GBDK source. Treat this as optional. Most platformer work should stay inside normal GB Studio unless you need deeper engine changes.

3. The Recommended Project Shape

Start with one world, three stages, and one repeatable gameplay loop.

  1. Stage 1 teaches movement, jump timing, and basic enemy avoidance.
  2. Stage 2 introduces moving risk: pits, narrow jumps, faster enemies.
  3. Stage 3 tests mastery and ends with a clear goal actor or exit trigger.

Keep your first version small. A tight vertical slice is better than a half-finished world map.

Core systems to implement first

4. Make It Mario-Inspired Without Copying Mario

The safest way to reference Mario is through design grammar, not direct imitation. Think in terms of verbs and cadence.

Use Avoid
Momentum-based jumps, readable enemy pacing, secret rewards, block chains. Mario, Luigi, Goombas, Koopas, pipes, mushrooms, coins, or level copies.
Original brick, stone, grass, machine, cloud, or cave themes. 1-1 remakes, castle clones, or direct palette-swapped Nintendo tiles.
Custom mascot, custom item economy, custom UI language. Question blocks, Fire Flower analogs, star clones, or ripped SFX/music.

5. Asset Pipeline

Background art

Sprites

UI

6. Scene Construction for Platformers

Treat each GB Studio scene as one gameplay chunk. If a level is long, split it into scenes connected by edge transitions, doors, or checkpoint warps.

This reduces script complexity, lowers per-scene asset pressure, and keeps collision editing manageable.

Collision approach

7. Event Logic You Will Actually Need

A good GB Studio platformer stays understandable by making most logic reusable. Build these as Custom Events early.

Custom Event Purpose
CollectPickup Increment score or currency, play SFX, hide actor, mark collected.
DamagePlayer Reduce health or lives, apply knockback or respawn, trigger invulnerability window.
SetCheckpoint Store current scene and spawn position in variables.
RespawnPlayer Move player to checkpoint, reset temporary state.
DefeatEnemy Play stomp or hit sequence, award points, hide enemy.
FinishStage Lock controls, play fanfare, move to score screen or next stage.

Variables to define on day one

8. Enemy Design That Fits GB Studio

Do not start with ten enemy types. Start with three behaviors.

  1. Walker: patrol left and right, reverse on wall or ledge trigger.
  2. Hopper: idle, jump, land, repeat.
  3. Hazard: static spike, fire bar substitute, crusher, or projectile lane.

These three patterns are enough to build many levels if you vary spacing, platforms, and timing windows.

9. Movement Feel Checklist

A Mario-inspired game lives or dies on feel. In GB Studio, that means repeated playtesting more than elaborate scripting.

If the game does not feel good with one flat test room, do not add more content. Fix the base movement first.

10. Content Order for the First Milestone

  1. Build a graybox test scene with placeholder tiles.
  2. Tune movement and camera behavior.
  3. Add one pickup and one enemy.
  4. Add death and respawn.
  5. Add checkpoint.
  6. Add level exit.
  7. Only then replace placeholders with final art.

11. Audio

Use short jump, pickup, damage, and finish sounds. Keep music loops concise and readable. If you only have time for one music track, make a strong world-1 theme and vary the stage geometry around it.

12. Performance and Scope Discipline

13. Exporting the Game for the Web

  1. In GB Studio, use Export Web.
  2. Find the generated files in build/web.
  3. Verify the exported folder contains an index.html entry file and assets.
  4. Test locally in a browser before deployment.

Official docs state that the web build is a static HTML5 export, so deployment is just static file hosting. Mobile browsers get touch controls automatically in the exported build.

14. Serving the Game on gb.spqw.net

Your current gb.spqw.net setup is already a static nginx site, which is a good fit for GB Studio web exports. The practical options are:

Option When to use it Shape
Replace the site root When the domain should become the game itself. Copy the contents of build/web to the site root.
Host under a subpath When you want a landing page plus the playable build. Put the web export in /play/ and link to it from the homepage.

Recommended deployment shape for this repo

  1. Keep a landing page at the domain root with description, controls, and credits.
  2. Place each playable export inside a versioned folder such as /play/v1/.
  3. Point the homepage “Play” button to the latest stable export.
  4. Commit the static files to the repo that backs the Coolify app.
  5. Redeploy the Coolify app after each release.

What that means in practice

For this repo, once your GB Studio project exports to build/web, you would copy that folder into the site repository, for example as play/v1/, then update index.html to link to /play/v1/. Because the site is served by nginx as static files, no app code changes are needed beyond placing the exported files in the published directory tree.

15. A Sensible Development Stack Around GB Studio

16. First 7-Day Build Plan

  1. Day 1: define theme, hero, enemy shapes, tile kit, and naming.
  2. Day 2: graybox one movement test scene and tune jump feel.
  3. Day 3: add one enemy, pickups, death, and respawn.
  4. Day 4: add checkpoint plus level goal, then playtest difficulty.
  5. Day 5: swap in final art and UI.
  6. Day 6: add music, SFX, and polish scripts.
  7. Day 7: export web build, stage it into the site repo, deploy, and test on mobile.

17. Final Checklist Before You Call It Done