Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Coldy - Top-down, simple survival game in Unity

A topic by Sonderful created Jan 26, 2020 Views: 841 Replies: 23
Viewing posts 1 to 14
Submitted (2 edits) (+2)

Day 1

My son says “coldy” to refer to cold weather, in the same way we say “sunny” or “windy” and I thought it made a nice name for my game while I’m working on it.

My only other game making experience is with LibGDX in Kotlin, but I figured, based on the time constraint, that Unity or Unreal would be faster to get something demo-worthy.

I installed both, and started out with Unity. I bought Jetbrains Rider so I could use a familiar IDE for the code.

My idea is a top-down minimalistic survival game inspired by Don’t Starve and the History Channel series Alone.

It’s going to be set in a cold environment, the player will have to balance current warmth, and gathering supplies required for basic survival (firewood, food, maybe water).

I plan to have a pre-built fire that the player starts at, and give them no means of starting a new one, so if it goes out, it’s game over. In the first two seasons of Alone, a person lost their means of making fire, and it was a huge problem. I’m just taking that to the extreme, and saying there’s no comeback.

I looked up a tutorial for top-down games in Unity and found a familiar username, Sebastian Lague. I really respect his attention to detail, ability to easily explain complex concepts, and the sort of projects he works on in his Code Adventures.

I only had a few hours so I followed the tutorial and got a player (cube) to be controllable as it moves around a plane. Nothing amazing, but I’ve never achieved this much in a 3D game before, so I’m pleased.

There’s something satisfying about throwing the cube off the edge of the world and watching it plummet.

Submitted(+1)

Looks nice, but how are you going to follow the jam theme?

Submitted (2 edits)

Can’t believe I didn’t write down more than a mix of genres for my idea, so thanks for asking!

It’s going to be set in a cold environment, the player will have to balance current warmth, and gathering supplies required for basic survival (firewood, food, maybe water).

I plan to have a pre-built fire that the player starts at, and give them no means of starting a new one, so if it goes out, it’s game over. In the first two seasons of Alone, a person lost their means of making fire, and it was a huge problem. I’m just taking that to the extreme, and saying there’s no comeback.

(+1)
"There’s something satisfying about throwing the cube off the edge of the world and watching it plummet."

I just finally got my AI working this morning, and spent like a half an hour just making scenarios where a little yellow triangle pushed me off the edge.  Nothing to do with my game, I was just having to much fun. Even added a snapchat story with something to do with skynet? I don't know. But yeah, I totally feel this statement.  Good luck with everything!

Host(+1)

re: "coldy" that's really cute! do you have an idea of which survival mechanics you're thinking of implementing? it might be a good idea to make a scope-able list of which mechanics (most likely a list of timers) you're thinking of implementing and prioritizing them so you can focus on a few core elements.

Submitted (1 edit) (+1)

I had three main ones in mind, warmth (due to the theme), hunger, and thirst, because they’re pretty basic. I’m writing a devlog update with more details today. Thanks for the advice. :)

Submitted

Day 2

I started out the day by working on making my very first game asset in Blender. The campfire is the start point of the game, as well as the central location for the majority of the gameplay I have in mind right now. Unfortunately, I had no clue what I was doing, so it took a long time (more than 30 minutes) to come up with something mediocre.

Once I got the campfire imported and added a material, I spent a fairly significant amount of time adding a particle effect that is supposed to look like embers floating away from the fire (there is no actual fire yet, however). After that, I made the campfire interactive if the player is close enough, and interacting triggers the particle effect, which is nice.

Before getting into more Blender work, and some more terrain generation, I wanted to get started on the real basics of the survival elements. I added warmth, fullness, and hydration to the character, and set them to reduce as time goes by. Warmth does not drop if you are in close proximity to the fire (it currently doesn’t matter if the fire is unlit, which needs to be changed). You can see the stats dropping in the Inspector panel on the right of the gif below, if you look where the cursor is moving around.

I don’t think I’m going to get more done tonight, and I’ve got work all week, so my progress is going to slow right down. I’ll see how things are going after a couple of days, and adjust my expectations for the game accordingly.

Submitted (4 edits)

Day 3

Today has not been a great day.

I have only had about 3 hours to work on the game. I decided I wanted to add in some sort of fuel for the campfire, via a tree asset. Rather than spend a thousand years learning Blender, I went to the asset store, where I found a nice free tree asset to use for now.

I started working on a basic inventory system. I got a bit carried away, and also started refactoring some inefficient code, and tried to get my game objects to be more loosely coupled.

Unfortunately, during my refactoring, I did something that Unity was not expecting, and got this lovely little popup.

My first ever Unity crash, hooray! I lost all of the assets I’d pulled in, I lost the tags I’d created, along with the assignments of those tags to the relevant objects.

I decided to just add in one tree, instead of trying to make things look nice.

Then I spent about 30 minutes trying to figure out why I couldn’t find the script I’d attached to an object, only to realize–after another 20 minutes–that I had accidentally tagged the ground with “Campfire” as well as the actual campfire. Since I was only asking for one object (FindGameObjectWithTag() instead of FindGameObjectsWithTag()), I was getting the first one, which was the ground. Removing the tag from the ground worked, and now I feel ridiculous for having spent so long on such a silly problem.

Thankfully, I persevered, and managed to get the tree to be interactive. It adds an item to the inventory, which is not currently a visible component of the game. In the gif below, you can sort of see that the count of items in the inventory increases until it reached the size.

A small win on an otherwise frustrating day.

Submitted(+1)

Don't worry, things don't always go like we want. Take a rest and try to fix it

Submitted

Thanks for the kind words. I managed to figure it out in the end. I just updated my devlog to be a bit less negative. :)

(+1)

Congrats on your first Unity crash. LMAO for real though. It's really a joy to see progress getting made everyday. I'm working on item pickup and inventory today. Hopefully I don't have the same issues. But because of your post, I will be sure to check my tags. Good luck, have a great day. 

Submitted

I honestly had a moment of thinking about quitting yesterday, which is a ridiculous overreaction to one bad day, but it just seemed like nothing was going my way.

I am going to add this AutoSave asset to Unity when I get back from work today. I’ve learned from my mistake! :)

(+1)

I don't know why that isn't just part of unity. 

Submitted

Day 4

On my way home from work today, I was thinking about how I would need to replace my main character with something that looks like a person. Then, I thought, what if I just don’t?

A few seconds later I had completely rethought my game.

I’m now calling it The Last Glacier. You play as Coldy the ice cube, all that is left of the penultimate glacier. You’re aiming to reach the last glacier before you melt away completely. Sources of heat are hazards, snowdrifts, icy winds, and frozen lakes help keep you cool.

Ok, so, I’m getting a bit ahead of myself there.

I didn’t want to remove the campfire I spent so long working on the other day, but I couldn’t use it for the same thing if the main character is an ice cube, so I replaced it with an igloo, that only took me 26 agonizing minutes to make in Blender. It’s not perfect, but, well, look at the rest of the game. :)

I moved on to creating a secondary character, currently named Melty Guy in the scripts and asset titles, but I need a better name. This one only took me 19 minutes!

Melty Guy is the only other remaining part of the glacier you were once part of, and at the beginning of the game he is melting by a campfire. He urges you to go on without him and unite with the last glacier. I haven’t implemented dialogue yet, so there are just Debug.Log() messages that you can see in the console for now.

As you can probably see, I have switched the ground color to green, to represent grass instead of the grey used for snow before. Coldy is semi-transparent. I’ve added a wall between Melty Guy and the campfire to prevent you from moving down any further.

I want to give some more indicators that you should move up the screen, but I can figure those out later. I need to determine if I still need an inventory, and get rid of it if not. I need to implement some on-screen way of having conversations with at least Melty Guy.

After that, I need to look at generating terrain. It would be pretty cool to do something like Race The Sun does with its level generation, but I don’t want to eat up all my time on just that, if I could replace it with a small tailored experience.

Submitted (1 edit)

Day 5

I don’t feel like I got much done today. I started an hour or so later than usual, which didn’t help.

I moved a few things around in my scene in order to modify the controls. The game is now a runner. It’s not intended to be infinite, because I have a definite ending in mind, but you can’t stop moving forwards.

I spent some time working on adding dialogue between Coldy (main character), and the melting ice cube I imaginatively named Melty Guy yesterday. This is intended to provide a little bit of exposition, and then get out of the way.

I tried using something I found on the asset store, but it seemed like overkill. I decided to just add in a canvas, a panel, and some text. It took a while to get the logic correct for pausing gameplay, displaying the box, then dismissing it on input, but I got it working a few minutes ago.

I’m calling it a day at that, because it’s midnight, and I’m tired.

Oh, I did something I wouldn’t normally do when I have such a short amount of time… I upgraded Unity to the 2019.3 release. Thankfully nothing broke.

Submitted

Day 6

I focused on terrain generation today. My game is rendered in 3D, but the ground itself is completely flat. So all I need to do is generate some flat planes. Simple, right?

I started out following Sebastian Lague’s Procedural Terrain Generation playlist (starting at video #7, because I like to be in over my head, apparently). It took me a while to realize that I was wasting my time on generating perlin noise when I had no height to worry about, and no change in color based on the height. I looked at a couple of other videos, and then gave up and decided to write it myself.

I’ve already used the “One Eternity Later” image, so I don’t want to use it again, but trust me when I say this took me a long time, and caused a lot of frustration, as well as some laughter at how bad it was.

Anyway, after all that, terrain gets generated in an infinite line as you move forwards. You can’t throw yourself off the edge of the world any more (unless you jump off the side).

At some point soon, I need to prevent jumping off the side, either by adding invisible walls, generating planes beside you, or something like that. I also need to generate some trees and other decorations on all of this terrain.

I don’t want my game to run forever, so I also need to figure out how I’m going to stop the generation, and switch back to “tailored” areas.

Submitted

Day 7

Continuing yesterday’s theme of generating things, I spent some of this evening generating trees on the tiles so it’s not so plain.

I had a few false starts and interruptions, as usual, but I also made some progress. At first I was trying to construct entire new GameObjects, which was a bit messy.

I switched to cloning existing trees, and it worked pretty well.

Trees are being cloned, but never destroyed, and obviously the positioning is all wrong, too. I’ll have to look at those tomorrow. I’m really hoping to make some good progress.

I still have a lot of things to do before I have something that feels like a game.

Submitted

Day 8

I wish I had more time today, but I had a million things I needed to sort out before I could work on my game.

Progress

I improved the tree generation quite a bit. They’re now spread across the width of the level, and a little bit on the length, although not very much.

The camera has been positioned to track behind Coldy, so you can see the upcoming trees for longer, and avoid them.

I simplified the code for generating terrain pieces by just cloning the initial one, same as I did for trees.

Problems

I think I’m missing some multiplication by transform.position.localScale.z or something, because the trees spawn close together on the Z axis, and the terrain overlaps instead of being properly positioned end to end.

Now that you can see further ahead, you can see the trees popping into existence, partially because of the problem above.

Old trees still don’t get destroyed, and there are more of them now.

I’m hoping to make some improvements tonight, but I wanted to get my update done now, in case I don’t.

Submitted (1 edit)

Day 9

This is actually a post about today and a couple of hours yesterday. I came back to the game after my devlog update, and I fixed the terrain and tree generation.

Today I made some really solid progress, and it actually feels a bit like a game for the first time.

Progress

I added box colliders to all trees, and made them triggers. Hitting a tree reduces your health by 25 points (you begin with 100), and it slows you down by a fairly large amount, too.

Your health is now visible as a green bar at the bottom-right of the screen.

There’s a fairly basic calculation that results in your score being displayed just above your health bar.

If your health reaches 0 then you get a Game Over message with Play Again and Quit options that both work. If you fall off the side of the map (still very easy to do), you get the same popup.

If you hit a tree in the first few seconds of the game, you get a popup telling you how to control the player. Might be a bit pointless since you can’t really get past MeltyGuy (still haven’t named him) without pressing one of the direction buttons.

I added a title screen, and a bit of intro text. Neither one looks great, but they’re placeholders.

Problems

When you hit a tree it pops out of existence. I’d rather have some sort of animation. I’ve been considering a puff of snow and leaves and logs, but I’m not sure how easy that will be to implement.

There are fairly large patches in the game where the random number generator doesn’t want to put trees. I could add more trees, but then there might be areas that are too thickly populated. Perhaps adding some non-interactive scenery would help.

There’s nothing to do but avoid trees.

There’s no way to regain health, which might not be a bad thing.

There’s no end to the story yet.

Submitted(+1)

Day 10

I achieved nothing. I had a free evening, but then my son wouldn’t sleep, and so I had to look after him instead.

Day 11

I’ve had half an evening to work on the game. I wanted to get a really trimmed down version of the ending in place, in case I don’t have time to do more work in the remaining days. The ending is really abrupt, I hope in a sort of comical way. I didn’t remember to record any videos, but I don’t want to spoil the ending, anyway.

If I get time I’ll try to add in sound effects, some more objects on the terrain (rocks, grass, etc.), and a million other things from my Trello backlog, but this might actually be my final day of development for the game jam.

I look forward to playing it and seeing what the ending is!

Submitted

Don’t expect too much and you won’t be disappointed. :-)

Submitted

Day 12 - My Last Day

I’ve been struggling to stay interested in the game since I had to skip a day. The deadline was great at the beginning, it really got me moving, but now I think I’m just avoiding starting big items on my Trello board because I don’t want to waste time on something I can’t finish and submit.

I think I’ll possibly come back to the game idea at some point in the future, but I’d really rather it was Journey-like than some tedious mobile infinite runner. I just don’t have those sort of skills yet.

Anyway, today I added in some rocks with various rotations. I made them in Blender, and they’re so bad, but whatever.

I also added in some music by a guy named James Hammond. I bought a couple of his albums on Bandcamp a few weeks ago after seeing his post in r/gamedev and I picked something I liked the sound of. It’s too short, but I don’t want to find another track, so it just loops, with an obvious gap.

I added a credits screen so I could properly attribute the tree assets and the music.

I built the game for Windows, Mac, and Linux, although I haven’t tested anything besides Windows yet. Then I submitted the game!

I look forward to following the remaining progress of the rest of the entrants, and am sure there will be some great games to play.

Thanks for helping to make my first game jam so much fun. :)

Submitted

Maybe you can spend some time making images and decorating the store page of the game. It won't take you a lot of time and I think it would be very good.