Page 1 of 1
simple-entity with runtime color
Posted: Wed May 10, 2017 9:36 pm
by justarandomgeek
Now that simple-entities can have graphic variations, they can *almost* replace the rotating car hack for nixie tubes. However, as far as I can tell, I can't apply runtime tints to a simple-entity or any of the obvious variants thereof, which is what's holding me back from switching. Is there any way to tint a simple-entity? If not, can we have tintable one?
Re: simple-entity with runtime tint
Posted: Wed May 10, 2017 9:45 pm
by Rseding91
Virtually everything that takes a sprite can take a tint value as well.
You just sent "tint" in the prototype sprite definition and it's tinted.
Re: simple-entity with runtime tint
Posted: Wed May 10, 2017 9:48 pm
by justarandomgeek
Rseding91 wrote:Virtually everything that takes a sprite can take a tint value as well.
You just sent "tint" in the prototype sprite definition and it's tinted.
I don't want to define a different entity prototype for each color that might come up though, I want to set simple-entity.color at runtime (based on circuit signals/lamp colors), to replace both the car, and the character i'm putting in it to have something with controllable graphics (via variations) and color.
Re: simple-entity with runtime tint
Posted: Thu May 18, 2017 12:59 am
by justarandomgeek
To clarify further, I want to be able to set `apply_runtime_tint = true` on the sprite for a simple-entity of some sort, and then at runtime set both it's variation and color as required in control.lua.
Re: simple-entity with runtime tint
Posted: Mon Jun 26, 2017 12:57 pm
by justarandomgeek
According to Visual Studio's profiling, the updating of positions on cars/characters used by Nixie Tubes (and re-linking them to lognets) is apparently ~30% of the CPU time factorio uses for me currently. The only thing preventing me from switching them to use a simple-entity variant instead for this *HUGE* performance improvement is the lack of color support.