Fleet Display on the galaxy map

Development of artwork, requests, suggestions, samples, or if you have artwork to offer. Primarily for the artists.
Message
Author
User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Fleet Display on the galaxy map

#91 Post by eleazar »

pd wrote:Won't this effect galaxy size in general and therefore render all current assumptions for what to use on what zoom level obsolete?
Besides what Tzlaine said, the change isn't a huge one.
I've not been able to find in another galaxy, stars so close (~120px) as in the example that alarmed me.

It's not too hard to find stars of ~250 px distance if you look in a dense part of the galaxy, but the vast majority are further away from each other. Actually ~300 seems to be the average distance in the close-packed parts of the galaxy.

~350 would give more breathing room for ships and so forth, but might have some effect on the distribution of stars, like perhaps make the spacing very uniform in large galaxies, which i don't especially want to see... it's something to look out for at least.


EDIT:
tzlaine wrote:No, that 30.0 value is in universe units, not pixels
How do "universe units" convert to pixels at max zoom?

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Fleet Display on the galaxy map

#92 Post by eleazar »

Is there anything else i need to work on or clarify in this topic?

I expect i've been too vague about what happens to system rings at the lowest 4, or 5 zoom levels. Mainly because i haven't figured it out yet. i expect there will be some complications as things get really compressed.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Fleet Display on the galaxy map

#93 Post by Geoff the Medio »

eleazar wrote:How do "universe units" convert to pixels at max zoom?
The code's max zoom factor is currently 8, so it might be 240 pixels... You can check though, by looking at the speed of a fleet with a colony ship (speed 50 as seen on the design screen) and seeing how far it moves each turn on the map. You can tell where it will end up the turn after leaving a system by where the move line meets the starlane. Currently the distance is shown as if it starts the turn at the centre of the star when leaving a system.

Edit: After a quick test, it looks like the 8 factor is accurate. So a colony ship would move 400 pixels per turn at max zoom, and systems 30 universe units apart would be 240 pixels apart.

The attached shows two systems 250 pixels apart at full zoom.

I'm a bit worried about compressing movement (of less than the full distance between systems) between systems into the length of starlane between the circles in cases like these. I'm not sure what we're doing for detection of fleets on starlanes, but it would probably be distance-based, like other detection / stealth checks, and distorting the positions of fleets by compressing that whole line into the small space between the circles would make it difficult to see what distance applies to those fleets, since their actual universe position wouldn't match with their on-screen position relative to nearby systems.
Attachments
two close systems, about 250 pixels apart at full zoom (8.0)
two close systems, about 250 pixels apart at full zoom (8.0)
full-in-zoom.png (68.32 KiB) Viewed 2461 times

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Fleet Display on the galaxy map

#94 Post by eleazar »

Geoff the Medio wrote:After a quick test, it looks like the 8 factor is accurate. So a colony ship would move 400 pixels per turn at max zoom, and systems 30 universe units apart would be 240 pixels apart.
Thanks, that's easy to remember.

Unfortunately that means that the 30 uu (universe unit) measurement tzlaine quoted either,
  • 1) doesn't work, or
    2)is only applied in a particular galaxy shape
...because, these two stars are about 15 uu appart.

Geoff the Medio wrote:I'm a bit worried about compressing movement (of less than the full distance between systems) between systems into the length of starlane between the circles in cases like these. I'm not sure what we're doing for detection of fleets on starlanes, but it would probably be distance-based, like other detection / stealth checks, and distorting the positions of fleets by compressing that whole line into the small space between the circles would make it difficult to see what distance applies to those fleets, since their actual universe position wouldn't match with their on-screen position relative to nearby systems.
If things are going to look like this example, you would have a reason to worry. But:
  • 1) hopefully MIN_SYSTEM_SEPARATION can be made to work and enforce more space between systems, but if not

    2) the system rings are bigger than they need to be. I recommend a radius of 8 uu, not 12 uu.
    rings.jpg
    rings.jpg (59.16 KiB) Viewed 2455 times
    3) I would have recommended that fleet detection is by starlane and not linear distance anyway, i.e. you can detect the presence of fleets in any starlanes connecting to a system in which you have a source of vision. Perhaps later techs would give you more info on the fleets and/or extend it over additional starlanes. Reasons:
    * * It is simple to understand
    * * It is easy to show on the map. The fog of war indicator discussed previously works better if we don't have to apply it to lanes
    * * On the flip side additional indicators showing the ranges of various galactic "detectors" needed to make linear distance detection clear would tend to clutter up the screen much more, and thus be something that the player would turn off more of the time.
    * * Technobabble: travel through a starlanes causes hyperspatial "ripples" which can be detected at either end. These ripples can be measured to indicated the rough size and range of approaching fleets, or to give even more info a higher tech levels.
But this starts to be another topic.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Fleet Display on the galaxy map

#95 Post by Geoff the Medio »

eleazar wrote:Unfortunately that means that the 30 uu (universe unit) measurement tzlaine quoted either,
  • 1) doesn't work, or
    2)is only applied in a particular galaxy shape
...because, these two stars are about 15 uu appart.
Irregular galaxies seem to use their own custom adjacency checking, which is part of a slightly different way to place systems than the other galaxy shapes. I've rewritten it to use the same methods as the other shapes, and am currently recompiling to test. Hopefully the distance checking will end up working. If not, we can still just remove irregular galaxies.
2) the system rings are bigger than they need to be. I recommend a radius of 8 uu, not 12 uu.
I'll add an option to make the ring size adjustable as a multiple of the system icon size (which is itself adjustable in SVN). (The rings have no in-universe meaning, so don't really have a size in universe units... they're just a graphical issue)
I would have recommended that fleet detection is by starlane and not linear distance anyway, i.e. you can detect the presence of fleets in any starlanes connecting to a system in which you have a source of vision.
That would eliminate the usefullness of fleet stealth on the map and make sneak / stealth attacks impossible in many situations.
The fog of war indicator discussed previously works better if we don't have to apply it to lanes
We wouldn't need "fog of war" indicators for starlanes. Individual fleets can / could have different stealth levels (as determined by the ships in them) and would be seen or not. If you see a fleet, you don't need to mark it with a fog of war indicator, and if it you don't, there's nothing to mark.

Systems are different, since the player can know they exist at a particular location without being able to see into them.

I don't remember exactly if there were supposed to be levels of detection beyond visible / not, with intermediate levels showing presence and location but not all details about something. If there are intermediate levels of detection, we'd need a way to let players know there is *something* at a location in space / on a starlane, but not what. For this, we'd need a "generic / unknown object" marker, which could perhaps be textured similarly to a fog-of-war-obscured system.

(I need to review / clarify / finalize those details of detection.)

tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

Re: Fleet Display on the galaxy map

#96 Post by tzlaine »

Geoff the Medio wrote:
eleazar wrote:Unfortunately that means that the 30 uu (universe unit) measurement tzlaine quoted either,
  • 1) doesn't work, or
    2)is only applied in a particular galaxy shape
...because, these two stars are about 15 uu appart.
Irregular galaxies seem to use their own custom adjacency checking, which is part of a slightly different way to place systems than the other galaxy shapes. I've rewritten it to use the same methods as the other shapes, and am currently recompiling to test. Hopefully the distance checking will end up working. If not, we can still just remove irregular galaxies.
I had no idea irregular galaxies used a different system. It's been years since I looked at that code. Let's try to keep irregular galaxies, though, okay? They're the ones I always play.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Fleet Display on the galaxy map

#97 Post by Geoff the Medio »

The irregular galaxy generation now imposes adjacency limits as it should. Still using 30 universe units for the minimum distance, though.

The system icon circles are now 1.2 times the size of the system icon by default, but can be configured. The size of the system icon is hard to see since the disc and halo are both of different sizes, but it's about 1/1.2 times the size of the diameter of the circles on the screenshot below, at full zoom.

I'm also in the midst of tweaking how zoom range limits are determined, so now the full-in zoom scaling factor is 1.25 ^ 9 = 7.45 instead of 8.0. This comes about from there being 9 steps of zoom in from default (zoom scaling = 1.0) and each step being a multiplicative factor of 1.25 bigger scaling from the previous step.

Based on that, the stars below are about 30 universe units apart. They were about the closest of any stars I saw in a 500 star galaxy.
Attachments
close stars at full-in zoom after fixing adjacency testing of irregular galaxies
close stars at full-in zoom after fixing adjacency testing of irregular galaxies
Irregular_Galaxy_Close_Stars.png (82.57 KiB) Viewed 2415 times

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Fleet Display on the galaxy map

#98 Post by eleazar »

Geoff the Medio wrote:The system icon circles are now 1.2 times the size of the system icon by default, but can be configured. The size of the system icon is hard to see since the disc and halo are both of different sizes, but it's about 1/1.2 times the size of the diameter of the circles on the screenshot below, at full zoom.
I don't understand what you are trying to do. The main points of the system ring are to:
1) give a visible boundary to a star's clickable area
2) make visual sense of the fact that fleet icons don't cross into a star's clickable area.

I don't see any purpose to increasing the ring size 1.2 times (or any other multiplier) beyond the clickable area. It just introduces a dead zone with an invisible border on the inside, and increases the compression of visibly traveled star lane distances- which you were earlier concerned about.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Fleet Display on the galaxy map

#99 Post by Geoff the Medio »

eleazar wrote:I don't see any purpose to increasing the ring size 1.2 times (or any other multiplier) beyond the clickable area.
"system icon size" is not the same as "clickable area". For most things in the UI, the clickable area is a rectangle that is the same size as the thing. But for system icons, I've change that test to check whether the cursor is within some distance of the centre of the icon, making the clickable area a circle. I also used the same radius for that distance as I do for drawing the circle around the system.

At this point, the "system icon size" is not really tied to anything on screen anymore, now that I think about it. I actually reduced the size of the ring to 1.2 from 1.5 times the size of the icon after you suggested making the ring smaller.

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Fleet Display on the galaxy map

#100 Post by eleazar »

Geoff the Medio wrote:I'm also in the midst of tweaking how zoom range limits are determined, so now the full-in zoom scaling factor is 1.25 ^ 9 = 7.45 instead of 8.0. This comes about from there being 9 steps of zoom in from default (zoom scaling = 1.0) and each step being a multiplicative factor of 1.25 bigger scaling from the previous step.
I liked it better when for a few hours we could easily convert pixels to uu. You couldn't end on something rounder than 7.45 so we can do the conversion easily?

What about the steps below default zoom? Are there still 4? down to IIRC 25% of default?

Geoff the Medio wrote:But for system icons, I've change that test to check whether the cursor is within some distance of the centre of the icon, making the clickable area a circle. I also used the same radius for that distance as I do for drawing the circle around the system.
In other words the system circle— no matter how it is adjusted— bounds the click area for a system? If so, that's what i want.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Fleet Display on the galaxy map

#101 Post by Geoff the Medio »

eleazar wrote:You couldn't end on something rounder than 7.45 so we can do the conversion easily?
We could, but 1.25 is a nice amount to zoom per step, and 1.25 ^ n isn't a nice round number for any value of n other than 0.
What about the steps below default zoom? Are there still 4? down to IIRC 25% of default?
There are still four zoom steps out from default, each of each shrinks everything by a factor of 1.25, which gives a final shrink factor of 0.41 = 1/1.25^4. The old max (min?) was, I think 0.35.

More steps can be added above or below the current max and min, as well. I think there was a bug a while back that was causing crashes when zooming in or out too much, but I think that was related to font sizes which shouldn't be an issue now, as long as the font size doesn't change too much with zoom level, and never goes below the renderable threshold, whatever that exactly is.

We could also possibly make the zoom step sizes not all uniform multiplicative factors... So the zoom levels could be, for example, 0.25, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 6.0, 8.0. These could probably be made configurable in a text file an/or the GUI, as well. This would take a fair bit more coding to make happen though...

Alternatively, I'd like to have the zoom be completely free, so you could pick any factor, without being limited to preset steps. We'd need another way to control the zoom for this to work though, since the mousewheel only moves in whole integer clicks. I'm in the midst of adding a slider to the map that will let the player zoom without using the wheel or hotkeys, but there are some issues with how the slider works that I'm waiting to hear back from tzlaine about. Ideally the slider could be moved with arbitrary precision, but the way the background starfields are positions would make this look very strang when zooming slowly through levels.

Also, I'd like to add a distance indicator to the map that shows how far some distance on screen is in universe units.

Both the slider and distance indiactor would be similar to those of google maps, for example.


EDIT: It occurs to me that the cube root of 2.0 is pretty close to 1.25, and the cubed root of 2.0 raised to power of any multiple of three is a nice round number... I think I'll switch the scaling factor to that. This means the max zoom factor will be 8 again, with 9 steps in. The min zoom factor will be 2 ^ (-4/3) which is about 0.4, although that can be made bigger or smaller.
In other words the system circle— no matter how it is adjusted— bounds the click area for a system? If so, that's what i want.
That's how it works now.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Fleet Display on the galaxy map

#102 Post by Geoff the Medio »

Made moving fleets' icons point in the direction of travel...
Attachments
Fleet_Icons.png
Fleet_Icons.png (45.99 KiB) Viewed 2296 times

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Fleet Display on the galaxy map

#103 Post by Geoff the Medio »

And now I've done some tweaking of how fleets are placed around system icons... Rather than the suggested system with complicated rules for stacking around the curve that differed between fleet icons, I've placed the icons by filling a series of shells around the quarter of the system icon where the fleets of each type (moving or not) are located. The shells fill in from the centre outwards, and when the shell is full, the next shell starts being filled. Each shell is one fleetbutton radius further out than the previous, and the outer shells can fit more icons than the inner ones. No icon is allowed to touch the vertical line or horizontal line running through the system's centre point.

I'm thinking that a slightly larger outline of the fleet icon, or a background of some sort would be beneficial. Even the largest icons can be pretty small, even when fully zoomed in. The icons can also clash or blend in with starlanes when on top of them...
Attachments
At max zoom, illustrating multiple empires' fleet icons at a system and moving along starlanes
At max zoom, illustrating multiple empires' fleet icons at a system and moving along starlanes
Fleet_Icon_Placement.png (56.66 KiB) Viewed 2274 times

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Fleet Display on the galaxy map

#104 Post by eleazar »

Geoff the Medio wrote:And now I've done some tweaking of how fleets are placed around system icons... Rather than the suggested system with complicated rules for stacking around the curve that differed between fleet icons, I've placed the icons by filling a series of shells around the quarter of the system icon where the fleets of each type (moving or not) are located. The shells fill in from the centre outwards, and when the shell is full, the next shell starts being filled. Each shell is one fleetbutton radius further out than the previous, and the outer shells can fit more icons than the inner ones. No icon is allowed to touch the vertical line or horizontal line running through the system's centre point.
That's pretty much the result i was trying to get at.
My only concern is that all these examples are fleets of a single ship. Does it all still fit when the fleet icon has the large "tail"? Of do you allot space based on the visible size of the icon?
Geoff the Medio wrote:I'm thinking that a slightly larger outline of the fleet icon, or a background of some sort would be beneficial. Even the largest icons can be pretty small, even when fully zoomed in. The icons can also clash or blend in with starlanes when on top of them...
Hmmm, i did most of my size testing with fleets with the max-sized "tail". Now that you point the issue out, it was a mistake

* I need to remake the fleet icons so the "head" is a large enough click target even when it's a fleet of one, i.e. the tail should take up less of the total space.

* Maybe the big sized icons will work on the galaxy map after all, especially is space is apportioned according to how big the icon is visibly on screen.

* If i change the file dimensions on these, will that mess everything up, or does it work from the file dimensions?

Anyway, i have a flu, and am not sure i'm entirely coherent at the moment, i'll probably not do anything for a few days.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Fleet Display on the galaxy map

#105 Post by Geoff the Medio »

The mouseover / clickable area of a fleet icon is currently a circle with a diameter that is the average of the width and height of the texture. This circle diameter is also used to determine the spacing of the icons around system icons, and is shown as a white background for mouseover or empire-coloured background when clicking.

"The texture" is the whole texture, not just the visible part.

For icons with something near the corners instead of just in the middle or at the middles of sides, the icon can appear to stick outside the circle. I don't think this is a huge problem though, since it doesn't affect usability and there aren't many collisions between adjacent icons in practice. Icons with tails still fit reasonably well right now, although icon heads that stick out towards the upper corners might bump into the bottom corners of chevrons of adjacent icons in some cases.

There's a minor issue with the tiny fleet icons, which are the most different in height and width. The icon is blitted to the top left corner of the space where it's drawn, and the circle is centred on that space, so the mouseover circle for tiny icons, which is wider than the icon is wide, shows up a pixel or so too far right. I can probably fix this, or the texture could be made a bit wider by padding with alpha 0 pixels.

The size of the circle (clickable and shown) of a fleet icon is currently determined from the larger of the head and size textures. The size used for spacing of fleet icons around system icons is determined from the 1 ship fleet size texture for the current zoom level. (For tiny icons, the size texture is the single or multi-fleet icon.) At present, these are all the same size at each zoom level other than tiny, so things mostly work out. If different textures were different sizes, there might be problems with the layout.

One issue is that it can be a little distracting and confusing to zoom in and out and have the fleet icons rearrange as more or less space becomes available in the inner rings around system icons.
Attachments
when zoomed out
when zoomed out
Tiny-Fleet-Icons.png (24 KiB) Viewed 2252 times
when zoomed in.  white circles indicate mousing over
when zoomed in. white circles indicate mousing over
Moused-Over-Fleet-Icon.png (37.89 KiB) Viewed 2254 times

Post Reply