[Rseding91] [15.35] Large entities won't draw correctly on map

This subforum contains all the issues which we already resolved.
Atria
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Sat Jul 09, 2016 10:25 am
Contact:

[Rseding91] [15.35] Large entities won't draw correctly on map

Post by Atria »

I know this is probably in territory "just don't do it and you will be fine" but I made huge 100x100 entity but when I place it into world the map doesn't show it correctly. The map shows only some wierd corners of my entity. LINK

Also it froze the game for a couple of seconds when I placed it but that is reasonable...
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [15.35] Large entities won't draw correctly on map

Post by eradicator »

I recommend you post the zip of your mod. And maybe the entity definition directly. Does this reproduce on every map? Does your entity have a very large number of inventory slots?
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Atria
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Sat Jul 09, 2016 10:25 am
Contact:

Re: [15.35] Large entities won't draw correctly on map

Post by Atria »

eradicator wrote:I recommend you post the zip of your mod. And maybe the entity definition directly. Does this reproduce on every map? Does your entity have a very large number of inventory slots?
Here is the mod. I stripped to bare bone state. Entity is 100x100 chest with 20 inventory slots, so basicly biggest place waster. And I tested it on 4 different maps and it happened in all of them (it's pretty hard to find a spot for it in sandbox mode).
Rseding91
Factorio Staff
Factorio Staff
Posts: 14251
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [15.35] Large entities won't draw correctly on map

Post by Rseding91 »

Thanks for the report. I actually found a few bugs in the game with that mod :P
  • Large entities wouldn't draw correctly on the map
  • Curved rails could sometimes not draw correctly on the map
  • Large numbers of nested sprite layers would overflow the stack during creation, rendering, and destruction.
All of the issues are fixed for 0.16.
If you want to get ahold of me I'm almost always on Discord.
Atria
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Sat Jul 09, 2016 10:25 am
Contact:

Re: [Rseding91] [15.35] Large entities won't draw correctly on map

Post by Atria »

Thanks a lot Rseding.

I also noticed that if I use sprite layers in prototypes the game always rebuilds sprite cache when starting the game. I dynamicly generate sprite layers but these don't change between game restarts and it still rebuilds cache.

Can be something done about that?
Rseding91
Factorio Staff
Factorio Staff
Posts: 14251
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [15.35] Large entities won't draw correctly on map

Post by Rseding91 »

Atria wrote:Thanks a lot Rseding.

I also noticed that if I use sprite layers in prototypes the game always rebuilds sprite cache when starting the game. I dynamicly generate sprite layers but these don't change between game restarts and it still rebuilds cache.

Can be something done about that?
Does it happen with the example mod for you? The example mod you provided works just fine for me - in fact it didn't even rebuild the cache when I installed/removed the mod.
If you want to get ahold of me I'm almost always on Discord.
Atria
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Sat Jul 09, 2016 10:25 am
Contact:

Re: [Rseding91] [15.35] Large entities won't draw correctly on map

Post by Atria »

Rseding91 wrote:
Atria wrote:Thanks a lot Rseding.

I also noticed that if I use sprite layers in prototypes the game always rebuilds sprite cache when starting the game. I dynamicly generate sprite layers but these don't change between game restarts and it still rebuilds cache.

Can be something done about that?
Does it happen with the example mod for you? The example mod you provided works just fine for me - in fact it didn't even rebuild the cache when I installed/removed the mod.
I don't know it factorio rebuilt cache. I'm just used to factorio starting quickly and when I was using my entire mod it seemed to take a while longer than usual. I will try it with stripped down mod I provided and entire mod once I get home and report back. Is there definete way to figure out if cache was rebuild? Other than eyeballing loading time?

And is there some not obvious downside to using these large layered sprites? I expected (and experienced) some performance drop when placing the entity but I'm curious if multiple already placed entities will be massive UPS/FPS drag?
Atria
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Sat Jul 09, 2016 10:25 am
Contact:

Re: [Rseding91] [15.35] Large entities won't draw correctly on map

Post by Atria »

My bad, it loads exactly the same time.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14251
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [15.35] Large entities won't draw correctly on map

Post by Rseding91 »

In 0.15 and previous layered rendering is done through recursion so you can pay a small performance hit when it goes to render it. In 0.16 it would be the same performance cost as rendering N number of normal entities as 1 entity with N layers. Maybe even slightly faster because it doesn't have to go touch N entities. But reducing N will always give better render performance as it's less sprites to draw.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”