In the 2D Platformer Creation Kit I have been trying to change the background. In the background.script I have added a new else if section for the new background image:
I would also suggest to compare performance between Firefox and Chrome. Chrome is known to be a bit slower when running non-release Defold games (due to debug version will validate WebGL calls to catch errors, which is notoriously slow in Chrome).
Reloading the web page helped. Google Chrome possibly had an old cache as I’m using the same address all the time. Also, I saw an error when uploading the files to my school’s server, so maybe some files got corrupted, etc.
I added another background, and now all the levels have the same black_candle background. I can’t find my error, but there must be something I’m missing.
I removed the image from the atlas and from the code, and now I get:
ERROR:GAMESYS: Default animation ‘black_candle’ not found
WARNING:RESOURCE: Unable to create resource: build/default/platformer_creation_kit/building_blocks/gameobjects/backgrounds/background_generated_5.spritec
WARNING:RESOURCE: Unable to create resource: build/default/platformer_creation_kit/building_blocks/gameobjects/backgrounds/background.goc
ERROR:GAMEOBJECT: Could not instantiate game object from prototype /platformer_creation_kit/building_blocks/gameobjects/backgrounds/background.goc.
WARNING:RESOURCE: Unable to create resource: build/default/platformer_creation_kit/LevelFiles/MyLevel.collectionc
ERROR:GAMESYS: The collection /platformer_creation_kit/LevelFiles/MyLevel.collectionc could not be loaded.
Yes, each image you add to an atlas create a new animation, remove the image and the animation can’t be found anymore. You are referencing the animation somewhere.
I used Undo to not delete image from atlas and not remove the image from code, so I’m back to the problem where I have the same black_candle on all levels. Just can’t find my mistake.