Dev Update 2

This is a small update on some progress I’ve been making over the last few days.

I’ve re-worked the way time is calculated and displayed in the React app. Previously if a construction took 15 minutes to complete, then the build time would have been displayed as “15m 0s”.

This was fine, but as the server ticks over every minute on the minute, it meant that starting a 15 minute-long construction at, say, 18:24:35, would immediately display the count-down timer as “14m 25s” and then tick down every second until completion.

I thought that was too confusing as people would wonder why their construction completes in only 14 minutes 25 seconds rather than the 15 minutes as was displayed in the app.

The approach now is to calculate how many ticks the construction will take to complete, rather than how many minutes. As the current server tick time is set to 60 seconds, a construction with a 15 minute long build-time will display as “15 ticks” instead, and will count down every tick rather than every second.

I may add a little progress bar to the countdown for another visual display.

Anyway, to help people see when the next server tick is without having to check the actual time, I added a little count-down component that continually counts down from one minute.

Images?

Yeah that’s another thing I’ve been faffing around with: DALL-E. As I do not want to spend any money on a project that has absolutely zero interest from anybody, I decided that I wouldn’t fork out hundreds of pounds for a professional graphical designer (unlike some other games that I am following). That leaves me with the option of asking AIs for some pictures. The ones they come up with aren’t actually too bad. I’ve generated some resource icons, as well as a couple of unit icons.

I doubt these would make it to the final build. If it ever got that far I would probably pay for a better image generator, but they will do for the test build.

If I can figure out how to add images to this blog I will upload some screenshots.

Unit Production

I’ve been making some progress on being able to build units in cities. There is the concept of a militia unit that can be produced right away to give new colonies some form of basic defense against any nasty things creeping around the world. These militia units won’t be much use as an attacking force, but should be able to fend off some curious critters exploring within the colony perimeter.

I also added a “Man-At-Arms” unit that is more of your standard infantry bod. To produce this unit the player to have researched the prerequisite for unlocking it. The resource cost will be significantly more than a militia unit, but also the stats for the Man-At-Arms will be much better.

Right now the only thing that is implemented is the ability to see what units are available to be build in a city, which is just the militia for now.

I am still writing the functionality to add the units to the city’s build queue once the “build” button is pressed.

Images

Here those images I mentioned earlier. I generated these using DALL-E.

The resource bar contains the five images representing the resources so far: mineral, crystal, food, gas, motes. I am quite happy with how these turned out, but as I stated earlier, I will be looking into making better versions for any released builds.

Resource Bar

Here’s the militia unit. It is supposed to be a lightly armoured unit with a short-sword and a lantern, to represent the home-defense angle.

Militia

The Man-At-Arms is the first real military unit a player can produce. It is represented here by a unit wearing more armour than the militia unit, with a broad-sword and a shield. From the image you can tell that this unit is a melee type and will have more attack and defence stats than the militia.

Man-At-Arms

The biggest issue I have with the images is trying to get a consistent look to them. DALL-E will generate stuff, and you ask it to do the same again but for a different type of unit, and it’s producing something that looks entirely different. Still, it is free after all, and it’s very easy to pay somebody to draw a bunch of icons and still have it look trash.

There are a few bugs in the code as of this update. You can click to build a “GruntWorks” (what was I thinking?) and if you do not have enough resources, it will just deduct all of what you do have instead, but not actually build anything. Even if you do have enough resources, it still doesn’t build it. Sigh.

Update: I worked out how to use images.

back to dev blog

7th January 2024

Chris's Blog


2024-01-07