June 22, 2025
This devlog will be on the longer side, because it's a lot of stuff and I have to tell you about my existing code. This does assume you've read the server's README, however.
First, changes brought upon by a change in the abilities of the starting spaceship's space sensor.
Planets (fcSurface) other than the one with the starting spaceship don't have regions (fcGrid child) anymore, or at least you can't see them. This makes showEmptyPlanets, my flag for whether to show regions with no assets, not useful anymore.
My debugging view, which showed all the assets, used to be really laggy. Since it's in a tab, it would make going from and to that tab lag. Because of this, I made it so you had to select which system to see, even if you only had one system, so you didn't accidentally trigger the lag. Now that the space sensor can't see as much, it's not as laggy and I can autoselect the only system you have, like I already do in other views.
Next, the main feature (fcBuilder) and related things.
Obviously, I had to actually implement fcBuilder.
Because of this builder change, the way fcStructure works had to change, so I fixed my fcStructure parser.
I made a cool visualizer for fcStructure, which is shown in the image for this devlog. The light green is the quantity, and the dark green is the hp. It's scaled so the smallest max quantity is a fixed height, and the other components are to scale with that.
Next, some additional features added at the same time:
The tech tree now contains knowledge for a material called silicon, so I made an icon for that. By default I use the icon from the server, but I also have my own 16x16 icons.
fcOrePile now has an analyze command, which sends the approximate total quantity, and the approximate quantity for each known material.
Next, two features that were added later, but are still in this commit/devlog:
fcPlanetaryBody has a seed, which I'm mostly ignoring but I need to parse it, and also I put it in the debug view
fcRubblePile has materials now, which I'm also ignoring because the only rubble pile in the actual game has no materials
Finally, some stuff that aren't really related to server changes
I had a class called ContinousBuilder, which I renamed to ContinuousBuilder because that's how you spell continuous.
I have a view that shows any fcGrid in an fcSurface, and when the client disconnects I now set the selectedSystem field to null.
I added a function to parse a Uint64, my custom type made of two ints. This type exists because when compiling to JS, the default int type is only 52 bits (i.e. it's a double).
While doing that, I found out that my multiplication code was completely bogus. I fixed it.
Thus concludes Devlog #1.
1.0. replace ({String piece, bool white}) with a sealed class Piece
1.1. pieces implement _upWidth, _upHeight, _uprightWidth, and _uprightHeight to specify their size
1.2. Piece() is a factory that parses a piece+orientation
1.3. piece position is now topleft if rotated to up/upright
1.4. size and rotate pieces based on this
2.0. use runtimeType to render piece name
I replaced the little caret subscript things with _ to fix encoding issues with sending non-ascii over http (it's simpler to work around the issue than figure out what the issue actually is). I stripped newlines from the board state before sending it to the client, so the parser doesn't get confused. I copied the parser to the client to make the client render each piece (as squares for now, but that's just a placeholder). Also, this project's repo is now a repo with two submodules, client and server.
I removed recovery tile moves from the first turn moves, as you don't start with anything on your recovery tiles.
1) While trying to challenge TroutBot (project 2753), I found out that my challenge() function was doing jsonDecode(response)['challenge']['id'], but there was no 'challenge' key, turns out it's just ['id']
2) I now print out all messages sent in a game I'm in, and forward any player room messages to the spectator room.
3) I now give more points to pawns in the center of the board.
4) I now give negative points if my piece is attacked (even if it's defended).
A very simple chess bot that uses minimax to do... not that well but compared to my limited chess skill pretty good. The name "bushbowl" is a pun on my username "treeplate". NOTE: bot runs on my local machine so is usually not actually running NOTE2: started before SoM so time not entirely accurate
A client for [Interstellar Dynasties](https://github.com/Hixie/isd), 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. NOTE 2: The demo is currently way out of date and is not up to date with the current server.
Apparently rotation is now separate from moving now, and so both can be done in one turn. I updated my spec and my board files to match that.
I first refactored my code by making Firework an extension type, and adding a copyWith and getters. I then made my app use a Material app with Theme.dark(). Then, I added a slider that changed the probability of fireworks appearing, in what is probably a logarithmic scale (1 is 100%/tick, 2 is 50%/tick, 3 is 33%/tick).
First, i fixed the transparancy issue (turns out i was doing |0xff000000
inside random.nextint instead of outside).
Then I made the fireworks start at the bottom and go up until they hit a random y coordinate, and then grow.
Then I made the fireworks fade out instead of popping out of existence.
I created a StatefulWidget, and used SingleTickerProviderStateMixin to make a ticker that:
- occasionally adds a random firework to the list of fireworks
- grows every firework, except it occasionally deletes a firework
I used Stack+Positioned+Container to render each firework as a circle.
I still need to figure out why they're semi transparent, and make it come from the bottom to look like a firework.
Something festive for the holidays! A simple firework simulation program.
Ok so the way i was doing rotations makes no sense, i can just use AV>< for noting direction in the file, for the actual UI i can just rotate the widget by 90 degrees
NOTE: not all of this is recorded on hackatime, i set it up partway through this commit
First devlog! So the server needs to store its board state locally, and give it to the client when it asks. This means I had to do two things:
a) Create the initial board state.
b) Write a program that sends the board state to the client.
My first step was actually to start on b). I had already worked on CGI scripts (see https://treeplate.damowmow.com/robliterator/robliterator.dart, my bot for software.hixie.ch/fun/robliterator), but not recently, so I looked at the code for that.
I first thought about a very short-lived websocket over CGI server, and did some work on that, but then realized just simple HTTP was both easier and made more sense. I only briefly looked at my old code and made the incorrect assumption that the request lines were the arguments. They were not. The arguments are empty, stdin has the request. After discovering that, I made a Dart+CGI program that gets a file and returns its contents if it exists, thus accomplishing b).
Now for a), I had a few problems. One, I needed to decide on a file format. I eventually settled on the format described in DPDK.md. Two, this format (which tries to match the official notation) has some characters that aren't in ASCII. Thanks to shapecatcher.com for finding all the necessary characters (well, except for orientations of K/k, which i could not find).
Another problem was that different pieces are different sizes. I decided to just always put the center as the coordinate, and for 2x2 put bottom left if white and top right if black.
To generate start.dpdk, I first wrote by hand justwhite.dpdk, containing all the white pieces, and then wrote parser.dart to parse it into a state defined in state.dart, and makesymmetric.dart to add black pieces, which is rotated around the center of the board by 180 degrees.
An online adaptation of a chess-like board game my friend is designing. The server receives messages via a Dart CGI program on the server.
This was widely regarded as a great move by everyone.