Questions tagged [kaboom]

For questions about games created with the Kaboom JavaScript library.

Kaboom is a JavaScript library for creating simple browser based games.

37 questions
0
votes
1 answer

Creating a character select screen in Kaboom.js with click-to-scene feature

Character Select Screen for Fighting Game Using Kaboom.js - How to make the box redirect to scene on click Hey guys -- I'm learning kaboom, I want to create a character select screen and cant seem to let the scene change when clicking on a box. I…
Sal
  • 1
  • 1
0
votes
1 answer

Colision on kaboom.js (javascript)

I'm trying to create a game where you have to collect coins to increase in size, but I can't detect when the player is touching the coin. I need to do this either with the Kaboom library or with pure JavaScript. This is my code: import kaboom from…
0
votes
1 answer

Random Function Popping Up out of Nowhere

I'm working on a Kaboom JS project, which was working fine, until now that an error box pops up with "n is not a function". I have no function called n, no function is being called, and the only edit I made in between when it worked and when it…
OhNoItsA8
  • 58
  • 5
0
votes
2 answers

How to Solve " Expected 0 arguments, but got 1.ts(2554) " Error in Svelte.js

As a beginner to web development, I am building a simple game using Svelte.js with JavaScript and Kaboom.js. However, I am encountering an error("Expected 0 arguments, but got 1.ts(2554) Error") in the main.js file after adding a game component to…
user21240894
0
votes
1 answer

Making sprites equally spaced while moving around a circle

I am trying to make a number of circles rotate around a point. I have gotten the spacing to work properly, but now I need some sort of script that can calculate how many circles are rotating, and be able to add more circles while equally spacing all…
0
votes
1 answer

When i press space it says Soldier not defined. Anyone know any fix?

i am using replit and on replit Kaboom please tell me if you know any fixes i have done many many many things and can not fix it PLEASE HELP ME code is below import kaboom from "kaboom" // initialize context kaboom() // load…
0
votes
1 answer

How can I make an object jump once until it touches land/ground in Kaboom.js

import kaboom from "kaboom" const SPEED = 300 const JUMP_FORCE = 500 const GRAVITY_AMOUNT = 1000 // initialize context kaboom({ background: "#000" }) // load assets loadSprite("player", "sprites/player.png") loadSprite("spider",…
0
votes
1 answer

I am trying to create space invaders using kaboom js in replit ide Err

I'm trying to change the scene to lose state when player runs out of time or aliens invades successfully but I'm getting this error Error: scene not found : lose Since I cannot put everything here ,I'm putting my replit link over…
0
votes
1 answer

how do i make an objects continuously spawn on kaboom.js

When I shoot the asteriod they disapear which is what i want however I want more asteriods to spawn instead of them just disapearing forever.Im not sure what to add in this code to make more spawn into the game. any help is appreciated i thought…
Ivanna
  • 3
  • 3
0
votes
1 answer

How to I create a background in Kaboom.js

So me and a friend are working a project out of boredom and we are having trouble figuring out how to make a background. Can somebody help?
0
votes
1 answer

Click to add block into view (kaboom)

im trying to make it so that everytime a certain spot is clicked it adds the block there (still new to kaboom), but this does absoutely jack function block(xyz) {add([ rect(48, 64), area(), outline(4), pos(width(),…
YetNT
  • 19
  • 6
0
votes
0 answers

How to fix Unexpected end of file (kaboom.js)

I'm getting an error saying unexpected end of file. Any idea on how to fix this?
Astro3000
  • 13
  • 1
  • 2
0
votes
1 answer

Kaboom.js check object sprite type ? object.is?

I am creating a game with kaboom.js and wanted to check an object in the player.onHeadbutt((obj) => { if(object.is('surprise-block')) {...} }) callback, but apparently that method does not exist? I was doing a tutorial based on a 6 month old youtube…
MMMM
  • 3,320
  • 8
  • 43
  • 80
0
votes
0 answers

How do I make a sprite chase another sprite in javascript?

Im making a game where I need the enemy to spot the player once in a certain range, and then start chasing the player. I cant find anything anywhere at all that would help with how to make sprites chase each other Im using Kaboom.js, javascript only…
Ash Hanson
  • 23
  • 3
0
votes
2 answers

How do I flip a sprite only on the x-axis with kaboom.js?

I want to flip my character to move left so that I dont have to animate a new left animation on every character (Yeah Im lazy). Is there an easy way to do this? -Using kaboom.js onKeyDown("a", () => { player.move(-SPEED, 0), //moves sprite …
Ash Hanson
  • 23
  • 3