|Topic was automatically imported from the old Question2Answer platform.
Here is a link to the live game:
As the title says all the platforms in the tilemap do not appear when you run the game on the HTML5 export. I have no idea why this is. Any help is much appreciated.
I am not sure if this is related or not but I am getting this error on the engine as well,
Loaded Resource as image file, this will not work on export, 'res://icon.png'. Instead import the image file as an Image resource and load it normally as a resource.
That error likely has nothing to do with your problem.
Did you create your TileMap from within Godot or did you import it from a program like Tiled?
When you are exporting a game all of your
preload()s tend to be case sensitive so make sure to double check those strings. Examples:
Item.tscn resides in the
Inventory folder which resides in the
Scenes folder. Here:
item.tscn resides in the
INVENTORY folder which resides in the
timothybrentwood | 2021-04-29 23:35
Are you dynamically loading tiles during runtime by using a Directory to look through the files?
exuin | 2021-04-30 00:04
@timothybrentwood where can I find preload and load to double check?
toshnewton | 2021-04-30 00:38
@exuin I’m not exactly sure. How would I do that? I have a tileset.tres made of a bunch of .pngs with the TileMap path pointing towards tileset.tres.
toshnewton | 2021-04-30 00:56
Those would be functions you typed inside your script files. I suggest exporting your project to your desktop (Windows, Mac, or Linux - whatever you have) with debugging enabled and see if the debugger that pops up when you launch your game gives you any information. Never hurts to double check running your project from with in the editor to make sure it still works as you intend it to.
timothybrentwood | 2021-04-30 01:01
You can also just run the HTML5 version of the project by clicking the HTML5 icon next to the play button with remote debugging enabled. Or check the console on your browser to see if there are any errors.
exuin | 2021-04-30 01:11
Ok, thank you @exuin. I am getting this error for every unloadable asset:
**ERROR**: No loader found for resource: res://Assets/Platform/grassLeft.png. put_char @ tmp_js_export.js:8 tmp_js_export.js:8 At: core/io/resource_loader.cpp:286:_load() - Method failed. Returning: RES() put_char @ tmp_js_export.js:8 tmp_js_export.js:8 **WARNING**: Couldn't load external resource: res://Assets/Platform/grassLeft.png put_char @ tmp_js_export.js:8 tmp_js_export.js:8 At: scene/resources/resource_format_text.cpp:175:_parse_ext_resource() - Couldn't load external resource: res://Assets/Platform/grassLeft.png
I checked all names and references to the files and made sure they all match. I have been researching this error as well and can’t seem to find a fix. Any ideas?
toshnewton | 2021-04-30 01:33
In your file system tab in the editor, make sure there is a resource at exactly that path:
res://Assets/Platform/grassLeft.png (uppercase and lowercase characters match exactly as displayed in the error). If that file exists, I would try re-importing it
click the file in the file system tab -> go to the scene tree portion of the editor and click the import tab -> click reimportand see if that fixes your problem.
timothybrentwood | 2021-04-30 01:55
Well, shoot I see now that it does not match. I have
When I try to change the folder names to match the errors the game won’t run at all. I thought also I could try to just create another folder that has a capital A but of course, I cant do that with windows file system.
toshnewton | 2021-04-30 02:40
The game won’t run at all after you change the folder names when launched from the editor? What kind of errors are you getting? I suggest changing the folder names then searching your GDScripts (*.gd files) for
preload() functions, making sure the strings they’re using are properly capitalized. You could also just search your scripts for ‘res://’ - it might be easier.
timothybrentwood | 2021-04-30 03:17
Thank you for all your help! So in my code I never used any
preload() I just used the UI to import it where I needed it so I thats why I was a little confused with what you were saying. What I ended up doing is making a separate assest(2) folder for all assets except for the platforms, and changed the orginal asset folder to match what the game was looking for in the error.
res://Assets/Platform Next I changed any reference to the other assets in the UI to the new folder.
toshnewton | 2021-04-30 20:38