Share your repls and programming experiences

← Back to all posts
💥 [Game] Kaboom.js || Space Invaders? 🚀
EpicGamer007 (1751)

A little space invaders game made in KaBoom.js

So I was asked to give some feedback to the new library called KaBoom.js.

So I decided to try and make a space invaders(ish) game to try out KaBoom.js.

How to play

Survive waves of enemies as long as you can and prevent them from getting past you to attack earth.

  • Left arrow key - Go left
  • Right arrow key - Go right
  • Up arrow key - Shoot
  • Space - Shoot
  • r - Restart

Comment your scores down below ;)


This is mainly for @amasad and @slmjkdbtl. But here is my list of feedback for KaBoom.js

  • Maybe make the names for the functions a bit... better, or professional. I feel like vague names for functions such as sup or huh would be a bit confusing. At least for me, when I saw sup(), I thought it was the function that is called when the object is created, NOT during every frame.
  • Put as much as you can in the docs! I know this technically is not feedback to the actual library, but I feel like the docs should have EVERYTHING. Simplicity is great and all but I think that the users should know what they can change. One thing that troubled me a bit was finding out which parameters I could pass in when creating an object. I think that the process could have gone much faster if I knew what parameters I can pass.
  • Right now, each scene is structured like:

// stuff for the "main" scene


// stuff for the "end" scene

In my opinion, I find that a bit... confusing. To have the stuff for the scene, not be a part of the scene for me at least does not make a lot of sense.
I would have it as something like:

scene("main", () => {
    // stuff for "main" scene

scene("end", () => {
    // stuff for "end" scene

I think that this would make it a bit more organized but this is less feedback and more my opinion so feel free to ignore this.

  • I don't know if this is possible with browser js but maybe you can have an loadFolder() function which loads everything in a folder? If someone were to use this library for a larger project, it might be better if they were able to initialize every sprite/sound in the folder at once.

Other than these minor problems, it has been a really good experience coding with KaBoom.js. It was really easy and really fast. The guide that was created is really helpful and got me off to a fast start. Great job on this :).


  • Code - Me and KaBoom.js
  • Images - enemy and you

Anyways, hope you all enjoy! ;)

EpicGamer007 (1751)


maxina (65)

Tampermonkey sandbox preparation (internal.c_d) failed. This usually is caused by a third-party extension. TypeError: Cannot read property 'bind' of undefined
at Object.c_d (<anonymous>:5:499)
at <anonymous>:8:216
at Array.forEach (<anonymous>)
at <anonymous>:8:182
at <anonymous>:10:152
at <anonymous>:13:47
ReferenceError: init is not defined
at /script.js:1:1

EpicGamer007 (1751)

@maxina idk y that happens, it worked before

EpicGamer007 (1751)

@maxina this used an old version of kaboomjs

EpicGamer007 (1751)

@maxina i asked in the announcement place if i can get an old copy of the script to use for this game, i will let you know once i get it

No5972 (2)

@maxina the browser extension of TamperMonkey seems to be not very compatible with Kaboom.js but this won't influence the Kaboom.js application usage if you have no scripts specifically running on Maybe a feedback can be put forward in the GitHub issues.

JBloves27 (1901)

Pretty cool! Nice job making this using kaboom!

Baconman321 (1103)

LOL being the gamer that I am I spammed space until I got a score of 713 first try!

amasad (3537)

Great feedback, how long did it take you to code this?

EpicGamer007 (1751)

@amasad yea, a few hours(i did do other stuff along the way so it took a bit more)

Edit: I started around 12 PM PST and i finished around 8 pm PST but I probably only took like 4 hours cause I was doing other stuff

slmjkdbtl (54)

Wow cool, thanks! Very valuable feedbacks appreciated

1) yea I agree 100% they're bit confusing, definitely will take into consideration
2) jamed up the doc and site in a short time so some stuff is still missed, will be more complete in near future!
3) our original thought is to make stuff look as flat as possible, so it looks like code blocks, but yeah I agree that'll probably make stuff clearer, will take into consideration
4) yeah not sure if it's possible in browser, let me look up if there's other game lib or anything that deals with bulk asset loading in a smoother approach

Whippingdot (675)

I recommend you change your username... How does anyone remember that. Go here and press on the buttons to change your username. @slmjkdbtl

mesquite2234 (279)

I scored after I died. But this is cool!

FloCal35 (671)

K A B O O M !

Here's an updoot

PyCoder01 (58)

It's okay but the blocky style doesn't match with the spaceship and please add more colours and a starry background

IntellectualGuy (848)

The invaders go way too fast, you should fix that.

EpicGamer007 (1751)

@IntellectualGuy it is supposed to get faster and faster.

IntellectualGuy (848)

I'm talking about the beginning @EpicGamer007

EpicGamer007 (1751)

@IntellectualGuy ? Ok then.... i guess i can make it a bit slower.