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

kaboom.js failed load image

I can't load image in kaboom.js .this my code files root D:\kaboom\src . this my image file root D:\kaboom\public\assets. js code import kaboom from 'kaboom'; kaboom({ font: "sinko", background: [0, 0, 255,], }) loadSprite("bean",…
0
votes
1 answer

Error when loading sprites in Replit (Kaboom)

import kaboom from "kaboom"; // initialize context kaboom(); addLevel([ "!^^^^^^^^^^^^^^^ &", "!^^^^^^^^^^^^^^^ &", "!^^^^^^^^^^^^^^^ &", "! &", "! &", "! &", "! …
-1
votes
1 answer

why isnt the kaboom.js picking up the map array?

the code kaboom(); loadSprite("player", "/bean.png"); loadSprite("grass", "/grass.png"); const m1ap = [ '----------------', '----------------', '----------------', '----------------', …
protato
  • 1
  • 3
-1
votes
1 answer

looking to find version 0.6.0 of KaboomJS

I'm wondering if someone can help me find version 0.6.0 of KaboomJS. i looked for the kaboom files for awhile now and i could not find this specific version
Ahmed Tawfik
  • 159
  • 2
  • 5
-1
votes
1 answer

How do you correctly format a destroy function in javascript?

I am trying to use a destroy function in a game I am developing to create a platform that is destroyed upon contact with the player. However, when I run the game and touch the block, the game crashes. The block also destroys everything below it. I…
-1
votes
1 answer

How to load fonts not from png?

Just want to ask. How to load fonts not from png? I tried fonts with .woff, .ttf, extensions, but they all give me same error: ERROR: Font not found: undefined. Here my try: kaboom({ width: 900, height: 500, font: "kenney-blocks", …
Hramzhuk
  • 1
  • 1
-3
votes
1 answer

getting syntax error unexpected < in JSON at position 0

I don't have any JSON files in this program only js and html my theory is that the program is running the html like a JSON file I'm using replit and kaboom to run the game HTML code: kaboom
1 2
3