← BACK TO GAME
RETRO PLATFORM ENGINE DOCUMENTATION

DANGEROUS GAME
USER GUIDE

This guide was generated directly from the game engine source code. It documents gameplay rules, level editor mechanics, tile IDs, configuration systems, URL-based level sharing, and the complete workflow for designing custom levels and gameplay experiences.

GRID SIZE
10×50
TILE TYPES
30+
ENEMY TYPES
7
CONFIG DRIVEN
JSON
🎮

THE BASICS

Dangerous Game is a retro side-scrolling action platformer featuring collectible objectives, enemy combat, environmental hazards, and level progression mechanics.

CORE OBJECTIVE

  • Collect all trophies🏆 in the level.
  • Find the required key🔑.
  • Reach the exit door🚪.
  • Defeat enemies👾 for score bonuses.
  • Survive spikes⚠️, lava🌋, and hazards.

PLAYER SYSTEM

  • Default lives: 3
  • Maximum lives: 9
  • Jetpack fuel system with regeneration.
  • Invincibility frames after damage.
  • Weapon pickups and upgrades.

SCORING

  • Trophy: +500
  • Key: +50
  • Enemy kills: +300 to +10000
  • Level completion bonus: +1000
  • Grenade multi-kill bonus available.

ACHIEVEMENTS

  • FIRST BLOOD
  • WAR MACHINE
  • TOP GUN
  • BOSS SLAYER
  • SPEEDRUN LEVEL
⌨️

MASTERING CONTROLS

MOVEMENT

  • A or → Move Left
  • D or → Move Right
  • W or → Climb Ladder
  • SPACE → Jump
  • SHIFT → Run

COMBAT

  • Z or CTRL → Fire Weapon 🔫
  • X → Throw Grenade 💣
  • Machine gun🔫🔥 reduces cooldown delay.
  • Grenades💣 use fuse timing physics.

JETPACK

  • C → Activate Jetpack 🚀
  • Fuel regenerates automatically.
  • Jetpack lift force is configurable.
  • Jetpack achievement supported.

EDITOR / ADMIN

  • CTRL + S → Apply Config Changes
  • F11 → Fullscreen
  • Mouse painting supported in level editor.
  • Undo history auto-tracked.
🧱

TILE ID REFERENCE

Every level is built from numeric tile IDs. The engine reads these IDs to spawn terrain, enemies, pickups, and gameplay objects.

ID ICON NAME FUNCTION
🏗️ TERRAIN — Draw the World
0EMPTYAir / Empty Space
1🟫GROUNDSolid Ground Collision
2🧱BRICKWall Block
3⚠️SPIKESDamage Hazard
8🌋LAVAInstant Death Hazard
9🪜LADDERClimbable Tile
10🟦PLATFORMThin Platform
24SECRET BLOCKBreakable Secret Tile
25🧊ICE PLATFORMSlippery Surface
26📦CRATEBreakable Object
27🛢️BARRELExplosive Barrel
🎯 OBJECTIVES — Keys, Doors & Progression
4🏆TROPHYCollectible Objective
5🔑KEYUnlock Exit Door
6🚪DOORExit / Finish Level
12🚩SPAWNPlayer Spawn Position
13🌀TELEPORTWarp / Teleport Tile
⚡ POWER-UPS — Collectible Boosts
14🚀JETPACKJetpack Pickup
15❤️EXTRA LIFEGain Additional Life
18💎UPGRADE CHIPWeapon Upgrade
28🪨ROCKDecorative Obstacle
29🌲TREEDecoration Tile
🔫 WEAPONS — Guns, Grenades & Upgrades
7🔫PISTOLWeapon Pickup
16💣GRENADEGrenade Pickup
17🔫🔥MACHINE GUNRapid Fire Weapon
👾 ENEMIES — Patrol, Fly, Jump, Snipe & Elite AI
11👾ENEMYBasic Enemy Spawn
20🦾HEAVY ENEMYHeavy Ground Enemy
21🛸FLYING ENEMYFlying AI Enemy
22🐸JUMPERJumping Enemy
23🎯SNIPERRanged Enemy
40🤖CYBORGAdvanced Enemy Type
41👽ALIENAlien Enemy AI
42☠️REAPERUltra Dangerous Enemy
💀 BOSSES — Multi-Phase Boss Enemies
30👹BOSS 1Boss Enemy Type 1
31💀BOSS 2Boss Enemy Type 2
32🐉BOSS 3Boss Enemy Type 3
❓ RESERVED / UNUSED
19 UNUSED Reserved / Not Used
🗺️

LEVEL ARCHITECT GUIDE

The editor uses a tile-based grid system. Standard maps are designed around a 10 rows × 50 columns structure.

{ "name":"LEVEL 1", "width":50, "height":10, "bgColor":"#1a0a2e", "tiles":[ [1,1,1,1,1], [1,0,0,0,1], [1,0,5,0,1], [1,0,6,0,1] ] }

MANDATORY REQUIREMENTS

  • At least 1 KEY🔑 tile (5)
  • At least 1 DOOR🚪 tile (6)
  • SPAWN🚩 tile strongly recommended.
  • Ground🟫 required on final row.

EDITOR FEATURES

  • Paint tiles with mouse.
  • Undo history tracking.
  • Thumbnail preview generation.
  • AI-generated level support.
  • Live play testing.
⚠ The editor blocks play-testing if the map does not contain at least one key and one door.
💾

LEVEL EXPORT / IMPORT

1
BUILD

Create your map using the editor tile palette.

2
EXPORT

Click Export to generate a JSON level file.

3
SHARE

Send the JSON file or Base64URL code to another player.

4
IMPORT

Load the file into the editor or play directly from a URL.

Export Process: 1. Open Level Editor 2. Click "EXPORT LEVEL" 3. JSON file downloads automatically 4. File contains: - map dimensions - tile arrays - level metadata - background color
Import Process: 1. Click "IMPORT LEVEL" 2. Select JSON file 3. Choose: OK → Add as NEW level CANCEL → Replace current level 4. Editor reloads automatically
🔗

BASE64URL LEVEL SHARING

Dangerous Game includes a built-in URL sharing system that compresses levels into Base64URL hashes using run-length encoding.

https://yourgame.com/#level=ENCODED_LEVEL_DATA

HOW IT WORKS

  • Tile arrays are flattened.
  • Run-length encoding compresses repeated values.
  • Binary buffer is converted to Base64URL.
  • Hash loads automatically on startup.

IMPORT METHODS

  • Paste full URL.
  • Paste only the hash code.
  • Paste raw encoded level string.
  • Shared levels auto-load instantly.
Supported Import Formats: #level=ENCODED_DATA https://site.com/#level=ENCODED_DATA ENCODED_DATA_ONLY
⚙️

GAME CONFIGURATION

The engine is fully configuration-driven through game.config.json. Nearly every gameplay system can be modified without editing source code.

PLAYER TAB 👤

  • Walk Speed
  • Run Speed
  • Jump Force
  • Gravity
  • Jetpack Force🚀
  • Jetpack Fuel
  • Invincibility Time
  • Health
  • Lives❤️

WEAPONS TAB 🔫

  • Pistol Damage
  • Machine Gun Fire Rate🔫🔥
  • Grenade Explosion Radius💣
  • Bullet Speed
  • Ammo Capacity
  • Weapon Cooldown
  • Explosion Damage

ENEMIES TAB 👾

  • Enemy Speed
  • Patrol Distance
  • Jump Height
  • Attack Cooldown
  • Boss Health👹
  • Sniper Accuracy🎯
  • Flying Speed🛸

WORLD TAB 🌍

  • Tile Size
  • Map Width
  • Map Height
  • Background Theme
  • Hazard Damage⚠️
  • Lava Damage🌋
  • Physics Settings

UI TAB 🖥️

  • CRT Theme Colors
  • Glow Intensity
  • HUD Size
  • Scanline Effects
  • Notification Duration
  • Menu Animation Speed

AUDIO TAB 🔊

  • Master Volume
  • Music Volume
  • SFX Volume
  • Jump Sound
  • Explosion Sound💣
  • Boss Audio👹
  • Retro Synth Effects

EDITOR TAB 🧱

  • Grid Visibility
  • Auto Save
  • Undo Stack Limit
  • Tile Highlighting
  • Preview Rendering
  • AI Level Generation

ADVANCED TAB 🧠

  • Debug Mode
  • FPS Counter
  • Collision Boxes
  • Performance Metrics
  • Save Compression
  • Base64URL Encoding
  • Developer Console

THEME TAB 🎨

  • CRT Green Theme🟢
  • CRT Amber Theme🟠
  • CRT Blue Theme🔵
  • Neon Purple Theme🟣
  • Background Darkness Level🌑
  • Glow Intensity✨
  • Border Glow Effects💠
  • Scanline Opacity📺
  • CRT Flicker Strength⚡
  • HUD Color Palette🖥️
  • Text Glow Effects💡
  • Retro Font Selection🔤
  • UI Transparency Level🪟
  • Panel Shadow Strength⬛
  • Theme Import / Export💾
Example Variables: player.walkSpeed player.jumpForce player.gravity weapons.pistol.damage enemies.sniper.shootRate ui.colors.crtGreen audio.sfx.jump.freq
🧠

CONFIG ADMIN PANEL

The Admin Panel provides a visual editor for the configuration system. Changes can be previewed live and exported back to JSON.

1
EDIT

Modify values through fields, sliders, and color pickers.

2
APPLY

Save changes to localStorage session.

3
EXPORT

Download updated game.config.json.

4
RESET

Restore factory defaults instantly.

ADMIN FEATURES ✓ Live JSON diff viewer ✓ Change tracking ✓ Theme selector ✓ Audio preview buttons ✓ LocalStorage persistence ✓ Export / Import support ✓ Fullscreen mode ✓ Factory reset
Persistence Priority: 1. localStorage session 2. game.config.json 3. Embedded DEFAULT_CONFIG