All articles tagged as:


Hex Map Area Borders

Today we're going to learn how to create a nice border around the perimeter of an area in a hex map using Unity and a LineRenderer. Here I have it as a dotted purple line but you can make it look like anything you want with the flexibility of the line renderer!The foundation of the hex code here is adapted from the Hex Map Series by Catlike Coding which has been super helpful for getting started. So if there's any bits of code I missed here it's likely from there, but please let me know in the comments if you're getting stuck or confused anywhere. First up we'll need a little background code f…

Read more »

Minimizing string GC in Unity

An easy trap to fall into when you're starting out in Unity is creating strings each frame in your update loop.  Say you have score that can change from a bunch of things: eliminating foes, jumping on a block, collecting a ring, or just existing. Whatever floats your boat.  Then in your score updater component you just do: void Update(){ textComponent.text = "Score: " + score.ToString(); }Easy and done.  Problem is, you're now creating a string (which are immutable in C# and allocate memory) each frame.  This will really add up and create lots of garbage which will need collecting.The U…

Read more »

Actions and Selections with Card Lang

When the events we set up in part 1 of exploring the card language fire it would be quite nice if they could actually do something! This is where actions get their chance to shine. There are a ton of different actions a card can take but we'll start out with just a few example ones like doing damage to pieces (Hit), healing them, or drawing a card. Just as we can have multiple events on a card we should also be able to have multiple actions for each event. We'll also need a way to pass arguments to these actions to tell them which pieces to hit, what player draws the card, and so on. So witho…

Read more »

Introducing Card Lang

When I was first starting the project that would become Solaria Tactics I knew that if you're going to make a card game, you better make the cards easy to design and tweak. There's going to be hundreds of cards each with special rules, conditions, actions and other crazy stuff I want to add. Designing all these cards and making sure they work as intended would be a big challenge then especially with a developer team of one. So the challenge was take a card description like "Deal 5 damage to all minions" and encode that into something the game engine can understand and execute when y…

Read more »

A Better Isometric Camera Control

Greetings from Solaria! This is the first dev blog post of many as I progress on the development of Solaria Tactics. Hopefully these will be useful for other developers on their long journeys in game development. Since the game is an isometric tactics game with simultaneous turns I really need to have a good camera control script so you can see what you need to and reposition it quickly for a better view in the heat of the moment. Unfortunately all the scripts I found online were incomplete at best and had glaring faults at worst. I needed something that had Click and drag panning that exactly…

Read more »