OpenSNES
Modern Open-Source SNES Development SDK
Loading...
Searching...
No Matches
Basics Examples

Core game mechanics that go beyond pure graphics or audio. These examples demonstrate fundamental patterns – collision detection, movement, and interactive logic – that you will reuse in every game project.

Example ROMs

Example Difficulty Description
collision_demo Intermediate Bounding-box collision detection between multiple sprites
panel_hud Intermediate 9-slice HUD + dialog box on one BG layer (the panel module)
game_skeleton Intermediate The smallest complete game: title → play → game-over state machine
ppu_reset Beginner ppuReset() between two screens: every PPU register back to its power-on value
scene_stack Intermediate Scenes on a stack: title → counter → a pause overlay
aim_target Intermediate Aim, distance and angle with sqrt16 and atan2_8, 8.8 and 16.16 side by side, and a sprite orbiting in 16.16

Key Concepts

  • Bounding-box collision: compare rectangle edges to detect overlaps
  • The SNES has no hardware collision detection – it must be done in software
  • Efficient collision checks matter because the 65816 CPU is slow at 32-bit math

After completing the graphics and input examples, study collision_demo to see how sprites, input, and math come together into interactive gameplay.

aim_target Collision Detection Demo game_skeleton — the smallest complete game panel_hud — a HUD that survives a dialog box ppu_reset — the next screen starts from a clean PPU Scene Stack