ISD TreeClient banner

ISD TreeClient

7 devlogs
16h 27m 32s

A client for Interstellar Dynasties, a game about space exploration and conquest (or, at least, that's what i think it's going to be about - right now it's still very early in development).
NOTE: This project was s…

A client for Interstellar Dynasties, a game about space exploration and conquest (or, at least, that’s what i think it’s going to be about - right now it’s still very early in development).
NOTE: This project was started way before SoM, so the time is not entirely accurate.

Demo Repository

Loading README...

Tree Plate

Commit 65807e7

First, I implemented a few things to be compatible with the protocol:

  • fcGenerator
  • fcEnergyConsumer
  • drInsufficientEnergy
    I also did a few other things:
  • I added some placeholder icons
  • My fcMaterialStack implementation was like completely broken, so when one of those started being sent by the server, I found that out and fixed it (mostly by copying from fcMaterialPile).
  • Implement fcFactory’s set-rate command, and list inputs/outputs in kg when they’re bulk materials

Commit 113ba9e

  • A few places in my code were checking if a Uint64 (my custom type) equals 0 (a regular int), which always returned false. I replaced that with using .isZero.
  • sample-ore only works if you know the asset class, so I made the button not appear if you don’t know the asset class.
Attachment
1

Comments

Tree Plate
Tree Plate about 1 month ago

*placeholder icons for icons that the server was sending that I didn’t have icons for

Tree Plate

Commit 0b60af4

I updated this to be compatible with protocol changes:

  • fcStructure.quantity, fcStructure.hp, and fcStructure.minHP are uint64s now (they were previously uint32s)
  • fcMessage’s “From:” line is optional now
  • fcRubblePile has a remaining mass now instead of a remaining quantity
  • fcResearch has topics in the feature instead of having to send a “play” command to get what topics can be researched
  • Changes in how virtual assets are defined means I can assert that if an asset has zero size it must have zero mass and mass flow rate
  • fcOrePile.analyze now gives the masses of the materials now instead of the quantities
    I also made a few other changes:
  • I added a few icons that were recently added to the tech tree
  • I fixed some bugs with binaryreader while debugging a weird behaviour in my parser
  • I added > and min operators to my Uint64 class
  • My “Inbox” only shows fcMessages that are inside fcMessageBoards
  • My material dialogs now show mass per unit if it’s a component material
  • I added a few more checks for server invariants
  • I changed the minimum line item height when rendering an fcStructure to 32 (the height of a material icon)
  • I now support rendering messages outside of an fcMessageBoard (see attachment)
Attachment
0
Tree Plate

Commit 74825a7

make structures not show minHP when you don’t know the asset class (because the spec says a 0 is always sent if you don’t know the asset class)

Commit 5a1597c

  • fcSample
  • fcResearch now has a “progress” field
  • make icons for a bunch of ores that are now discoverable via the sampling feature
  • update to dart 3.10 since i’m using a 3.10 feature
  • make the pile’s analyze button show how many units are unknown
Attachment
1

Comments

Tree Plate
Tree Plate 2 months ago

the silicon and iron icons are from the server, not my creation

Tree Plate

Commit 9d46c40

make platform_specific stuff check for dart:ui and don’t import path_provider otherwise

this is to remove a hack in my tasbot where i had a custom package called path_provider to emulate the features of the real one without needing flutter

Attachment
0
Tree Plate

Commits b120345 and 4abdb7b

I moved the platform specific files into their own subdirectory, and made a file to do all the conditional import stuff so i don’t have to everywhere i use it.

Attachment
0
Tree Plate

Commit 09c8fde

I updated this client to match protocol changes:

  • you can’t dismantle things you don’t own (the protocol was previously inconsistent regarding things like that)
  • the protocol says some features can only be sent by the server if you know the asset class, so i added some asserts regarding that
  • since the high score table should work better server-side now, add a way to see it on this client (mostly already done, but i added a “refresh” button so you can actually see it)
  • the “flags” of a miner/refiner (source limited, target limited) are now part of the bitfield
  • fcFactory
    I also added an icon for gold (newly in the tech tree), and fixed a bug in my websocket wrapper that made it break on web.

Commit 12bf7f0

it turns out my client was misimplementing a confusing part of the protocol ( being 0), which wasn’t an issue until now, so now I’m implementing it right

Attachment
0
Tree Plate

(this devlog references things defined in [https://software.hixie.ch/fun/isd/test-2024/servers/src/systems-server/README.md](the server docs), look there if you’re confused about something i’m saying)

Commit a3b3abd

First, I implemented some parts of the protocol that changed (fcPopulation’s “gossip”, special-casing string id 0).
This involved adding a < operator to my Uin.t64 type (I implemented my own type for 64-bit integers using two regular integers because dart, the language i’m using, uses JS’s Number type when compiling a int64 to javascript, and Number only supports 52-bit integers).
After that I fixed a long-standing bug where my client would error when the system server data was reset (the fix amounted to deleting one line of code)

Commit 2414edb

I was still having the issue i mentioned before, so i deleted a few more lines of code
…that didn’t seem to have fixed it tho :(

Attachment
0