[0.17.72] Garbled biter graphics when they share the same position.

We are aware of them, but they have low priority. We have more important things to do. They go here in order not to take space in the main bug thread list.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

[0.17.72] Garbled biter graphics when they share the same position.

Post by eradicator »

(Kinda afraid that any graphical issues are just my garbage iGPU again...)

The non-collision biter change caused the spawn() method from my mod /sudo to spawn biters all in the same position. When spawning a lot of them at once i noticed they cause graphical artifacts.

This is what one hundred biters look like:
100-small-biters.png
100-small-biters.png (44.79 KiB) Viewed 1428 times

Here's a gutted example command:

Code: Select all

/c
local p = game.player

spawn = function(name,count,position,force)
    local count = count or 10
    local pos   = p.position
    if not (name and pos) then return end
    local created_entities = {}
    for i=1,count do
      table.insert(created_entities,p.surface.create_entity{
        name  = name,
        force = force or game.forces.enemy,
        position = p.surface.find_non_colliding_position(name,pos,32*2,0.5) or pos,
        })
      end
    return created_entities
    end
    
p.character.destructible = false
spawn('small-biter',100)
Attachments
config.ini
(24.68 KiB) Downloaded 119 times
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.
posila
Factorio Staff
Factorio Staff
Posts: 5359
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.17.72] Garbled biter graphics when they share the same position.

Post by posila »

Thanks for the report ;)

This is side-effect of compressing sprites with premultiplied alpha. The compression artifacts in compressed blocks that are normally not noticable without close inspection, will add-up in blocks that are not uniformly transparent or opaque when you draw the same sprite 100x over itself. It's minor issue ... just don't do that :D
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [0.17.72] Garbled biter graphics when they share the same position.

Post by eradicator »

posila wrote: Wed Oct 23, 2019 4:23 pm Thanks for the report ;)
You're welcome.
At least it's not just me then ;).
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.
Post Reply

Return to “Minor issues”