Weekly #10 (07.07.2025 – 13.07.2025)
Howdy!
Lately, I’ve been able to squeeze more hours into Squars than usual, so I’m ending this week on an optimistic note.
To everyone juggling side projects while managing “real life” — how do you keep up? I’d love to hear your thoughts!
As for Squars, I’m in the middle of refactoring the Card System.
The first version worked fine, but injecting card logic directly into various components turned out to be a maintenance nightmare. I asked myself, “How many cards do I want in this game?” The answer: Hundreds! So this time, I couldn’t just shrug and say “It’ll be fine.” Instead, I went with a Modifier-based approach:
This new system decouples card effect logic from the components they affect. Instead of components constantly checking if a specific card was activated, they now expose an interface — and modifiers apply their logic internally, with no awareness of cards involved.
Here’s how it works:
-
There’s a list of all card configurations in the game.
-
Each configuration references a Modifier object that implements the
IModifier
interface. -
This modifier can be applied to any Target object implementing the
IModifiable
interface.
In practice:
The BuildManager
answers whether a certain building type is available by tracking which types are unlocked. It exposes methods to change these flags. That’s where UnlockBuildingModifier
steps in — triggered by the card system, it modifies the BuildManager
without tightly coupling to it.
The CardsManager
tracks cards, and when a card is unlocked, its modifier is applied to the appropriate target.
I’m happy to answer any questions about this setup. It’s not perfect, but it’s working smoothly so far! I’ll keep you posted on any roadblocks down the line.
Aside from the refactor, I also took some time to refresh the Main Menu background.
It’s just a gradient and two particle emitters, but the result dramatically changed the game’s mood!
Not sure yet if I want Squars to lean this heavy into “gloomy vibes” — but for now, it stays. I’m proud of it.
By the way, the background is supposed to show a dark planet below and the atmosphere above. (I know it kinda looks like we’re underwater 😄). It’ll evolve over time — nothing’s written in stone!
As always, have a great weekend!
Changelog below:
CHANGELOG (07.07.2025 – 13.07.2025):
-
Card System refactor – Modifier-based architecture with encapsulated logic
New Main Menu background – Squars flying toward the atmosphere, gloomy vibes
Wishlist Squars here:
https://store.steampowered.com/app/3547120/Squars/
Squars: Legacy Version
Square Wars!
Status | In development |
Author | waclawi |
Genre | Strategy |
Tags | 2D, Clicker, Roguelike, Roguelite, Tower Defense |
Languages | English |
Accessibility | One button |
More posts
- Weekly #9 (30.06.2025 – 06.07.2025)10 days ago
- Weekly #8 (23.06.2025 – 29.06.2025)17 days ago
- Weekly #7 (16.06.2025 – 22.06.2025)24 days ago
- Weekly #6 (09.06.2025 – 15.06.2025)31 days ago
- Weekly #5 (02.06.2025 – 08.06.2025)38 days ago
- Weekly #4 (26.05.2025 – 01.06.2025)45 days ago
- Weekly #3 (17.05.2025 – 25.05.2025)52 days ago
- Weekly #2 (09.05.2025 – 16.05.2025)61 days ago
- Weekly #1 (02.05.2025 - 09.05.2025)68 days ago
Leave a comment
Log in with itch.io to leave a comment.