Getting a message when saving...don't understand what it is telling me (so I can correct it)

Godot Version

4.6.2.stable

Question

When saving my world map scene, the attached message appears informing me about a large file size and how it will cause slow saving and loading. It suggests doing a thing to alleviate this…but as a new developer just beginning recently, I do not understand what it is telling me to be able to try to correct it. The language…I don’t know what the words mean ha-ha.

Can anyone explain this message to me, and if possible, also share how to correct the issue as the message instructs? Thank you kindly, strangers. :slight_smile:

It’s not a bug, it’s a warning. You are storing something in your tscn that’s really huge. The tscn is a text file format, but some data is better to be stored as binary. Maybe your tile map. Show your setup in the inspector for it. you can store the data as a res, which would be binary.

Edit: please take a look at the file size of your tscn, to have a comparison, when the data is saved as a res.

Ok, this is what shows in the inspector when selecting the tilemap layer. Not sure specifically what you were requesting with “setup” so snapped all of it. I can post a more specific section though with a bit more direction.

Ill also put the scene tree here as well so that you can take a look at it and ask whatever u might need for clarification to help me deduce what specifically it is. I’m hoping it is just the result of the process I’m currently in with the map and that the finished map will not have the issue, but you may know better.

Ther “vaelora” tile_set has a chain beside the name, that should mean it’s already stored external. please show the resource of it:


like in my shot Resource - Path.
It seams that’s not the culprit.

Here you go stranger. Appreciate you taking the time to assist with this. Hopefully by the end it clicks and I understand to avoid it in future.

ok, vaelora isn’t the issue. It must be something else, a lot of data that is stored in your tscn somewhere, it’s not this tile set. Sidenote: you could store the tile set as a res instead of a tres, would load a little bit faster. All files with a t in the file extension are text formats. But it’s not what godot is warning about.

Ok. I originally saved it (creating the .tres) to be able to load it into other layers so as not to have to add the tilesept.pngs again and again and reconfigure them (im sure thats simple but it was a ew thought for me lol and I was quite proud to think of it lmao). If you say that a .res is better tho I can for sure resave it.

Could it be the TextureRect? Right now I have a texture rectangle to load in the original map layout as a trace overlay so that I can then paint the tiny 4x4 tiles to recreate it as a tilemap…could that image file be what is doing it?

#EDIT#
Nevermind…I just checked the size of that image and it is only 252.4kb so not likely the culprit either? Assuming I’m understanding any of this correctly of course.

Check the Resource Path of the image, I don’t think that you are storing image data in the tscn, but could be somehow possible. Without the project, it’s hard for me to tell. Would have to explore it for resources, too.
You could open the tscn in a text editor, and try to find what data is so huge. Be prepared, it’s a lot of text with 1.1 MB.

The resource path for the image:
image
And when opening the .tscn this monstrosity greets me…I’m guessing the jibberish is the culprit…I unfortunately have NO experience reading this at all to make sense of it. :

It pretty much looks like that the rest of the way down so I’ll spare everyone’s monitor pixels the effort of rendering it haha.

You must have an additional tile map for ocean, that is stored in your tscn.

Are you able to explain how I did that and how to repair it? Cause in my scene tree (screenshot above) there is only one “ocean” TileMapLayer…

somehow you made the ocean layer “local” or unique, and it’s stored in the tscn. Are there resources for tile map layer? I have only little experience with 2D tile maps. Would have to recreate it somehow. Take a look at your ocean layer.

When right clicking on the ocean TileMapLayer, it has only one sub-resource listed and that is the tilemap (which we confirmed isn’t the issue I think).

I made a new scene and began to recreate the original while watching the file size as I went…
I set everything back up and the size was about 600kb.

The moment I painted a full map of just water, the size jumped up to 1MB, and the warning popped as it saved.

So, there is something about the ocean TileMapLayer itself, but it doesn’t happen until I actually paint ocean tiles onto the map. I loaded the tileset .res file in and the jump didn’t happen. It only happened after I filled the map with ocean water tiles.

Does this help diagnose things at all?

#EDIT#
: Erasing the water tiles from the map reduces the file size back down…so…I don’t know what this means, but it seems to be the thing.

That is the point where I would welcome, when someone with 2D tile map knowledge would join the discussion. I don’t have the time (and 2D knowledge) to recreate this. I can only say that the ocean is the culprit that is stored in your tscn, that is too large. I would have to analyze your project to help further.

I understand. One thought I had from this is that the map is about 1075px1075p. Perhaps the map is just so big as a map that the file is naturally large as a result? Painting “less” reduces the size (see the edit I didn’t squeeze in in time before your reply), and painting more increases it… Could that be causing the size to jump, and thus the warning? If so, wouldn’t that mean it is unavoidable?

Tho as you said this isnt your area of expertise so if that is as far as you can get me then I still appreciate the time and information and stuff to get us this far. It helped. I understand better what is happening and that is always a win :slight_smile:

It’s a little bit strange, that you said without ocean the file size was at 600kB, that’s large, too.
Is the data block in the tscn only the ocean, or are there more layers that divide the data block further down the file?
Could you take a look at the tscn at that point, where you reached 600kB? What is the line before the data block?

K so the current state (with ocean stuff painted), goes jibbery all the way to the end and closes with this:

Now, Ill take the scene and duplicate it so I dont mess it up messing it up (lol), then Ill erase all the painted tiles from the mapLayer so it is clean…no more ocean or land on the layer…

The file size drops from 1.1MB to 251.4kb and the file looks like this at the end now:

Thats the entire contents of the file with NO tiles painted yet…

Before erasing:

After erasing:

Hmm, the tscn file without the ocean data, you show here, has never 600KB, maybe only 600B?
So it seams, it’s only the ocean layer. I don’t know how only one layer could be local and stored in the tscn.

You are correct…I rechecked and I used the wrong numbers…it is 993 B after the erasing.

Unless there is a way to store the painting of the tiles itself outside the scene file (and I dont yet know of one), it seems that that is what is happening. As I paint tiles the file gets bigger as it stores the information for the painted tiles…it is just a LOT of tiles and stuff. That is the best guess I can make based on all we’ve investigated, though I don’t actually know what I’m talking about haha.

Would need a 2D tile map pro here, to get a deeper answer. Let’s hope someone jumps in.