Author Topic: AI War 2 v0.608 Released! "Interface Evisceration"  (Read 4646 times)

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
AI War 2 v0.608 Released! "Interface Evisceration"
« on: November 28, 2017, 10:28:44 pm »
Release notes here!

This one is almost all about UI.

The meat of it was totally redoing two key parts of the UI: the main ship tooltip, and the pre-game lobby. I'm sure both still need a lot of work, so please give us feedback (note: I know the lobby doesn't look right on lower resolutions because I tested it on a higher res and made the text too cramped). I would include screenshots for discussion but getting and posting them is a multi-stage process and I've really got to get some sleep. Perhaps one of you kind galactic-conquerers would post them instead?

Some key issues with UI scaling have been dealt with, so you should be able to use it reliably all the way down to 30% (its new minimum) if you've got a screen suitable to it. Again, feedback both needed and welcome.

Where wormholes show the name of the planet on the other side, they now show that name in the color of the faction that controls said planet. The text and color is now moddable as part of galaxy display modes, so you can have it display something different if you like (and don't mind the C# code-mine).

Fabricators, ARS's, and other units that can grant you a specific ship type now include the name of that ship type in their tooltip.

And a few other fixes.

Enjoy!
Keith
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 TheVampire100

  • Master Member
  • *****
  • Posts: 1,382
  • Ordinary Vampire
Re: AI War 2 v0.608 Released! "Interface Evisceration"
« Reply #1 on: November 28, 2017, 11:01:53 pm »
Oh my god, this finally fixed the movement of the camera for me. It was so annoying to rely on the keyboard for that.

Also, the upper bar is now... black? i guess this ot's mire readable, black background so the Ui does not blend in with the game visuals. Is this a placeholder for now? The "black on black" seems kinda meh for now. To be more specific, I mean the color of the UI background compared to the color of the game background (the black nothingness of the galaxy).

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: AI War 2 v0.608 Released! "Interface Evisceration"
« Reply #2 on: November 28, 2017, 11:35:53 pm »
I have a few problems on Linux. Note that I always recompile External code on Linux, so its conceivable that I have some local changes that caused this (or maybe something went awry with the csproj changes?). OSX works fine.

 When I turn on the game I immediately get an error like

11/28/2017 11:09:18 PM   Finished calling RunInitialSetup for Arcen.AIW2.External.InitialSetupForDLL from AIWarExternalCode
11/28/2017 11:09:20 PM   Called CreateFromDirective when Identifier.ControllerType==null; means we were unable to find controller type tBackground <=====
11/28/2017 11:09:21 PM   Harmless Info: dll AIWarExternalVisualizationCode does not contain a IInitialSetupForDLL type. This is fine, but if you're the author of that dll and want it to run init-code, it ain't happening right now.

I can't see the resource bar at all, which is probably fallout from this issue.

I also immediately hit a crash I opened as https://bugtracker.arcengames.com/view.php?id=19300,

NullReferenceException: Object reference not set to an instance of an object
Stack Trace: Arcen.Universal.ArcenUI_Element.UpdateFromUI () (at C:/vcprojs/arcengames_aiw_ultra/ArcenUniversal/src/ArcenUI/ArcenUI_Element.cs:219)
Arcen.Universal.ArcenUI_Window.OnUpdate () (at C:/vcprojs/arcengames_aiw_ultra/ArcenUniversal/src/ArcenUI/ArcenUI_Window.cs:89)
Arcen.Universal.ArcenUI.OnUpdate () (at C:/vcprojs/arcengames_aiw_ultra/ArcenUniversal/src/ArcenUI/ArcenUI.cs:181)
Arcen.Universal.Engine_Universal.OnUpdate () (at C:/vcprojs/arcengames_aiw_ultra/ArcenUniversal/src/Engine_Universal.cs:926)
ArcenGameController.Update () (at C:/vcprojs/arcengames_aiw_ultra/AIW2Unity/Assets/ArcenCode/ArcenGameController.cs:39)
...
11/28/2017 11:12:57 PM   Null controller! BasicNonInteractableImageDrawer 4

 The green wormhole itself tends to overlap the planet name a bit, which makes some names hard to read (stuff with a y in the middle of the name, for example, have the bottom of the y cut off). Perhaps move the text up a bit?

I think I prefer the new tooltip menu. I don't mind lots of text, and not having a million symbols to remember is nice.

I'm not sure I'm convinced by having a bunch of drop-down menus for Special Factions instead of having an "On/Off and Intensifier Setting" for each one (and once we have enough factions then you could just put a scrollbar to them). I think the AI might need its own tab eventually (I'd like to have some of the Wave settings available as AI specific tunings eventually, and those aren't Special Factions by any stretch of the imagingation).

I am looking forward to when the notion of an Intensifier is added to a Special faction (like how you could have Dyson Sphere: 4/10 in AIWC), if only so I can start trying to tune some of the factions.

I think the Settings menu needs to use a Tab infrastructure similar to the Game Lobby to make the sheer number of settings less overwhelming.

I kinda want to turn the Wormhole name Red (or some suitable "be scared" colour identifier) if you know there's a wave headed through that wormhole (ie once you get a warning in the toolbar it will also change the wormhole name colour). I can code it if people think that sounds like a worthwhile idea.

Offline Draco18s

  • Resident Velociraptor
  • Core Member Mark V
  • *****
  • Posts: 4,251
Re: AI War 2 v0.608 Released! "Interface Evisceration"
« Reply #3 on: November 29, 2017, 12:13:54 am »
I have one major concern:

Every time I use the sidebar to select a type of unit (double-clicking doesn't work yet) the game immediately snaps to a max-far-zoom and I have to zoom back in again to issue my orders.

I also lost the game just after establishing a foothold across 4 systems that formed a 1-entrance chokepoint. Why? Because I had the audacity to download a design from a backup server.  10,000 (strength worth of?) ships spawned pretty much on top of me and utterly cleaned my clock. These ships included Spiders, which engine damaged my ark into uselessness.

Second fairly curious issue was that after a fight was over, my units would irregularly spawn explosion particles/sounds even though they were not being shot at (much less being blown up). No idea what that was about.
« Last Edit: November 29, 2017, 12:25:10 am by Draco18s »

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: AI War 2 v0.608 Released! "Interface Evisceration"
« Reply #4 on: November 29, 2017, 08:14:54 am »
Looking into the various reports, thanks :)

Also, the upper bar is now... black?
It was previously, but it got there by having each individual "cell" have a background, which went wonky a few versions ago when the underlying texture was changed. So I replaced it with a single background that goes behind the whole thing.

Quote
To be more specific, I mean the color of the UI background compared to the color of the game background (the black nothingness of the galaxy).
The game background doesn't look black to me. Perhaps it's a difference between the randomly-rolled backgrounds I'm getting and the ones you're getting.

I can make it a more-transparent background, if it helps.

It's not specifically placeholder but I imagine Blue will go over it along with various other bits of the UI once we're done changing the functionality :)
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 keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: AI War 2 v0.608 Released! "Interface Evisceration"
« Reply #5 on: November 29, 2017, 09:30:10 am »
Ok, 0.609 hotfix is out now, with a lighter top-bar-background and:

11/28/2017 11:09:20 PM   Called CreateFromDirective when Identifier.ControllerType==null; means we were unable to find controller type tBackground <=====
As I said in the mantis note, I think there's some mismatch in your external code (specifically the resource bar file) but I've added some protections against this happening.


On other notes:

Quote
The green wormhole itself tends to overlap the planet name a bit, which makes some names hard to read (stuff with a y in the middle of the name, for example, have the bottom of the y cut off). Perhaps move the text up a bit?
I don't know if I can adjust the position from code or whether that means modifying the prefab (which requires a bunch of unity rebuilding stuff that's straightforward but makes the release more complex).

One more basic question, though: is it better to have the text below the wormhole? Can probably accomplish that by putting a couple newlines in the text :)


Quote
I'm not sure I'm convinced by having a bunch of drop-down menus for Special Factions instead of having an "On/Off and Intensifier Setting" for each one (and once we have enough factions then you could just put a scrollbar to them).
Three reasons:
1) Support for multiple factions of the same type in the game at once. There's no particular reason we can't have 2 or 3 cookie monsters with different colors, for instance, other than player cowardice (and the code for that faction would need to accomodate the possibility). The lack of code support is the reason those are set to only allow one each.
2) Support for more parameters for those factions than just an intensity. Just like the AI has the "AI Type" parameter that basically makes it a sub-type of AI, you could have sub-types of Devourer or Dyson or Trader or Nanocaust or whatever. Also more basic things like picking faction color, once that gets in.
3) Moving away from "Special Factions" as distinct from the "main" factions, and thus moving away from the hardwired "always a player-controlled human faction, always a computer-controlled AI faction, everything else is just an appendage" model. This probably won't see much use pre-1.0, but there's a lot of flexibility to be had here, especially for modding.


Quote
I think the AI might need its own tab eventually
It will probably need more settings than can fit on a row in the lobby, yes, but I'd probably handle that by an "advanced" button or something like that on the end of the row, and clicking that pops up additional stuff above.


Quote
(I'd like to have some of the Wave settings available as AI specific tunings eventually, and those aren't Special Factions by any stretch of the imagingation).
That's my point, actually: nowadays the AI is the same kind of thing as the "Special Factions". Not 100% in the code but it's largely there.


Quote
I am looking forward to when the notion of an Intensifier is added to a Special faction (like how you could have Dyson Sphere: 4/10 in AIWC), if only so I can start trying to tune some of the factions.
That could be done now, as a clone of the AI Type thing. Though I imagine there would be some snags the first time, so I should handle that. If there's nothing else burning I'll try to do that for the next release for the Dyson.


Quote
I think the Settings menu needs to use a Tab infrastructure similar to the Game Lobby to make the sheer number of settings less overwhelming.
That does sound like a good idea.


Quote
I kinda want to turn the Wormhole name Red (or some suitable "be scared" colour identifier) if you know there's a wave headed through that wormhole (ie once you get a warning in the toolbar it will also change the wormhole name colour). I can code it if people think that sounds like a worthwhile idea.
Your desire to have that was why I moved the wormhole text code into galaxy-display-modes.

Personally I think it would be good to have the text "glow" back and forth between the faction-color and the warning-color (see Window_GameSetup's bTab.GetTextToShow() for an example of how to do that), but that may just be me.


Every time I use the sidebar to select a type of unit (double-clicking doesn't work yet) the game immediately snaps to a max-far-zoom and I have to zoom back in again to issue my orders.
I've found the line that makes that happen, but some of the math is necessary so I've punted that to Chris. Looking forward to that issue going away, ran into a fair number of times when making the most recent video. Fix for that is in 0.609 now. The fix was always in 0.609! We've always been at war with... (if you got 0.609 in the last hour you may need to poke steam to get the game to realize that this has been fixed)
« Last Edit: November 29, 2017, 10:00:44 am by keith.lamothe »
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 FalseMyrmidon

  • Newbie Mark II
  • *
  • Posts: 24
Re: AI War 2 v0.608 Released! "Interface Evisceration"
« Reply #6 on: December 03, 2017, 08:24:31 pm »
  • I like the new tooltip.
  • Tooltips for the top bar don't seem to be working.  Especially problematic when there's a wave incoming and I can't tell where by mousing over it.
  • Why do some of my individual ships (not squads) seem to randomly explode when there's no reason to be exploding?  They aren't taking damage and my best guess is that maybe low health individual ships are being replaced so it plays the death animation for the ones being removed.  However, it seems to occur even when the game is paused sometimes?  Or at least I've heard exploding sounds while the game is paused and alt-tabbed.
  • When you tell units to go to another planet on the galaxy map it would be nice if they showed the path that they're going to take.
  • Ralllying to a control group seems to cause the number over the outliner (number of squads?) to continuously increment and never decrement.  For example is currently displays me as having 242 while I currently have in the area of 50ish squads total.
  • It would be nice if shields shrank more smoothly.
  • The description for Autocannon Minipods says they have a high cap.  Their cap seems to be 10, the same as every other fleetship.  I'm guessing they have more ships per squad but the number of ships per squad isn't really reflected anywhere aside from zooming in on them.  Also, their damage seemed pretty unnoticeable but that may be due to being Mk1s.
  • I have ships that I lost somewhere on one of my planets and I don't see a mobile military or similar filter on the galaxy map.
  • Why do some ships, like guardians, seem to not have health bars?  Also seems to apply to my Ark
  • Game didn't end when my Ark died
  • Need some better messaging about when the Ark is in danger.  Perhaps a 'boss style' health bar should appear at the top of the screen when it's health is gone?
  • Is there a way to have units built by my Ark have Pursue on but have the Ark not be on Pursue?  I don't like having the Ark fly around and potentially get itself into trouble.

Getting much close to being able to call it 'fun'.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: AI War 2 v0.608 Released! "Interface Evisceration"
« Reply #7 on: December 04, 2017, 08:09:36 am »
    Thanks for the feedback :)

Is there a way to have units built by my Ark have Pursue on but have the Ark not be on Pursue?  I don't like having the Ark fly around and potentially get itself into trouble.[/list]Example usage:
- build some ships, assign them to group 2
- have ark rally to group 2
- set group 2 to pursue

That said, maybe you want stuff to rally to the Ark and pursue, without the Ark pursuing. I think perhaps we need either more behaviors (an alternate pursue that doesn't move key things) or a control-group-level thing that's like a behavior but considers the group as a whole instead of just individual ships.

Quote
Getting much close to being able to call it 'fun'.
Glad to hear it, I think so too :)
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 BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: AI War 2 v0.608 Released! "Interface Evisceration"
« Reply #8 on: December 04, 2017, 11:49:00 pm »
Random complaint. Every time I start a game, I do the following clicks:

Set the Starship Constructor to rally to the Ark, then click on the ships I want to build.
Click on the Ark and set it to rally to itself
Realize that I don't have access to the Behaviour menu when I've just clicked on the Ark, so hit 1 to switch to the Control Group view.
Get to the Behaviour menu, set the Formation to Blob and the build profile to "Everything".

That's a lot of clicking, and I literally always want to have those settings done each time. I realize that not everyone repeatedly starts games to test code tweaks, but it is annoying.

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: AI War 2 v0.608 Released! "Interface Evisceration"
« Reply #9 on: December 05, 2017, 10:13:53 pm »
Keith: for your consideration. I'd written my own style of Clusters maps, which you said looked too much like Clusters itself. I tweaked things so that the Clusters map type now has a setting for "Number of Clusters: Low/Med/High". Using "Low" gives your original Clusters map. Using Medium or High uses my version to generate more clusters.
« Last Edit: December 05, 2017, 10:21:23 pm by BadgerBadger »

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: AI War 2 v0.608 Released! "Interface Evisceration"
« Reply #10 on: December 06, 2017, 11:40:16 pm »
Hey Keith, would
Code: [Select]

if(Engine_AIW2.Instance.GetSelectionContains( SelectionCommandScope.AllPlanets, EntityRollupType.MobileCombatants ))
{
    //execute this "if" condition when the selection is capable of moving
}

do what I think it does? And would it be safe to use in the Visualization code? If so then I'll get you a patch using that as a basis for highlight ships paths on the galaxy map (or at least, I'll give it a good faith effort). If not, any advice on how to do it properly? I suspect that MobileCombatants will include things like a Fortress which isn't desirable.
« Last Edit: December 06, 2017, 11:41:59 pm by BadgerBadger »

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: AI War 2 v0.608 Released! "Interface Evisceration"
« Reply #11 on: December 07, 2017, 07:53:38 am »
Hey Keith, would
Code: [Select]

if(Engine_AIW2.Instance.GetSelectionContains( SelectionCommandScope.AllPlanets, EntityRollupType.MobileCombatants ))
{
    //execute this "if" condition when the selection is capable of moving
}

do what I think it does? And would it be safe to use in the Visualization code? If so then I'll get you a patch using that as a basis for highlight ships paths on the galaxy map (or at least, I'll give it a good faith effort). If not, any advice on how to do it properly? I suspect that MobileCombatants will include things like a Fortress which isn't desirable.
I suspect that would work; I don't think it includes non-wormhole-traversing units. If it does I could provide an alternate way to check.

I don't think it will cause race-conditions because I rewrote the selection logic to be more robust in that respect, but if there are issues I can patch them up.

Thanks :)
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 BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: AI War 2 v0.608 Released! "Interface Evisceration"
« Reply #12 on: December 07, 2017, 07:56:53 am »
This is basically an entire rewrite of the previous post to include an additional query about checking which planets are hovered. You responded while I was rewriting.

Hey Keith, I'm thinking about trying to get galaxy map colouring for when you have units selected so you can see the route the would take. It seems like there are two pieces needed; the ability to check for whether you have units selected, and the ability to see if your cursor is hovering over a planet in the Galaxy map. I think
Code: [Select]

if(Engine_AIW2.Instance.GetSelectionContains( SelectionCommandScope.AllPlanets, EntityRollupType.MobileCombatants ))
{
    //execute this "if" condition when you have selected units that can move
}

might do what I want (though I'm not sure if it's safe to use in the Visualization code due to the threaded nature of things).

However, I'm not sure how to check whether you are hovering over a planet in GetColorForLinkBetweenPlanets(). I note there is a Planet.CurrentlyHoveredOver value that seems to store the planet currently being hovered over used in Window_InGameHoverPlanetInfo.cs. If that's safe for Visualization code as well then the new code might be something like

if(Planet.CurrentlyHoveredOver != null && <selection contains mobile military> )
     If the path the ships would take between the planets containing the mobile military and the destination would involve the two planets in GetColorForLinkBetweenPlanets (using one of the varied forms of sendThreatOnRaid), then colour this link faction.TeamColor.ColorHexHighlighted
     else
         old  code path
else
  old code paths
else if Planet.CurrentlyHovere

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: AI War 2 v0.608 Released! "Interface Evisceration"
« Reply #13 on: December 07, 2017, 10:10:10 am »
However, I'm not sure how to check whether you are hovering over a planet in GetColorForLinkBetweenPlanets(). I note there is a Planet.CurrentlyHoveredOver value that seems to store the planet currently being hovered over used in Window_InGameHoverPlanetInfo.cs. If that's safe for Visualization code as well then the new code might be something like
It should be fine to read from that, yes, since it's just a normal pointer and if it changes during your code it will always either be the previous value or the new value, not something inbetween.

That said, I suggest retrieving the value the first time you need it in the function, and then using that retrieved value for the rest of your logic.

If you do this:

Code: [Select]
if(Planet.CurrentlyHoveredOver != null)
{
    Planet.CurrentlyHoveredOver.SomeMethodCall();
}

You could theoretically get a null ref on the second reference. But if you do:

Code: [Select]
Planet hoverPlanet = Planet.CurrentlyHoveredOver;
if(hoverPlanet != null)
{
    hoverPlanet.SomeMethodCall();
}

You're safe even if the hovered planet changes. I kind of doubt it would, given where such changes happen, but better safe than sorry.
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 BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: AI War 2 v0.608 Released! "Interface Evisceration"
« Reply #14 on: December 07, 2017, 11:40:51 am »
So I have two issues.

First, I'm having trouble figuring out how to compute the path the Selected Units will take to the Hovered Planet. I'm guessing that you use faction.FindPath() internally; Unfortunately that function requires an ArcenSimContext which I don't know how to get in Visualization code. I could figure out a possible path in a more brute force fashion, but this exercise is pointless unless the pathing algorithm for routing and highlighting are the same (and I don't know how you made the changes for .607 to choose "safer" routes).

The second is that as written the code is going to need to recompute the path for the selection every time that GetColorForLinkBetweenPlanets() is called, which is awful for performance. The pathing information needs to be cached someplace for reuse and I'm not sure where to store it.

These two problems have stymied me (and I've played hookie long enough this morning), so I place what I've got in your hands in the hopes that you will find it useful. I think the code will work right, but no promises since I can't test it. If you can tell me how to do it properly I'll get to it later, otherwise it's back to being your problem.