Author Topic: Interface: LOD For Turrets  (Read 3087 times)

Offline Kalzarius

  • Sr. Member Mark II
  • ****
  • Posts: 422
Interface: LOD For Turrets
« on: September 22, 2009, 07:05:45 pm »
I really like the new level of detail with only drawing a certain number of ships at farther zoom levels.  It helps to reduce clutter and improves draw speeds.  Would it be possible to add this for turrets as well?  We have systems with 100-200 turrets on each guard post, so it would nice to see those performance improvements extended to them as well.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Interface: LOD For Turrets
« Reply #1 on: September 23, 2009, 10:31:29 am »
Um... there's no LOD for any ships, not sure to what you are referring!  The recent performance improvement with the icons was relating to draw precomination, but it still draws the same number of ships as before (aka, all of them).  A feature for drawing fewer is under consideration for later work, and if done it would apply to all ships most likely (unless there is a manual grouping or something, in which case it would only apply to manually-grouped ships), but there's nothing like that in place right now.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Kalzarius

  • Sr. Member Mark II
  • ****
  • Posts: 422
Re: Interface: LOD For Turrets
« Reply #2 on: September 23, 2009, 07:39:13 pm »
Um... there's no LOD for any ships, not sure to what you are referring!  The recent performance improvement with the icons was relating to draw precomination, but it still draws the same number of ships as before (aka, all of them).  A feature for drawing fewer is under consideration for later work, and if done it would apply to all ships most likely (unless there is a manual grouping or something, in which case it would only apply to manually-grouped ships), but there's nothing like that in place right now.

I meant the precombination.  It looked like LOD to me because when I zoomed out, a bunch of the ships faded to transparent so that only a few of them were visible instead of all mangled together like I see for the turrets.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Interface: LOD For Turrets
« Reply #3 on: September 23, 2009, 07:50:10 pm »
They faded to transparent?  That's bad, that's not supposed to happen.  Visually, there should be almost no difference with the precomination stuff, except that the layering is different so that the full icon is shown on top of one another, rather than having all the icons on top, then all the borders behind.  Can you post a screenshot of this?
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline ldlework

  • Full Member
  • ***
  • Posts: 112
Re: Interface: LOD For Turrets
« Reply #4 on: September 23, 2009, 07:54:34 pm »
Are you saying "precomination" on purpose or are you missing the 'b' in precombination?

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Interface: LOD For Turrets
« Reply #5 on: September 23, 2009, 07:55:42 pm »
Are you saying "precomination" on purpose or are you missing the 'b' in precombination?


precombination
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Kalzarius

  • Sr. Member Mark II
  • ****
  • Posts: 422
Re: Interface: LOD For Turrets
« Reply #6 on: September 23, 2009, 11:16:46 pm »
...

It had seemed to us that whenever we zoomed out to a point that two units were too close together, one of their icons would fade away.  We thought this was pretty nifty and figured it was some sort of LOD.

We can't replicate.  We're not sure if it was some shared hallucination or what, but at present, we'll have to get back to you if we can replicate it again.  :-\

Offline Magitek

  • Jr. Member Mark II
  • **
  • Posts: 72
Re: Interface: LOD For Turrets
« Reply #7 on: September 23, 2009, 11:21:44 pm »
In reality I think it would be prudent to condense these sort of things into circles that simply shows a single icon for the unit type followed by the amount. Only while zoomed out ofcourse.
There's not a great deal of purpose in having dozens of icons overlapped, indistinguishable from each other.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Interface: LOD For Turrets
« Reply #8 on: September 23, 2009, 11:36:35 pm »
The combination logic is way more complex than you might honk. I have thought about this a fair bit, but have not yet come up with a good algorithm. It is easy to say "just show one per circle" or whatever, but an algorit has to pick the cener and size of those circles.  Bearing in mind uneven distributions of size, a non-grid-based point space, etc.  I have solved a similar problem in the past with getting rid of extra range lines -- you can see that in action.  But you will Aldo note that they tend to jump around a bit as ships move. Not critical for range lines, but very bad for ships.

Then there is also the issue of putting up numbers, to show collapsed ship values, and the problem of overlap beteen ship types. It seems to me there will be too much text clutter in practice to actually make this more visually simple. I think the only real solution is grouping or stacking of units ala civ iv.  But, thY has a TON of other implications of it's own.

And, in the end I also think it might hurt the sense of scale, so even if I solve the other problems it is not 100% certain that the change is complety desirable.  It seems like the other interface suggestions already implemented and still on the list are more promising.  I am reluctant to embark on such a massive rewrite for something that might hurt the sense of scale (a primary selling point) and which might well be solved via simpler methods, anyway.

As for the disappearing thing, maybe it was that vanishing ships bug that fiskbit and taps reported in the 1.301 prereleases. That was fixed for the final version, so it could be why you no longer see it. That was just for ships being pushed by force fields, though.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline RCIX

  • Core Member Mark II
  • *****
  • Posts: 2,808
  • Avatar credit goes to Spookypatrol on League forum
Re: Interface: LOD For Turrets
« Reply #9 on: September 23, 2009, 11:42:15 pm »
In my opinion it would boost the sense of scale. Gives you more of a feel of "controlling chess pieces" as opposed to "herding masses of stampeding units"...
Good point though it's hard to figure out where and what size to place those circles.
Avid League player and apparently back from the dead!

If we weren't going for your money, you wouldn't have gotten as much value for it!

Oh, wait... *causation loop detonates*

Offline Magitek

  • Jr. Member Mark II
  • **
  • Posts: 72
Re: Interface: LOD For Turrets
« Reply #10 on: September 24, 2009, 12:01:53 am »
I never said it would be easy ;D
I've seen this done somewhere else but at the moment I cannot recall, i'll get back to you sometime when I remember it.

The easier way is probably to not calculate where to start it, but simply start connecting ships dot to dot. you could just do this for turrets on wormholes if too intensive, or add it to the options for those of us with grunty machines.
When the dot-to-dot cannot connect to anything of its same type and is greater than 15 units in number, use render-to-texture to place alpha channel circles(over each unit) on a new texture, which is then applied to the either the original unit, or average center and stretches over the area. Apply your favorite color!

A loop check of 4000-8000 units in should be within cpu restrictions. It's possible you might have to parse it every 60 frames, or calculating 100 ships a frame and only at farzoom etc
Its also quite possible this will be uneven, but will provide FAR more information per second than mess of ships at farzoom.

Ship types inside the circle should just be a single color-outlined icon with number next to it, I don't think thats clutter compared to a 50 turrets dotted everywhere.

This is mostly theory, and i'm not saying to implement this.. I would just like to see a slightly sexier implementation of far zoom battlefield information.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Interface: LOD For Turrets
« Reply #11 on: September 24, 2009, 11:37:28 am »
Just bear in mind that the CPU is already extraordinarily busy.  It already does loop checks for hundreds of thousands (sometimes millions) of calculations.  Adding in a few thousand more might not seem like much, but it's significant -- partly because it's never just a loop, etc. We shall see.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline ldlework

  • Full Member
  • ***
  • Posts: 112
Re: Interface: LOD For Turrets
« Reply #12 on: September 24, 2009, 02:36:20 pm »
If you remove the 1000s of onscreen units and my ability to freely zoom in and out to see them /all/ at different levels and at the same time impress myself and everyone around me I will cry in real-life.


Seriously - what are you *thinking* ?

Get your hands off my AI War you dogs.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Interface: LOD For Turrets
« Reply #13 on: September 24, 2009, 02:38:45 pm »
This would never be more than an option, default to off, so don't worry. ;)
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Magitek

  • Jr. Member Mark II
  • **
  • Posts: 72
Re: Interface: LOD For Turrets
« Reply #14 on: September 24, 2009, 02:39:16 pm »
If you remove the 1000s of onscreen units and my ability to freely zoom in and out to see them /all/ at different levels and at the same time impress myself and everyone around me I will cry in real-life.


Seriously - what are you *thinking* ?

Get your hands off my AI War you dogs.

at maximum zoom, you cannot see them 'all' because its just a big blob of sprites. I'm thinking about gameplay, if you want impressive, boot up sins.