kaboom
kaboom copied to clipboard
erro de renderização
Version
No response
What browsers are you seeing the problem on?
Chrome, Firefox
What happened?
Hi, I'm trying to make a simple game, but the map is not rendering in the browser, I tested it in firefox and chromium and had the same problem, to make sure I wasn't doing the wrong code I cloned the games from the repositories of some youtubers but it also gave an error, and not only on my computer but also on the notebook.
I would like to know if there is already a solution for this. Thank you very much in advance...
What's the expected behavior?
I would like to load the map
Minimum reproducable code
kaboom({
global: true,
fullscreen: true,
scale: 1,
debug: true,
clearColor: [0,0,0,1]
});
loadRoot("https://i.imgur.com/");
loadSprite("block", "M6rwarW.png");
scene("game", () => {
layer(["bg", "obj", "ui"], "obj");
const maps = [
[
'======================================================',
'= =',
'= =',
'= =',
'= =',
'= =',
'= =',
'= =',
'= =',
'= =',
'======================================================',
],
]
const levelcfg = {
width: 20,
height: 20,
"=": [sprite("block"), solid()]
}
const gameLevel = addLevel(maps[0], levelcfg)
});
go("game");
Live demo
No response