Skip to content
← Back to Community
💥 [Game] Kaboom.js || Space Invaders? 🚀
Profile icon
EpicGamer007

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 ;)

Feedback

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:
scene("main") // stuff for the "main" scene scene("end") // 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 :).

Credits

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

Anyways, hope you all enjoy! ;)

Voters
Profile icon
kenneyman
Profile icon
JameelKutthan
Profile icon
Brendan23
Profile icon
maxina
Profile icon
SAYHANMASUD
Profile icon
PureCalamity
Profile icon
mkhoi
Profile icon
zplusfour
Profile icon
QBeaumont
Profile icon
Baconman321
Comments
hotnewtop
Profile icon
EpicGamer007

FOR ANYONE WHO READS THIS AFTER 6/15/2021, THIS REPL HAS BEEN DELETED DUE TO THE INABILITY TO GET KABOOM's EARLY VERSION.

Profile icon
maxina

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 (:5:499)
at :8:216
at Array.forEach ()
at :8:182
at :10:152
at :13:47
ReferenceError: init is not defined
at /script.js:1:1

Profile icon
EpicGamer007

@maxina idk y that happens, it worked before

Profile icon
EpicGamer007

@maxina this used an old version of kaboomjs

Profile icon
maxina

@EpicGamer007 What do I do to use it

Profile icon
EpicGamer007

@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

Profile icon
maxina
Profile icon
No5972

@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 replit.com. Maybe a feedback can be put forward in the GitHub issues.

Profile icon
JBloves27

Pretty cool! Nice job making this using kaboom!

Profile icon
EpicGamer007

@JBYT27 thanks!

Profile icon
JBloves27
Profile icon
QBeaumont

471 first try!

Profile icon
EpicGamer007
Profile icon
Baconman321

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

Profile icon
EpicGamer007

@Baconman321 good job!

Profile icon
amasad

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

Profile icon
EpicGamer007

@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

Profile icon
slmjkdbtl

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
Profile icon
EpicGamer007

@slmjkdbtl np good luck

Profile icon
Whippingdot

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

Profile icon
SwaroopBappanad

Cool!

Profile icon
EpicGamer007
Profile icon
mesquite2234
Profile icon
EpicGamer007
Profile icon
mesquite2234

I scored after I died. But this is cool!

Profile icon
EpicGamer007

@TommyVictory hmm, should be an easy fix.

Profile icon
FloCal35

K A B O O M !

Here's an updoot

Profile icon
EpicGamer007

@FloCal35 thanks

Profile icon
Kookiez

wow cool!

Profile icon
EpicGamer007

@Kookiez thanks!

Profile icon
PyCoder01

you should also add wasd support

Profile icon
EpicGamer007
Profile icon
EpicGamer007

@PyCoder01 I added wasd support

Profile icon
PyCoder01

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

Profile icon
EpicGamer007

@PyCoder01 i can try...

Profile icon
IntellectualGuy

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

Profile icon
EpicGamer007

@IntellectualGuy it is supposed to get faster and faster.

Profile icon
IntellectualGuy

I'm talking about the beginning @EpicGamer007

Profile icon
EpicGamer007

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

Profile icon
tussiez

Nice! Take my upvote :)

Profile icon
EpicGamer007

@tussiez thanks :)

Profile icon
tussiez