Neptune's Pride Agent αλφα Edition

Announcing “Neptune’s Pride Agent αλφα Edition”!

I’m excited to announce that over the course of December, NPA topped 200 weekly active users. With so many of us using the extension, it’s much more nerve-wracking to just upload new code … I don’t think anyone wants a repeat of v1.15 when the extension abruptly stopped working for everyone.

With that in mind I’m excited to announce Neptune’s Pride Agent αλφα Edition v2.0.2, which will replace NPA v1.18 with NPA v2.1 once we deem the new features stable.

The alpha edition launch marks the start of a new era. I have gotten permission from Jay to open source the extension code, so NPA is now released on github and all kinds of contributions are welcome. You can get involved by

The current v2.0.2 has the following features:

  • Display git hash and build date in version info
  • Fixes autocomplete bug where if you typed [[0] fast enough it would fail to autocomplete
  • Substitute [[Tick #n]] with the user’s preferred date/time format
    • This has the side effect that if you mail fleet reports to another player, your timezone is no longer revealed as they see times in their local time
    • Also fleet outcomes in the HUD are displayed with [[Tick #n]]
    • The % hotkey now cycles between four formats: absolute ETA, relative ETA, number of ticks, and absolute tick #:

  • A new ‘$’ hotkey produces a csv file suitable for pasting into a spreadsheet to give you trackable global stats of all players. Paste the result and then use the ‘Split Into Columns’ function to record and analyse the game state.

The next alpha version will be live in a day or two and adds the ability to link images in in game messaging, to colour yourself white so that you can distinguish yourself easily in large games, and to display territory so that you can spot routes like this one:

See you in game!

Osric

2 Likes

v2.0.3 is now live in the store. Existing users of αλφα Edition will be auto updated.

This version includes these changes:

commit 74a4549bc40405f06e04be8bdaa48f5a321b48bb

Add support for image links to imgur or ibb.

Messages with links like [[https://i.imgur.com/qY3K26V.png]] will
expand the image inline.

commit 8c5cb7ccd3baa15182f939d3f2943da08c613b24

Add ability to recolor players, and w hotkey.

Generically make the code respect the player color given
by the values in NeptunesPride.universe.galaxy.players[uid].color
and add a recolorPlayers() function that will reset all sprites,
CSS, and images to the colors as specified.

This has the side effect of changing the size of any 48x48 ownership
rings, but these are still small enough to appear OK in the UI.

By default, other than that size change no change is apparent. If
the user uses the 'w' hotkey, their own colour will be changed to
white so that they can easily distinguish their own empire on the
map.

As a follow up, it would be nice to be able to persistently set
any player's colour.

commit c8cd81bdf949414abf9be6587ea10f47c8ffc889

Show territory to visualize borders/conflict.

Osric

v2.0.3 is now available for desktop Firefox.

I am looking into why they didn’t enable it for Firefox on mobile. I am hoping that they will approve it and that will provide a solution for Android users.

I intend to transition from the v2 αλφα Edition to v2.1 stable once I have a stable version of v2, and from then on I will probably only publish stable for Firefox. If there are users out there who want the bleeding edge for firefox and are willing to collaborate on the project, please PM me or get in touch via github and I can change the plan. I am not clear on how many potential users FF has, but I imagine it isn’t that many of us; unless of course Android becomes a reality which might make it one of the more popular ways to use NPA.

Osric

1 Like

It turns out that firefox doesn’t really support all extensions on mobile. It is possible to install NPA if you run firefox nightly on Android. The steps are:

  1. Install the nightly firefox
  2. Go to about. Tap on the logo 5 times until a notification appears saying “debug menu enabled”
  3. Go to settings, find the advanced menu, choose “Custom Add On Collection”
  4. Enter 17719143 as the “Collection Owner” and NPA as the “Collection Name”.
  5. Click OK
  6. Enter settings and click add ons. Choose the + icon to install NPA

These steps are documented by Mozilla. If my instructions are hard to follow, try theirs.

Osric

1 Like

Those are some great news, but not really helpfull.
My Mi 9t (which is not that bad) surprisingly struggles to get above what looks like 10 fps while scrolling in NP on Firefox, despite having no problems in Chrome derivates. So, while your addon works great there, full expirience mobile NP is still unreachable, sadly.

Firefox is slow rendering NP’s map canvas on all platforms, but especially bad on mobile.

That said, if you go into settings and set the map graphics to “low” it is usable even on old devices. My test device is a Google Pixel C from 2015, and I am able to play the game on it even though it is a distinctly worse experience than on an iOS device. Give the low graphics setting a try…

Osric

I was already on medium, and it didn’t fix it completely. But that looks more like 20 frames, yes.
And I have not said that it is unplayable, we’re talking essentially turn-based strategy with 1 hour per turn, even 5 fps could be playable) It’s just not pleasant.

For firefox users, v2.0.6 is now available. For Chrome users, expect 2.0.5 tomorrow, and 2.0.6 on the weekend. iOS is currently on 2.0.3, expect 2.0.6 tomorrow.

Changes in v2.0.6:

commit 516f6205a889fa4c7dbda1f9015c4b6256809420

Player recolouring was completely wrong for 64p games.

First off, the CSS for the player underbar doesn't exist and was
throwing an exception and completely breaking the code for 64p
games.

Secondly, there were not enough glow icons in the sprite for
every player to have a unique glow. Make the destination sprite
bigger to handle the extra positions, draw the extra glows, and
override the sprite positioning for stars with gates. The end
effect is unique glows per player that correspond to their sprite.

commit 666f4790e2c901f46356c6c2111006c4589e59d0

Make time display persistent and have ticks update UI.

Make the default time display relative (i.e. the ticking production
clock as usual in the game) but also make the '%' key store the
user's preferred time setting persistently so that if they change
how the clock works it sticks across sessions and games.

Also watch the clock for the 29th second, so that times formatted
from [[Tick #]] will update to the correct minute every time the
rounded time would adjust itself; this makes the map repaint and
the UI refresh. This seems mostly good but it can be annoying if
you are in a long message thread because it will focus the comment
box. Let's see how much people hate that.

Changes between v2.0.3 and v2.0.5:

commit 56120b0cad72f9526cfa77fe1d9e2a54daf16bb8

Add merge all users hotkey '('. 
See the help for details (press ?).

commit a7576dac9e6fbbafacb51dac50b08eace1340eda

Add API key report bound to 'k'.

Navigate to the report with the GUI for easy access to
any API key you have previously viewed.

commit 917d9b4155334c2cfea334eb94dcf1785d85d89e

Store game events in indexeddb to avoid hitting server.

In order to make it efficient to do accounting and message
analysis on the client (especially for long-lived games with
tons of messages) store all the game event data in indexdb
so that the client only needs to fetch the most recent
messages each time rather than loading the full message
set into memory at startup.

*Currently only working for game event data, not diplomacy.*

commit 6b5b4c63846b32e366216b8e5fd1e2a6c37769b2

Rudimentary accounting report with transaction logs.

Navigate to 'Accounting' in the GUI.

commit 56f9a4fae067dcab8c1064184f1506543cce7779

Attempt to work around a problem with 'w' on firefox.

It seems that there's some issue where firefox doesn't pick
up the changed sprite images right away, but scheduling a
map rebuild 500ms later works on my Mac. Unclear if this will
work generally as the reported behaviour for the bug is a bit
different.

commit 5853cf8c0485a6c3ed9d1ade274adf30eaa2cdf5

Fix ibb URLs to match with embedded slashes

commit fb70ebf929ac27be145af0a5c08b057d7c97ce46

Check if we are on Chrome before overriding touch.

Touch handling and mouse handling works fine on Chrome without
Jay's original code to distinguish cases, and for touchscreen
Chromebooks disabling his original code enables the trackpad
and touchscreen to work in tandem.

On iOS Safari, this would disable touch handling in favour of
a trackpad that the user probably does not have, so guard this
as a Chrome-only hack so that the iOS version of the extension
works.

Since I don't know what happens on firefox, leave the default
behaviour in place.

Osric

For Firefox, iOS, and MacOS, 2.0.8 is available now. For Chrome, expect it to auto update in the next 24-48h depending on approval speed.

There are only a few small changes in this version. Proteus support, hotkeys to invoke the UI,
partial SAT compatibility, and reproducible builds and therefore a shorter version signature.

I am getting close to considering this a release candidate for stable. Please file bugs aggressively.

commit e6aa2070025639d04446b0c3502ba4fc6220256a

Detect and ignore duplicate injection.

In an effort to be as compatible as possible with the fork of
the code embedded in SAT, ignore the duplicate code it tries to
install so that if both extensions are installed things will
"mostly" work.

commit c189c54224a7d0c4cb9536707b7092850e6cf361

Make a hotkey to bring up the UI.

The UI itself is useful enough that the user might actually want
to use it, especially for the API Key screen or the short fleet
reports or the accounting.

Bind ` to bring up the UI and make it so that if you clip a report
it is the default view (otherwise it is the last thing you looked
at in the UI). So for example k` brings up API keys, a` brings up
the accounting, ^` brings up the short fleet report.

commit e73c58fcb2498f19241704dbac4779860de8da97

Improve the behaviour of the NP Agent menu item.

First off, multiplex the item with the new fleet item
so that it gets the benefit of being a "legit" screen
according to the rest of the UI - namely, that it will
be refreshed automatically if the UI is refreshed (for
example if the user changes timebase with '%').

Second, make it remember what report you were on so that
it can show you the report you wanted. Very likely users
will often want to see the ledger or API key report over
and over again.

Third, position it above the back menu item.

The code is ugly as sin but the UX is great.

commit 744cadf0215050d481c4b1f4958419cde2e2e700

Updates to make NPA work on proteus.

Battle calc doesn't add defender bonus.

Player recolouring respects custom shapes. There remains a bug
where now the avatar colour indicator doesn't update until you
refresh it or reload, but everything else works smoothly.

commit 05c3e4efda6f77499dd8f60e6f4c5b2d2ef1b4cd

Rebuild version without the caution sign for prod.

Osric

For iOS, MacOS, and Firefox, 2.0.9 is available now. Expect Chrome to update in about 24h.

I am likely to declare this the next stable version and promote it to 2.1 on the main extension. This release adds the ability to link a player with just their shape via [[#0]] instead of [[0]] to refer to the 0th player, a crude UI for people using the extension on phones that exposes buttons for all the hotkeys so that you can use the extension without a keyboard, and a “Trading” screen that shows you your tech status with your allies (based on whose API keys you have) and everyone you can trade with (restricted to scanned players if trade scanned is on).

Also contains a bug fix to proteus battle calculations and a fix of the (QUIT) (QUIT) (QUIT) bug when you merge multiple players’ API keys into your view.

commit 3bc4d1ce52e3ab4cbb450c4d9a8a25533a15b66a

Make trading report respect trade scanned.

To make the report more useful, thin it out to scanned players
when trade scanned is on.

commit 02c27b05ffd783b59ea3ee6616270559fb8de4ed

Refactor to show all player's tech.

commit 5761ed2c476a8cfd93942c2b19442137507964a8

The beginnings of a tech trading screen.

So far, this just shows a table of tech for those you have API
keys for.

commit c753f36c3942c83d2548115cd397e20b849aa16a

Add the ability to make NPA buttons.

Now the text [[hotkey:<key>]] or [[goto:<key>]] will create a
button that can trigger an NPA action. Normally you will want
[[goto:<key>]] so that the user sees the UI corresponding to
the report; the hotkey one is just like they pressed the hotkey
which in many cases just puts stuff on the clipboard and doesn't
navigate.

Use this to create a crude controls table that displays all the
hotkeys so that users who are on phones or tablets without keyboards
can find and execute all the functionality in NPA.

commit f571a44c5594e2cdf4fcf1533e45e38d0d79fb74

Install mousetrap types and package.

It isn't 100% clear to me that this is the right way(tm) but
rather than declare my own partial types, use the real packages
for Mousetrap.

commit 6efe870741d3c2248af5fa05b1b460137b08302b

Fix the (QUIT) (QUIT) (QUIT) bug.

For each merge you did, the on full universe code would append
an indication that the user had quit to their alias. Reset the
aliases each time so that you only get one (QUIT) or (AFK) or
(KO) tag.

commit 03b98bb78606a41affd1f0b983a7e7bcb50a3f77

Proteus doesn't have fractional ships defined.

commit f608a62496ec59469b9d4040a2689672239e7fd8

Nudge the reports over to center the tables

commit a54aeee0b1bb0ac205ae28fbe92460645ce33d0f

Add the ability to link players with only their symbol.

You can already type [[0]] to link Player 0 and display
their name as a link alongside their symbol; add [[#0]]
to do the same but with only their symbol as the link.

In non-extension games this will show up as (#0) which
is hopefully clear enough, and in extension games you
can now make dense tables with the player's symbol as
the column heading.

Osric

1 Like

NPA αλφα Edition is now updated to v2.1.2. It is available as a new extension on Firefox; the previous firefox extension is now pinned to stable and is at v2.1.0. It is still the only channel for iOS.

The firefox version is approved and the Chrome version should be available in 24-48h depending upon approval times. The major change in this version is the addition of a live research report for allies, accessed via the E hotkey, and the ability to send techs to others from the trading report summary (the lowercase e hotkey). If you click a green number in the tech summary table and you are able to send that tech, you’ll be prompted to see if you’re sure and then the tech will send.

Also for turn based game players the long-standing submit button bug is fixed and absolute times are in terms of turns rather than real time since as near as I can tell real times are useless/don’t make sense for turn based games. If you play turn based games, your feedback would be most welcome as I usually do not and am playing one mainly for testing purposes.

Detailed changelog:

commit 7a9e7b976657d959c65ab6995e58f5d44b6a52b4

Complete research screen for allies.

Provide a research report (hotkey E) that summarizes research
for everyone in the alliance based on API keys and contains
the live data from the other players.

The resulting report can be emailed and times will update, but
the times will be based on the historical research rate at time
of paste. Still useful for getting live updated ETAs, but one
must be careful about the distinction between getting a fresh
report with everyone's current science and seeing a potentially
stale report based on science as at a certain time.

commit 47f3b0fc5df325c049b9af6203f91e8ee0a262c4

Make table rendering pickier about the header line.

Some players actually use --- in their messages, which causes
the table render to trigger. Make it dramatically pickier so
that table rendering is only invoked when definitely intended.

Now --- must be at the very start of the line, and a second ---
must be in the line, in order to decide you want a table following.

commit 520e83b72a1f74acfaa3f33e655d409fba627018

Fixes for turn based games.

Put the submit button in its proper place so it isn't overlapping
all the screens.

Change "eta" time format to not use clock times, which are meaningless
since the clock is entirely driven by the players completing their
turns. Instead, make ETA in terms of integer turns so that you can
know how many turns away everything is and use that for planning.

commit 83bdae4c8279ac8e9131399a634aa2ded49c5dbd

Make tech table transmit tech if you click.

commit ee6905ed385855dc867d77707cc5565eb9fe9ca9

Colour balances in the ledger.

Osric

Somehow I missed announcing v2.1.3. As of today the extension is updated to v2.1.4.

Highlights of v2.1.4:

Finish fixing the “Submit Turn” and “Submitted” buttons in turn based games not to overlap the rest of the UI.

Fix the combat calculator to report integer numbers of ships on each carrier, and to correctly account for carriers with a ‘Delay’ set for their departure. Note that there may be a bug in the ‘Delay’ feature of the game itself making the timings unreliable.

Now, if you generate an API key, NPA automatically caches it for you so that when you type [[api: into a message it autocompletes your own key. Additionally this makes sure you show up in your various alliance reports, like on the trading screen or the research screen.

Make red numbers trigger cash transmission (with a confirmation dialog) if you click them in the trading screen or the accounting screen, for easy payment. Add bulk payment and bulk tech transmission options to the trading screen.

v2.1.3:

Fixed fleet merging when you merge multiple API keys. In the past, you wouldn’t see complete fleet orders for others unless you viewed the map as them. Now, when you merge multiple API keys you get to see complete fleet orders for everyone. Also, API key merging is cached so it is much faster, and the clock doesn’t get reset to the wrong time when you merge keys anymore.

Table markdown is pickier and only recognizes --- Title --- as the start of a table if the --- occurs at the start of the line. This avoids mangling messages from players who actually type --- in their message. Additionally, tables are formatted properly on first view and not only if you refresh the message from the server.

The research screen shows a new ↑S column that tells you how many science that ally needs to buy to improve delivery of the tech by one or more ticks. If more than 10 science would be required, the entry is blank.

The controls screen buttons now highlight on desktop just like other buttons in the UI.

commit 5f54bcfcb8e32910f40feef340933fa1cdf7e9b4

Make balances owing actionable on accounting screen.

Update the accounting screen so that red balances trigger a
money send, making it quick to settle up when you owe.

commit ae7fef4f752825cb42c51c50f2a3e592de0f3af7

Add initial bulk tech send functionality.

commit 8f09918ab69c0695f43e543e2d5ad05e3dd6198a

Add the ability to bulk pay for tech transfer.

commit dd97284845650a8ca4bffcd5e66954cb7f10d2c3

Make tech deficits trigger send cash if clicked.

Now if you click a red entry on the tech summary screen, the UI
will ask if you want to send the transfer fee amount of cash to the
holder of the superior tech for them to transfer it to you.

commit d4b357e5a6cc6a27608ce9b2d42023cfa7316113

Handle delayed departures properly, and note them.

Handle delayed fleet departures correctly and note the departure
in the delayed tick's combat report.

commit fbc2f945b4d8cd852cb59cd9ecbbfa4d40947a13

API Key convenience features.

When the user generates an API key automatically cache their own
scan data so that the API key will forever be known to this instance
of NPA.

On every UI refresh (which we are doing every minute) ensue that the
allies API data are fresh in the cache. Never wait again for the
research screen to load.

Inside message compose, autocomplete [[api: with the user's own API
key. If they really wanted to send someone else's, they can go back and
paste it over their own key.

commit d018f524eb412b7d1b317ef9de2fd13110d59526

Fix combat calculator to distribute ships in integral quantities.

The largest arriving fleet gets the first leftover ship, the second
largest the second leftover ship, and so on down the line. Produces
pretty numbers that are hopefully exact matches for the game's approach
to the same problem.

commit 2fb341af53793ac899d0ce4584c7646c8b871168

Also look for the Submit Turn as "Submitted".

commit 660ab1cad324c75ffd45264f780d6b2e2caa5818

Changes listed below were shipped in 2.1.3

commit f01d7a7d3fd17a6f1ae916527ab5a98a732a6932

Fix fleet merge bug with multiple allies.

If multiple allies could see a fleet then merging would take the
last allies' view of the fleet or your own view of the fleet in
preference to the scan data of the owning player. Fix it so that
if you have a scan from the owner, that view takes precedence over
all others, providing the detailed scan data with a full order set.

commit 97f953b1caaed198942f6dd352483c40c9d9cacb

Update column header to ↑S for clarity.

In the research screen, it seemed like ΔS wasn't intuitive
enough so try out ↑S instead. The column means how much science
that researcher needs to reduce delivery time.

Add help text to clarify it as well.

commit 8d11311471c8b1aa64bcb5fa3ca1b4b02f709704

Fix cache bug at tick rollover.

The sense of tickness was backwards so that the tick passing
wasn't triggering a refresh of the cache, resulting in scan
data up to 5 minutes out of date just after the tick. Fixed
it so that as soon as the tick passes the scan data are
invalidated and therefore always fresh

commit 24405e4def165430011f671c50ddf979394d0009

More detail in the research report.

The research report now shows progress for each researcher
as well as their total science and the upgrades needed (ΔS) to
achieve the research level 1 tick sooner.

commit 0b8ff256a291248bf161200969d568772d11b8bc

For turn based games, fix the submit button on refresh.

The submit button would reappear on UI refresh, sometimes even
at startup. Hook the event to fix it any time that happens.

commit 286102f9d22ff910034361fd717a1e540352ab1e

Fix wrong event wiring so screens aren't re-executed.

The event handling for the reports screen was accumulating at the
top level of the UI causing the screens to be rerun as many times
as the UI has previously been displayed. For most screens this was
fast enough to be close to imperceptible but for the new heavy
reporting screens they get decidedly sluggish after being in the
client for a while.

Hooking up the event properly means calling the report exactly once
and is pretty snappy.

commit 6a83add82a79d2524dfd95fc1c20a8c71ec48325

Overhaul API data fetching.

Consolidate the three spots that used to use API keys to fetch
scan data into one function, using a modern fetch call instead
of a sketchy synchronous jQuery ajax request.

Also fix the time drift when merging API keys and an bug where
incoming visible stars took priority over already visible stars.

commit ee3063c78a366159fae126b850cbbfbdb8ea001e

Fix time not to shift on merge of API keys

commit 9b12b4601e02c8f5b63222d95ebdb1e09faffa30

Two fixes: pickiness update, and immediate format.

My previous attempt to be pickier about --- occurrances was not
correct, and is now hopefully fixed.

The <br> tags inserted into comments are different on the client
side than on the server side, update the split to use a regex that
works on both so that things are properly formatted the first time
round (notably tables).

commit c5c88fbbe212a0aef6293f7d12b0ec47bc8e2053

Fix help button not to navigate back to controls

commit 46cd261a593f7f55dddbb76d522ffbf2a94f3b5f

Style NPA buttons with CSS since the JS isn't used.

Osric

Today v2.1.5 was published with a high-priority bug fix for the compose messages screen. In prior releases, if you had the ticking clock time view (the default) selected with the % key, every 29th second your input field in compose would lose focus and the next keystroke would likely trigger a hotkey response taking you away from your message. Workarounds included just going back to the message or back to the new message compose screen, or using a different time base. Since I always use a different timebase view it took until two αλφα users reported it before I realized how bad it was! I am sorry.

This version also fixes a long-standing bug in the HUD where multiple enemy arrivals would show them all as losing in the HUD even if the long fleet report showed correctly who was the new owner of the destination star. Now the HUD also acknowledges the winning fleets even if they win after landing on the star in a multi-stage combat instead of crediting the win to the star.

Also v2.1.5 contains a new auto-ruler feature I’d really like feedback on. It is especially useful in turn-based games, where certain moves are invisible to others. For any star you click on, it will show you the nearest enemy star’s attack ruler, and all possible defence rulers. The defence vectors will be grey if the defence cannot possibly be launched in time, as often happens even in scenarios like this in turn based:

Normally you’d see this in real-time and think “no problem, Alniyat can defend Fez”. But in fact, the attacker will appear at the mark on the red arrow for the first time, a mere 7 ticks away from the destination and it cannot be defended even though moves between it and Alniyat are invisible because they are less than the 10 tick jump. So the arrow is grey, as is the next closest defender Gomeisa.

I would really appreciate feedback for this feature. So far I am very bullish, it seems really helpful to me and the lowest power level setting is on by default. Press 8 to turn it off and 9 to turn it up.

So, the release notes for v2.1.5:

commit 535cf0a69f064f5a9e313eb1137e40b5d9bf67f1

Fix frustrating focus stealing bug.

Every :29th second when the UI refreshed, I would steal the focus
from the input field in message compose and then the next key would
often trigger a hotkey response instead of continuing compose,
interrupting the user's flow. This was only happening in 'relative'
timebase which I never use but thankfully αλφα users were able to
report it.

commit 878f26735a6deaed6941b12f2b935506b6d3f015

Add arrowheads to the auto ruler and fix up the buttons.

The buttons were just labeled '8' and '9' instead of having
a nice name, fix them to say '+ Rulers' and '- Rulers' so
users have a fighting chance of figuring it out from the
controls screen.

Add arrowheads to the rulers to make direction of intended
travel crystal clear.

commit 21ce2f4fceb463cae0aa12aceddc34d6cc2573fa

Handle ruler cases where the world is rotated upside down.

In the drawing code when we're flipped the arc for visibility needs
to be drawn on the other side.

Also use real distances for deciding whether to say it's invisible,
rather than drawing distances which are cut short to look nicer and
make longer ranges (9 ticks) look invisible accidentally in the
previous iteration.

commit d81718045eaac1943a63ac2ac880af3b4c505312

Change the look of the auto ruler.

Add an arc that shows where the fleet becomes visible and
an invisible warning if the travel time is shorter than the
tick jump (a common issue in turn based games).

commit 9502b006129ab220acff8d197be9244ed5a00d6d

First iteration of the auto ruler.

The auto ruler shows you the nearest enemy attacker of a selected
star and the nearest defender by default. If the defending star
can see the attack in time to launch defense its defense line is
shown in green, but if it can't make it in time its defense line
is shown in grey.

Pressing 8 will turn auto ruler power down to 0 and show nothing.
Pressing 9 will turn up auto ruler power and show you all closer
defending star candidates; and every other level adds another level
of attacker distance.

The setting of the auto ruler is not yet persisted and defaults
to power level 1.

commit eca067590ec53848fb7ef8797516230c3e5903d0

Fix multistage combat to credit the winner in the HUD.

The HUD would see that defense won and say "Loses!" for all
incoming fleets, but in a multi-stage battle one of the attackers
could be playing defense by the end. Recognize this case and say
Wins! for the attacker if they are the defender by the end of
combat.

Osric

The auto ruler looks like an especially useful feature for me! I’ll have a play around with it when the new Flying Swiss Tournament starts.

1 Like

v2.1.6 is now available for Firefox, iOS, MacOS, and in review for Chrome. As usual expect Chrome to auto-update in about 24-48h.

This release contains a bugfix for the accounting screen, which previously would occasionally fail to load the first time or be slow loading the first time. Now it should be consistently fast, always pulling data from your local storage rather than the server, and always come up the first time you invoke it.

The auto-ruler has been “completed” for now, with grey text instead of green for ineffective defence vectors and correct calculation of which stars are closest including their warp gates. Previously the arrow shown would be correct for warp gates, but physically closer stars would be considered “closer”; now the stars with the shortest travel times are “closer” and results are correct as of the warp gate state your client has (note the other player can always surprise you by building or tearing down a gate that you’ve planned around).

The “Submit Turn” and “Submitted” buttons were still out of z-order on Safari and MobileSafari even though they were fixed on Chrome and Firefox. This is fixed for Safari now, too.

Timebase, territory display, colour yourself white, and auto ruler power level are now all persisted and consistent across reloads and games so that you can set up the view the way you wish it to be and get the same view each time you return to the game.

This version will be the release candidate for v2.2.0 stable. Please report any and all bugs!

commit 963513e7ffe74aa502f51789c78b6d0a540cef2c

Rework how the message cache gets loaded.

Use the new fetch API rather than jQuery for the POST request,
and rearrange the async flow to work properly and prioritize
getting events from the cache.

In the past there was a problem behaviour where the first load
of the accounting screen could be slow or even fail outright. In
the fixed async flow, this should never happen; the accounting
screen should be instantaneous or nearly so in all cases, except
if the player joins a very old game from a new client. Even then,
the player might never experience a slowdown as the events will
get cached when they first join the gaem.

There is some noisy log output for now in case there is a problem
with this change but other than that no negative side effects.

commit 62da0aaaf44634587d1bdc337d80abbc37213b4a

Fix submit button zIndex on safari.

For reasons that aren't clear to me the submit button is in a
different place in the DOM on safari. Fix the code to set the
zIndex correctly for Safari too. Verified that it is already OK
on firefox.

commit b89862a1cc9b41f8ae3e6a4b86faf3a90dd48126

Redo color choices for text.

After some use it just seemed that the red text was never easy
to read, but the grey color for ineffective support was really
helpful. So change it so that all autoruler text is green except
for the ineffective support which continue to use grey. Stays in
the theme of the HUD colouring (same as the scan grey/green
distinction) and makes it easy to tell what support works and
what is ineffective.

commit 7daf8795f508d92f4eaf63d6da7860ea706c208a

Draw autoruler text in the color of the arrow.

Specifically to make it easier to ignore/recognize the grey arrows,
which indicate invalid/impossible defence responses (the enemy
doesn't have time to defend from there, unless they anticipate your
attack and launch simultaneously).

commit d44d71d83ded2efa47085505d8b8a0c9dd4db078

Persist all the settings that I think you'd want to stick.

The settings that stick and are consistent across games are:

- timebase
- recolor to white
- territory display
- auto ruler power

When you reload the game or switch games, these settings will
now be read from the database and be the way you left them.

commit 9d211991137dc8d3e70a22d1169d5786b53afb72

Add autoRulerPower to settings.

commit abf6c42fe982c98b903fe20eaafa40a31cb1f52f

First working typescript settings creator.

After much futzing, figured out how to convince typescript what
the types of individual settings are and be able to add them on
the fly. They get loaded from the database on initialization and
updated each time they are written, but otherwise function as
locally cached variables throughout for efficiency.

There may be a race condition here and there's a console.error in
case that ever happens, but even if hit the effect is minor for the
one or two settings that exist at the moment. This race might require
more though to get right.

commit 7dac7380d379a75d298ca3389fc320be6cd3620c

Abuse pre-version info, making it represent a 4th level.

Fourth level patches like 2.1.0a are not supported by extension
manifests, and fourth level patches like 2.1.0.1 are not supported
by semver. Semver supports "pre-" versions like 2.1.0-rc1 or
2.1.0-1.

Abuse this functionality to map "pre-" versions on to 4th level
patch versions, so that after releasing stable you can create a
patches branch on which you take hotfixes in via git cherry-pick
and then run

npm version 2.1.0-3

which will create a manifest with version 2.1.0.3 in it, that
firefox and chrome stores will accept as legitimate.

commit 7d77ff84e4d277c8861e64fef933e0cdc21cb929

Fix a bug where gates weren't being used in the initial sort.

When I switched to a sorting strategy for distances, I failed to
realize that the sortedStarSprites don't contain gate information
so the nearest defender was being found without considering warp
effects. Fixed it to use stars so that the calculations
are as accurate as possible given the current game state.

Osric