Dev Update 5

Another week has gone by and that means it’s time for a miniscule update about what has been happening in the world of Retrograde Online! The hottest new game that absolutely everyone will want to play 25 years ago.

The last update was concerned with implementing SignalR into the React app and getting it working with the .NET back-end. I’ve expanded on that somewhat, and have now got SignalR connections for the City Constructions as well as the City Build Queue from before. I also added the updating of the queue and the garrison based on a “Unit Production Completed” message being pushed to the client. This will remove the unit from the build queue and add it to the garrision by incrementing the existing number for that unit type.

For some reason (that I haven’t looked into) the SignalR connections do not always work, and the “Unit Production Completed” messages are not received by the client. This is a pain in the hole, but as I had already written the build queue to display “Completed” next to the tick count-down for the unit, this is not such a big deal. The information is still correct in the database and in the UI.

I have also made a start on upgrading existing buildings. When cities/colonies are first founded they begin with four construction slots, with one of them being taken up with the Colony Hub building. This building will (eventually) have effects associated with it, such as providing minimal entertainment, security, resources to the early colony. This is essential to ensure that a new colony will not immediately fail due to starvation or revolt. It will also justify the cost of creating a new colony in the first place, as it needs to account for the initial stockpile of resources and units.

That is all for later development, if I ever get there. What has been done in the last week is more mundane. I have moved all the components about so they aren’t just in a massive list in the root of the client application. I’ve also added the City Resources screen, which will give a visual overview of how many resources the city is producing and consuming. Only the production part is done for now as there is nothing in the game yet that consumes resources at a rate. Constructions require a one-time amount of resources, but I am thinking I may also have them consume another resource once they are built, such as the gas resource.

Military units are another obvious choice for resource consumption, certainly the food resource. This should make for a natural cap on how big of an army a player can build and maintain in their garrison. The players will need to balance food production and military power, as well as keep the colony happy with enough food for the settlers.

Anyway, here is that screen showing a colony that has already built a Core Mine and a Hydroponics Farm to produce minerals and food respectively:

City Resources

The plan is to show how each construction contributes to the resource production like a line-item, and have a summary line at the end showing the overall rate. I.e. if you’ve trained too many units to be supported by your food production, the rate will show as a negative in red. This is not necessarily a problem if you have planned ahead and have a stockpile of food. However once the food runs out units will be disbanded and the colony populace will become unhappy and the population will decrease.

I was also thinking about my approach to Domain-Driven-Development and whether it is worth it. I am leaning towards it not being worth it for this project. The overhead on having Domain objects with business logic in them, as well as DB entities in an infrastructure layer is making it slow progress to add or change anything. Also, as I am the only person who will be involved in this, what is the point of me coming up with a common language to describe the different models? There is no one to communicate with that could cause issues, and I am not a fan of a microservice approach to things. I do like the separation of concerns afforded by DDD, but perhaps just sticking to services and database models will be easier in the long run. I should read a bit more around the subject. I have been reading through Domain-Driven Design by Eric Evans but, honestly, I find it difficult to get through these types of books. My motivation to read a text-book is lacking, and when I do get around to it, retaining information is not my strong point. Maybe I should have chosen a different profession that doesn’t require quite so much learning!

I think I’ll make a non-retrograde post about software development and the types of books I’ve found useful over the years.

So, yeah, there is still a lot more work to do with Retrograde around resource rates. I need to implement the resource upkeep of various things next. As well as all the other things.

Good thing I’m not under any pressure to deliver anything!

back to dev blog

1st February 2024

Chris's Blog


2024-02-01