January 2025 - Week 4


Welcome to the 12th development week devlog for Cosmic Construct. If you aren't already following the bluesky account for more regular updates, you should do that. Also, of course you should wishlist the game on steam if you haven't already. Every wishlist helps suggest the game and upcoming demo to more people.

In these devlogs each week, we cover the development goals set over the course of the previous week. The goals for the previous week were quite technical so it will have fewer images that usual. However I still have a lot of changes that I can describe. This will be a text heavy post.

---

[] Create images for the Hinderland terrains underlayer, so that it actually feels like an obvious new biome.

The underlayer is one of the more difficult things to get right while drawing. Looking at the game, you might think that the terrain underlayer is a square tile. It's not. While it is a rectangular tessellation, the individual tiles are actually interlocking puzzle pieces. I did this to prevent the creation of obvious seems between titles. I figured if I was going to procedurally generate the terrain, I would do it so that it's difficult to see any repetition.

I have pointed out an overlap in the terrain tiles I just found while getting a screenshot for the devlog. There are 256 terrain tile combinations, all of which are difficult to check. To be honest with you, I would have quite a bit of trouble finding where this overlap is in the set. It's small, so I'm just going to ignore it forever.

Anyhow, as you can see the new Hinderlands underlayer is finished.

[] Fix the bugs created from the implementation of multimaps, and make sure the saving and loading of maps operates as intended.

[] Write the update simulation function to separate pawn simulation in the origin map, from the player's current map.

Implementing multimaps caused quite few problems.

  • Maps were not being deleted when a save slot was deleted.
  • When a the map update function was called every 5 seconds, it would update the current map the player was viewing. Because the game has to simulate pawn movement on the map where the totem is located [50,50], the pawns were harvesting materials that wouldn't be replenished.
  • Similar to this, there is a function which pings a random map square every frame to trigger plant growth, and trigger some other functions. This was also only working on only the currently viewed map.
  • I am simulating the game by making all of the entities on the totem map invisible. They are still there walking around. The player could mouse over the invisible pawns and click on mobs while on other maps.
  • The saving an loading map functions would sometimes save empty maps due to a poor implementation of map row files.
  • Sometimes the origin and simulation maps would be unloaded before saving.
  • The pawns would occasionally interact with the current map while invisible.

To the best of my knowledge, all of these bugs have been fixed.

[] Create new placeable structures to prepare for pawn garrisoning, and passive income mechanics.

I have added 6 new structures to the game. Left to right, top to bottom. (oops forgot to build the first one)

  • Mine - This mine will be occupied by a pawn. While occupied, it will produce iron, copper, silver, gold, and other ore passively at a slow rate. This rate should be about as fast as the regular overworld mining, however, it will automatically deposit to storage. All without the pawn having to exit and deposit the material to a storage chest.
  • Well - Produces water as long as an empty vial is in the player's inventory. I'm not sure if I'll have pawns go and do this task. Water isn't really used for many crafting recipes currently.
  • Arboretum - Like the mine, this structure will passively produce wood while occupied. Anyone set with the Cutting Wood job, that finds an open Arboretum will occupy it instead of roaming the map.
  • Quarry - This structure will produce stone, and stone products: such as dressed stone, ashlar, marble, and other resources; passively at a slow rate.
  • Game Table - This one is probably the most fun planned addition. I want to add a few minigames the player can play with pawns. I figured I can give the player something to do to advance the settlement, aside from gathering resources. The Game Table will open a UI that calls a pawn to play minigames. Currently I have two games planned. A card game which I have yet to concept, and a dice game which I already have the rules for called "Sparkle".
  • Sericulture - This was the hardest for me to draw and took quite a bit of research. This is a representation of sericulture, the rearing of silkworms for the production of silk. This structure will produce silkworms at a rate equal to the number of silkworms in storage (up to a production cap per structure). The player will need to have a pawn assigned to the Sericulture job to perform it. Silkworms will only exist out side of the origin map, so pawns will not be able to gather them.


[] Further expand the tech tree, and add objectives. (If I have time).

I didn't get around to doing this. However, that was to be expected.

---

Attack Animations

Before this week, both the player and pawns attacks were cycled to the current animation from of their movement. Meaning moving outside of the bow attack state would progress the timer which controlled their fire rate. This caused an exploit which would allow the player to target and fire an arrow immediately.

Now the player and pawns have to fully draw their bows before firing arrows.

Place Mode Checks

Some of the buildings I am adding to the game now are "building sized". The current grid squares are intended to represent large tables and devices, and not the fronts of businesses, single family houses, or industrial production spaces. Because of this, I needed to add additional class of structure size, and refactor the structure check code to streamline it. Especially if I am checking neighboring tiles 60 times a second.

Those checks have been completely redone, going from 40ish lines of code checking array values, to just 6. Place mode should be quite efficient on framerate now.

Background Music

I have been quite open about the AI generated background music used for Cosmic Construct. Very simply, I don't have the money to afford paying an artist for dedicated high quality music for my game. If you don't like the AI generated background music, feel free to hand me 500-2,000 USD for every song you want me to replace; I'll gladly accept it. Support your local artists!... but... to be perfectly honest with you all, I actually like this music as it is, and feel it would be a waste of money to pay an artist to essentially just remake what I already have.

Until then, all of the background music in the game is generated with Suno. I have been using Suno since before it was publicly released. I am very familiar with it, and know how to describe the music I want from it (prompting). I have hundreds of credits available for generating music, and have a good ear for what style of music I think fits my game's artstyle. 

I don't just generate any song and throw it in. I choose maybe 3-5% of the total generations output by Suno. Even after that, I manually go through the process of adjusting audio levels, bumping the lows until I can get the amount of bass reverb I like. I try to take out the sharp highs, but some songs really don't allow for that kind of thing. I change the sample rate, and clean up pops the sample rate change can sometimes introduce. I fade the audio out, and normalize it with the rest of the game audio programmatically.

With that said, I added 4 new "rare" BGM tracks to the game, that are faster paced than most of the game's music. Just to switch it up. They won't play on the list all of the time, but I feel adding them was a good choice. Then 2 new "regular" BGM tracks, which are on the normal playlist. You can get a sample of those from this video.

---

This next week of work is going to be eventful. As I need to prepare for the release of the steam demo, which will be available on the 7th of February at midnight eastern time. So watch out for that. It will come with a weekly devlog post, and will act as the first real public test since multimaps were introduced.

+ Prepare for the demo release. (priority task)

+ Add art for additional cloak ranks.

+ Complete the art and UI for the Tailor structure.

+ Add the cloak rank logic and equipment UI for the pawn manager.

+Add the "Gift Cloak" interaction, which requires the equipment system to be completed.

+ Complete garrisoning logic for pawns. (maybe)

See you next week during the steam demo release.

Leave a comment

Log in with itch.io to leave a comment.