Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

[Devlog] Frostbite

A topic by Critters created Jan 26, 2020 Views: 400 Replies: 33
Viewing posts 1 to 26
Submitted (1 edit) (+3)

A small RTS where you fight to push back the frost that slowly envelops your world. Your primary weapon is fire, and to build and fuel the fires you must harvest trees

That's all I have so far, I am thinking that maybe small woodland creatures get stuck in the frost and you must free them or you have to push the frost back to its source and "cap" it. You collect wood and use it to fund the construction and resupply of fires / towers that shoot fire


I want to tackle the unknowns first, and the biggest for me is the spreading of frost

Below is a 100x100 grid of floats with 2 points marked as the source of frost. What you see are spherical gizmos to help visualize what is happening, where the radius of each of the 10,000 spheres is representing the 0 to 1 value in the array at that point in space

I figure I would run this "spread the frost" function followed by the "apply the heat" where fire would basically subtract from it. This is running at 1 update per frame and takes 0.0022s to process, to slow things down I would probably only have it update 10 times a second. As it's a nice 2D array of floats, I can easily use it to determine damage to buildings / freezing of things by just sampling it with X/Y coordinates.

As for how to visualize this in the final game, I am thinking a mesh where each vertex height is the frost intensity and it pokes through a flat ground plane. If that looks janky then maybe some marching cubes or some shader magic (which i've never done before, but how hard can it be? ;) )

And I may use a perlin noise to make it spread in a more organic/interesting way where the value in the 2D perlin noise dictates how quickly frost can spread on it, maybe that will be visible to the player (frost travels at different rates through water, stone, dirt, grass) or it may be hidden


Added a quick perlin noise, using the same gizmos to visualize it as I tuned the scale and intensity values:

And then using it to adjust how quickly the frost spreads, looks more interesting for sure:

Submitted (1 edit) (+2)

By defining a Vector2 array of "heat sources", then taking a 2nd pass at the frost array where I reduce the values based on the distance from these points, I have AOE fire:


Replaced the gizmos with a mesh that has 1 vertex per item in the frost array. Height is set by the value in the array and it pokes through a ground plane. In this example I have 2 heat sources, i added the ability to define their size, strength and duration (life), they both "pop" after a few seconds and the frost fills in the holes they made

Submitted (1 edit) (+2)

A simple pan/zoom camera controller and I think those 4 white boxes that do nothing count as UI ;)


There’s something about this movement that makes me think of a bunch of PixelJunk games that I loved playing on my PS3/PS4 years ago. Perhaps PixelJunk Shooter, the way the ground gets eroded by lava or something.

Really good work so far, I love the images you’ve included!

Looking really good. Is this Unity you're building in?


Yes, vanilla Unity 2019.2.19f1. I will probably use a tween library at some point but that's probably all. 3D modeling will be done in C4D and/or maybe this program i've just discovered called MagicaVoxel that looks fun

Excellent! Good luck! I look forward to following your progress.


This is a great idea for a game, and your frost effect already looks really cool!


Looking forward to playing this once you're done!


oh this is soooo interesting and really well documented! all of your gifs + screenshots really show the progress you're making and i can pretty clearly see your thought process even before i read the descriptions. the combination of distance and perlin is super clever--the effect overall is really cool! great stuff!!

Submitted (1 edit) (+2)
  • I generated a noise map for the terrain, which I use to set the height of each vertex
  • Using the same noise map I texture the terrain blue,green, grey at different height thresholds
  • I modified the frost mesh to also use the same height map, offset slightly so it's just under the ground. As the frost spreads it moves up and pokes through the ground
  • I then used the colors to make the frost spread quickly on water and slower on rock

And a quick change of a seed value generates a new map, causing the frost to spread in a completely different way:

I will spawn the trees you need to build and fuel your defenses on the green, you won't be able to build on the blue, but you'll want to keep your structures on the grey where the frost moves slowest

And if  you want to follow along and see what open ideas/questions I have, you can view my trello here

Submitted (1 edit) (+2)

I wanted to get building placement done tonight, but ended up with falling trees

Trees are given a random rotation when the level is generated then are tweened to fall forward. I do not know if frost will "kill" trees, but I wanted to get them falling for when they are harvested and code to check if a point on the map is frozen, so put two and two together to test both. If I do keep the "frost kills trees" logic then I'll probably have the frost turn them blue over time before making them fall so you have time to save them, as they are a valuable resource... or maybe they can still be harvested if you push back the frost but they are worth less


oh THIS IS SO AWESOME my jaw literally dropped seeing the trees fall in the direction the frost came from..... so cool!!!


Ha, that was just luck, their rotation it's set when the level is generated and they fall forward :) not a bad idea though, I'll add it to my stretch goal list


I took a break the last couple of days, but tonight I started work on buildings. As you move them around they follow the height of the terrain and you can click to place them or right click to cancel. I haven't put in any overlap detection with other buildings or trees, but gotta start somewhere :)


WOW! This already looks like a sick game and I can't wait to play it when it's ready!


I want to play this much more than I want to play my own!


Me too!


Using a 2D array of bools, buildings mark them as true when placed and check against it when moving to see if they can fit

No stacking 100 towers into a single point in this game ;)


Now, do trees block buildings or do buildings knock down trees?


In the game Islanders (really enjoyable if you haven’t given it a go), buildings replace trees.

The trees are really important in your game though, right? The main resource for battling the cold, if I remember correctly. Might be worth blocking buildings, since there seems to be plenty of space to put the buildings in without destroying other things.


So, this happened:

I have no idea why the trees turn green, 2D, and jump around as the camera moves, but it looks like I/my game somehow broke WebGL exporting

After much head banging and reverting to older versions with no joy, i'm just going to export as a windows executable, unless anyone here has seen anything remotely similar? I had to remove GoTween as that broke on WebGL compile, and after using iTween this happened, but I completely removed iTween and it is still broken


Tonight I got basic workers into the game, they can be given a target and have a payload (carrying wood) to drop off or pick up on arrival. They speed up and slow down as they depart/arrive

Here's 100 workers moving to random points


The little guys can now deliver to buildings under construction or needing ammo

They can harvest wood and take it to lumberyards

If their lumberyard is destroyed they go help out at another

And towers now fire on the frost to push it back, requiring ammo to be delivered


I could watch these things work all day.

I really like the snow creep. :)

The snow/ice looks awesome :)


Instead of making levels, or trying to balance the difficulty too much, I've exposed all the settings so you can make your own levels. Next up is to create a "normal" and "pro" preset (essentially 2 hand-picked levels) and maybe a way to save/load settings (copy/paste a string) so people can share levels to compete for a high score


Showing construction and ammo with models instead of UI



Holy cow! That’s so impressive to see. Really clear to see this was a lot of work, and done well, too.


Aaaaaaaaaaaaaaand posted:


OK, so it turns out this little box was ticked and it wasn't downloadable, i've unticked it :)