Skip to content
/ bd1k Public

Boulder Dash in 1024 bytes of JavaScript - my entry for js1k 2017

Notifications You must be signed in to change notification settings

atesgoral/bd1k

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bd1k

A Boulder Dash clone in 1024 bytes of JavaScript (including the image data). A lot of bytes were hurt in the making of this game.

bd1k

Run

Just open index.html in your browser. Or visit https://atesgoral.github.io/bd1k/

Features

  • Tested on Chrome and Firefox
  • 10 increasingly difficult levels. Level 11 is unbeatable because the player starts trapped among boulders
  • 4 sprites from the original game
  • Random level generator with a custom PRNG to make level generation deterministic (and that fails on level 11)
  • Boulders fall, slide over each other and crush player
  • Level transition effect
  • Level numbers
  • Minutes and minutes of fun and excitement for the entire family!

Reverted features

  • Buddy player - Introduced a doppelgänger that moves along with the player at level 11 since the original player starts off as trapped. This was a fun feature because it's not easy to predict what happens to the other player when you're just watching one of them and it's game over when one of them dies. Reverted because this is not true to the original Boulder Dash and turns the game into a different puzzle game.
  • Bloodied boulder - Added a bloodied boulder sprite when the player gets crushed by a boulder. Reverted because the new spire took too much space and it wasn't even that noticeable.
  • Sound effects - Used the Web Speech API to add sound effects. I would be playing "one", "two" or "ten" at extreme pitch and rates to create percussive sound effects. Unfortunately it only worked nicely specificially on Chrome on macOS, so I reverted it.

Updating the sprites

Keep the PNG in 4 colour indexed format. Use TinyPNG to further optimize it.

To convert to base64:

base64 < bd1k_sprites.png > pbcopy

About

Boulder Dash in 1024 bytes of JavaScript - my entry for js1k 2017

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published