Daily Notes


Id did some daily note-taking on my progress if anyone is interested:

# Day 0

What are my goals for the game-jam and why do i use [[monogame]]?

I already joined game-off 2021, which i really enjoyed and shorter game-jams don't work for me becaus of my family. I really enjoy doing side projects and learning new stuff. The time leads me finish one those without it being to big of a commitment.

Also I want to use the game-jam to validate that i can make a game with monogame and that i enjoy it.

Why Monogame? I currently work (on and off) on another game, currently in Unity. Although i was not actively developing when the Unity price-scandal hit and it probalby will never effect me, the drama made me think about switching aswell. Especially because i hardly use any Unity Feature. First of i thought about Godot but then found monogame. Which has me kind of excited because i enjoy the time coding more then using the editor. My Scenes were already empty and filled via code.

I have a bit of concern that i will do alot of work with multiplayer and some other systems that i would have out-of-the box with an engine.

# Day1

I just heard the theme "scale" and did a bit of brainstorming with ChatGPT. One of its ideas was a Markletplace which led me to think about balancing an economy und ultimately to [[Colonecon]]

# Day2

I was thinking about having at least 2 more ideas, but [[colonecon]] kinda speaks to me and matches my requirement of no physics/heavy UI or anything and will be mostly logic based.

The repository is created :)

I asked myself which questions do i need to answer to get a working playing system and am quite satisfied with the results. I know have a good understanding of which actions and decisions i want to offer the player and what the winning condition will be.

It might get hard to balance it so i get the result i want to i.e. exploiting the other factions will do more harm than good.

I also have a basic roadmap as of now and i only about 3 days per basic feature, which is really daunting considering that on most days i will have only 2 hours and no prior monogame experience. And then i somehow want to make it look good.

# Day3

I started my game generating a hex-tilemap. I first struggled to get a hexagon sprite but managed after some time, although i still need to clean that up and get it right for exact ratios.

Generating the grid in code was already familar from my past project and created the Tile and Tilemanger class. Then i spent some time on where to load the textures and draw the screen. For now i settled on a gameplayscreen. Later on i want to add a screenManager. For now i am able to draw hexes although the spaces are not 100% correct. So far monogame is a bit more work, but i manage and like it. Also ChatGPT helps :)

# Day4

During the day (while my kids painted and stuff) i did think a lot about how to trade resources and which buildings/resources i want to offer and i think i have a good base.

When i was finally able to work on the project in the evening i started with creating a new HEx-Sprite with exact ratios and was able to clean up the offsets. I made some stupid errors there and it took way too long.

Afterwards i centered the tilemap and gave tiles a random value of Mira-Deposit. Mira will be the target resource. Also I coloured the tiles based on how much Mira is left in the tile.

The last thing i wanted to is write a script that let's me select Tiles. I first thought ChatGPT would do that for me but both approaches he offered did not work. And since i don't have enough time i looked elswehere and luckily found this stackoverflow question from 2012: https://stackoverflow.com/questions/7705228/hexagonal-grids-how-do-you-find-whic...

To make this work i first removed the Offset i used too space out the tiles and instead offset the hex in the sprite itself.

Then i was able to follow the answer i can finally select the correct tile ( i wrote a small class that displays the coordintes of the clicked tile on screen)

Next up is placing builings.

# Day5

Made myself familiar with the monogame UI Library Myra (I first wanted to go with Empty Keys because it uses xaml and i also try to lern Maui but Myra ist still updated).

Adding a Menu and End-Turn Button was easy enough.

Then made some Basic Sprites for 2 of the Buildings and set up a BuilingHandler to save the BuildingData includig the spritepath. I am not happy with this solution but i works for now.

Lastly I wanted to add Button in a horizontal StackLayout with the Sprites as Background, but I could make it work for now and since i have to work tomorrow i am wrappping it up now.

# Day6

Frustrating day. Did not have much Time and pretty much wasted it all by trying to setUp emptyKeys instead of Myra. Tomorrow i will try to get the Myra Buttons to work.

# Day7

Not much time today because of priorities. But I learned how to setup Myra Buttons and Images correctly (Thanks Myra Discord + Wiki!), now i do have a Button for each building represented by the Sprite. Tomorrow i will need to add the Button Functionality and actually place the buildings.

# Day 8

Finally a day where i reached my goal. First up i implemented some logic that clicking a building button shows that the building is currently selected. Then i fletched out the Tile with an owner and a Building (Had to create an abstract faction class and the player class which inherits from it for that) and setup a TileMapInputHandler. That one now sets a building and an owner when clicking on a tile while a building is selected,

Lastly i updated the TileView to also draw the buildings.

# Day 9

Was not able to work on the game. Family always comes first!

# Day 10

My Goal for today was to introduce resources and make placing buildings cost sth. For this I introduced a resource enum, ResourceStock in form of a Dictionary <ResourceType, int> to the Factions an buildingCost, ProductionRates and ConsumptionRates also as Dictionaries.

When i try to build sth. i now check if the faction also has enough resources and subtract them afterwards.

Then i outsourced the building date to a JSON to have easier access when modifying it later on for balancing purposes.  Since it was my first time working with deserialization of a JSON it took me some time to get the corresponding classes right.

At alst i also implemented a notification which resources are missing. That i do have to finish tomorrow.

# Day 11

Tried to fix the InfoWindow first, but it somehow bugs out and i cant close it anymore, when i do not first click on the close x (actually i am not  sure what causes it). Since this not essential to the game i will just display the info somewhere else later on and focus on other stuff first.

I added a new UI Element Containing the PlayerResources as well as functionality to update those whenever the resources change.

Also the prices of the buildings are now shown. Since i don't have icons for the resources yet i used their name. Looks really bad :D

# Day 12

Pretty good day. I introduced turns and calculated the production and consumption of each turn, which went pretty smooth. I may have some optimization here to have more control over which building will get destroyed if you do not have enough energy.

Afterwards i expanded the UI to add an Info-Panel which for now display a message if i try to build sth i don't have the resources for, but will be used for other messages aswell.

I also introduced i building info, which will display the consumption and production of a building when clicked on it. For now it is empty.

Lastly i fixed a bug with the hex-selection which allowed the player to click left of the first tile colum and select the tile in the first column.

# Day 13

Today i wanted to implement the tradesystem. For this i started by creating the NPCFactions. During this i extended the Turnmanager to runNPCTurns, which currently only calcualte resources and tradePrices.

Then i started to refactor the Tiles a bit. I removed the Tileowner and insted gave the faction a TileList of their tiles. This will make the resource consumption logic easier.

Next Step is creating the TradeUI.

# Day14

Had very little time today and just lay out some of the Panels for the TradeMenu.

# Day15

Today i finished the Trademenu and Trade functionality. Afterwards i exchanged the resource names in the Ui with resources sprites, which saves quite some time.

# Day16

Started implementing the AI System. I started by defining an Interface for NPC Actions which can building something, trading or getting resources from home. For now i only implemented the building one.

Then i setup everything so that i get all possible actions and assign them a value (for now that is random, but i will calculate it later on).

I did some refactoring during the process and after i got everything to work the factions do place buildings but those are somehow always the same. I will have to check on that tomorrow

# Day17

Turns out it wasn't a bug but the random_range was so small ant the number of possible actions so big that basically everytime at least on action of the first building type was among the highest and was chosen first.

Then i started to draw the Faction territories and also added the neighboring Tiles of building to the faction territory. I think this will be key in managing the balance.

At the start i want the player and the NPC factions to place a start building (rocket) to start the territory and then restrict building to the territory.

At the end i decided to refactor the UI and split the big class into 5 separate ones.

# Day18

I fell asleep while bringing the kids to bed. No Update.

# Day 19

I wanted to introduce 2 things today:
1. When starting the game you first have to build a landing base (and the Buildingoptions are not available yet + reduced UI). Afterwars the NPC set a landingbase

2. You can only build in your own terriroty.

The first one felt a bit hacky and i am still not happy with every code. (BuilOnTile makes some assumptions now that might hold true for the gameJam but would not be feasible otherwise). Also i haven't reset the UI after the Base is build.

The second one also made the code a bit ugly and i still have to limit the buildingplaces for the AI.

# Day 20

Started by showing the UI again ,when the landingbase is placed. Then i limited the AI to build on their territory and also had to add Ai territory when building. For some reason i did not use the same function for the player and the ai. I changed that.

Afterwards i lay the foundation for the action validation by actually reducing mira from tile if there is mine and calculating the Consume and produce of each resource for each faction.

# Day 21

I am way to tired and should go to sleep. Let's see what i can manage anyway. I was atleast able to write some base for the move evaluation. I will still have to figure ot the numbers but for now it seems to be somewhat logical.

# Day 22

Tried to convert the game KNI to get browser version but did not spent too much time on it since i prefer having a game finished that no one plays to not having any game. Might try again if i have some time left.

Afterwards i added the possibility to obtain the faction resources. For the Player via the TradeMenu and for the AI implemented an according action as well as an action to trade with the other factions (including the player).

I am missing the evaluation for those and the possibility for the player to set the available trading resource that the NPCs can buy.

# Day 23

Started with displaying the consume und produce of the player, which made some bugs visible. I added some tiles multiple times to the faction territory, which messed up the production and consumption.

Afterwards i added the ingame menu window to restart the game. I also tried to get a release version but that did not work. might have to try later. Or give KNI another try.

Tomorrow i want to give the player the possibilty to set the available trading resource that the NPCs can buy.

# Day 24

AS planned i added the possibilty to offer Terrasteel for sale. I also started to reformat the TradeMenu a bit. It is still quite ugly. I might also change it to a window.

Then i encountered a stackoverflow bug. because i was raising the onresourcechanged event way too often.

Afterwards i tried again to get a release version, which did not work, I was able to get a release version of blank monogame project so something with my game seems to not work. i also gave KNI another try but did not get it to work. It is also way too late now :(

# Day 25

Had visitors and was not able to make any progress.

# Day 26

Spent some time again to try and get a release version. I found one reason: The Json containing the build data was not part of the build. fixed that but still did not work. Will try again the next days.

But also decided to go on with the game itself. I implemented the base for the Research upgrades. Still need to finish the UI and the Activation of the Upgrades. Also i am not really happy with the code because i now rely on the names staying the same, but time is short and i still have some things to do.

# Day 27

I finally got a publish version of the game, which is a big relief.
After that I finished the reserach menu and added to costs. Could not really test the upgrades yet. Also added the AI Logic for the research upgrades.

Tomorrow i will need do evaluate the trading actions for the Ai and add the logic for the NPCs to leave the game. After that it is cleaning up the UI and Testing/balancing. Might be a close finish but after today i have hope that i will be able to publish something.

# Day 28

Finished the evaluation and afterwards changed most of the values in the evaluations as well as some of the other parameters to make the gameplay somewhat close to what i imagined.

Also found several bugs during the play tests.

Afterwards i implemented the faction leave logic and the End Game Screen. Tomorrow i will tackle the UI and add some vital information to it. like Miradeposit and production/consumption rates. But the main game-loop is finished :).

# Day 29

I made the Informations visible, made the game Fullscreen,s changed the Playfield size and made some general Ui adjustments. Tomorrow i want to clean up the Trademenu and afterwards its just playing and trying to balance the game somehow.

# Day 30

Started by making final UI Changes in adding the Mira as Highscore to show the goal of the game and added the resource sprite to the TradeMenu.

# Final Day

I wrote the description and submitted my game ... here it is.

Files

Colonecon.zip 6 MB
Nov 30, 2023

Get Colonecon

Leave a comment

Log in with itch.io to leave a comment.