Sector Siege needs improvement

#37
(This post was last modified: 11-18-2017, 05:42 AM by starfox1701.)

(11-17-2017, 02:27 PM)AdmiralGeezer Wrote: Well, could always be something in the code. However, I have checked with a profiler tool and optimized the game a lot. I've used many tricks to do this, and all of it happens when the units are hidden from the player.

A single unit affects multiple things. Even a single fighter has to be taken into account regarding fog of war, updating it regularly. The unit has to scan for nearby units and mark them as visible or not compared to itself. The fighter also has to periodically scan for nearby units and find a target. A movement trajectory has to be calculated and the fighter has to follow this.

A single turret needs to periodically scan for nearby units and find a target. If a big ship unit has 10 turrets it means merely this one unit already has 10 turrets looping through all enemy units, and doing calculations to find a target.

Smooth rotation of turrets and fighters seem to take a bit too. And there are a lot of turrets and fighters.

All of this means there is a lot of looping through objects and calculations going on. Adding more units immediately means the lists grow for units and turrets.
I stay clear from doing scanning and calculations every frame of course, and from doing all calculations for all units on the same frame. I use a lot of other tricks to make the game perform a lot better.

I hear what your saying. I just can't help but feel something is off because they beauty of sprites is how resource lite they are and these kind of calculations are bread and butter stuff for a cpu. For the numbers we are talking they shouldn't even put a dent in a quad core or octi core processor like my phone has every. The game just shouldn't be able to lag the processor. There just shouldn't be enough going on.  I mean look at some of the mods 4 games like Empire at War or Sins of a Solar Empire. They use high poly 3d models with 3d turrets and hav similar tracking with 10 times the assets before lag becomes an issue. Its got to be a software problem with the engine but for the life of me I don't know where to look.

What's the res on your textures? Loding them might help some especially if you are running really high res like 4096 or higher and file type might also be a factor as some formats are significantly larger than others for the same resolution.
Reply


Messages In This Thread
Sector Siege needs improvement - by hunter - 10-27-2017, 11:53 AM
RE: Sector Siege needs improvement - by joe1512 - 10-27-2017, 03:46 PM
RE: Sector Siege needs improvement - by Perq - 11-03-2017, 09:08 AM
RE: Sector Siege needs improvement - by Perq - 11-03-2017, 01:14 PM
RE: Sector Siege needs improvement - by Perq - 11-03-2017, 02:16 PM
RE: Sector Siege needs improvement - by joe1512 - 11-03-2017, 08:13 PM
RE: Sector Siege needs improvement - by Perq - 11-04-2017, 08:59 AM
RE: Sector Siege needs improvement - by Fear - 11-04-2017, 04:38 PM
RE: Sector Siege needs improvement - by Perq - 11-05-2017, 12:19 AM
RE: Sector Siege needs improvement - by joe1512 - 11-06-2017, 04:33 PM
RE: Sector Siege needs improvement - by Farwest - 11-08-2017, 03:35 PM
RE: Sector Siege needs improvement - by joe1512 - 11-08-2017, 11:56 PM
RE: Sector Siege needs improvement - by Ailab - 11-10-2017, 04:49 PM
RE: Sector Siege needs improvement - by joe1512 - 11-10-2017, 06:36 PM
RE: Sector Siege needs improvement - by Ailab - 11-11-2017, 11:02 AM
RE: Sector Siege needs improvement - by joe1512 - 11-13-2017, 08:16 PM
RE: Sector Siege needs improvement - by joe1512 - 11-13-2017, 11:42 PM
RE: Sector Siege needs improvement - by joe1512 - 11-16-2017, 07:28 PM
RE: Sector Siege needs improvement - by starfox1701 - 11-18-2017, 05:31 AM
RE: Sector Siege needs improvement - by joe1512 - 11-17-2017, 03:43 PM



Users browsing this thread:
1 Guest(s)