Generating sprites to display turret range from 1 to - lets say - 256 is not a problem. The problem is with displaying it. Factorio doesn't display sprites that don't fit on the screen, so sprites for long range turrets would never be displayed. You can see it even in the vanilla game when it comes to displaying working range of roboports and substations - and there are (modded) turrets that have range way longer than roboports.
I think I will try to improve performance in different way, by splitting number of entities representing range of a turret into groups and spawning only one group per tick (currently all entities are spawned at once). This should help a lot. The problem is that I can't really test it, because I have never had any performance issues with this mod... not even a slightest slowdown while using turret range probe tool for me So I will have to rely on your feedback for that. I think it would be best to make the entire spawning process configurable, i.e. how many entities can be spawned in one tick and how big should be interval (should entities be spawned in every tick, every two ticks etc.). This way everybody could adjust it to match their needs.
[MOD 0.12.16] Displaying range of turrets [v1.1.2]
Re: [MOD 0.12.16] Displaying range of turrets [v1.1.2]
On general principles, if each "UI entity" you spawn is size 1 tile, then I do think you'll want to spawn 2-3 such entities per 1/60s tick. Try that.
I haven't used your mod much, and only in SP, but I haven't had problems with it.
I haven't used your mod much, and only in SP, but I haven't had problems with it.
Re: [MOD 0.12.16] Displaying range of turrets [v1.1.2]
BUG: I'm getting this crash error when trying to clear the turret range, I first press right click and then once i press left click it will give me this error. I'm not clicking on a turret btw.
- Attachments
-
- Screenshot of error
- Untitled.png (2.65 MiB) Viewed 4613 times
Re: [MOD 0.12.16] Displaying range of turrets [v1.1.2]
What version of Factorio are you using? Any mods? I've tried but I can't reproduce this error, everything works fine for me. BTW there is no need to right click when clearing turret range.Xiomax wrote:BUG: I'm getting this crash error when trying to clear the turret range, I first press right click and then once i press left click it will give me this error. I'm not clicking on a turret btw.
My mods
Re: [MOD 0.12.16] Displaying range of turrets [v1.1.2]
Seems to happen when paving over turret range indicators - some get paved over, some don't. The concrete is still there over the yellow tiles, but trying to reset them crashes the game.
Must get rid of yellow squares. Any ideas?
- Ranakastrasz
- Smart Inserter
- Posts: 2173
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: [MOD 0.12.16] Displaying range of turrets [v1.1.2]
Same Error here.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Re: [MOD 0.12.16] Displaying range of turrets [v1.1.2]
Have you tried turning it off and then on again?
No, I'm actually serious. It might be the case that the Concrete overwrites the Turret Range markers, but if the range display function is disabled and then re-enabled, the new range markers will go on top of the Concrete.
I don't know. I don't have a savegame even close to being sufficiently advanced to test this. But it's a thought.
No, I'm actually serious. It might be the case that the Concrete overwrites the Turret Range markers, but if the range display function is disabled and then re-enabled, the new range markers will go on top of the Concrete.
I don't know. I don't have a savegame even close to being sufficiently advanced to test this. But it's a thought.
- Ranakastrasz
- Smart Inserter
- Posts: 2173
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: [MOD 0.12.16] Displaying range of turrets [v1.1.2]
No, that crashes the game, as seen above. If you attempt to remove the turret range, it crashes.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Re: [MOD 0.12.16] Displaying range of turrets [v1.1.2]
Here's an updated version of the mod. Should fix the issues with concrete deleting the indicators and the subsequent crash, so if you had a save ruined by 1.1.2, this should be able to fix it. Also fixes a couple of other potential bugs.
- Attachments
-
- turrets-range_1.1.3.zip
- (10.31 KiB) Downloaded 171 times