Skip to content

DanMat/Blastix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blastix 🔫🕹️

A retro run-and-gun platformer — Mario-style running and jumping meets Contra-style 8-way blasting, across side-scrolling zones with grunts, drones, turrets that shoot back, and end-of-zone bosses.

Play the demo   Vanilla JS Built on Retroix License: MIT

Blastix — a retro run-and-gun platformer: a commando firing across a jungle level with coins, a grunt and a boss mech

Features

  • 🏃 Tight platforming — run, accelerate, and a variable-height jump with coyote-time and input-buffering, so it feels good.
  • 🔫 8-way run-and-gun — auto-fire and aim up / diagonally / down (in the air) Contra-style; grab the spread gun pickup for triple shots.
  • 👾 Enemies that fight back — patrolling grunts, weaving drones, and wall turrets that lead their shots.
  • 👹 Bosses — hovering mechs with a health bar and escalating spread attacks guard the end of a zone.
  • 🗺️ 3 zones — Jungle Drop, Steel Ascent and Sky Fortress, each a hand-authored ASCII tilemap.
  • ❤️ Lives & checkpoints — pits cost a sliver of health and hop you back to safe footing; run out and you respawn from the last checkpoint.
  • 🏆 Online leaderboard — enter your 3-letter initials and land on the shared board.
  • 🔊 8-bit sound & chiptune music — synthesized, no audio files. Press M to mute.

Controls

Action Input
Move ← → or A / D
Jump Space / Z (hold for a higher jump)
Shoot X (hold to auto-fire)
Aim Hold , or in the air, while shooting
Pause · Mute P / Esc · M

How it works

Blastix is built on Retroix, a tiny dependency-free retro game engine loaded from a CDN (no build step). It's the first game to use Retroix's platformer stack:

  • Retroix.physics — gravity, velocity integration and axis-separated AABB collision resolution (the jump feel, wall/floor collisions, onGround flags).
  • Retroix.grid — each level is an ASCII tilemap parsed into a tile grid that feeds collision rects straight into the physics.
  • Retroix.camera — the side-scroll follow, clamped to the level bounds.

…plus Retroix's canvas, loop, input, audio + music, screen-shake/flash, screens, retro initials entry and the leaderboard. All art is drawn procedurally.

File Responsibility
js/game.js The game: movement, shooting, enemies, bosses, camera, render.
js/levels.js Pure-data ASCII tilemaps (edit a string = edit the level).
js/config.js Supabase URL/key and game id, passed to Retroix.leaderboard.
Retroix (CDN) Physics, grid, camera, canvas, loop, input, audio, screens.

Authoring levels

Levels are just rows of characters — # ground, = platform, ^ spikes, o coin, E grunt, V drone, T turret, B boss, W spread pickup, C checkpoint, P start, G goal. Drop a new object into js/levels.js and it plays.

High scores & the shared leaderboard

Out of the box the leaderboard uses your browser's localStorage. To share scores across devices — and with the other games — point it at a free Supabase project: run docs/supabase.sql in the SQL editor, then paste your Project URL and public anon key into js/config.js. The anon key is public by design; the database is protected by the row-level-security policies in the SQL file.

Play locally

It's a static site — no build step:

git clone https://github.com/DanMat/Blastix.git
cd Blastix
python3 -m http.server 8000   # then visit http://localhost:8000

Credits

Built from scratch in vanilla JavaScript on the Retroix engine — a Mario/Contra tribute a decade in the making.

License

MIT © DanMat

About

A retro run-and-gun platformer (Mario + Contra) — vanilla JS on the Retroix engine

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors