Making an Immersive Farming Sim in 48 hours - Game Jam Devlog!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hey guys wintermeat here and welcome to the channel so i recently participated in the gmtk 2020 game jam and i thought i'd make a video about what i made and some thoughts i had about the jam [Music] if you're not familiar with game jams they're a subcategory sort of hackathons where you're given a theme and a set period of time where you have to develop a game from scratch of course for different jams there are different roles but for this one i made pretty much everything by myself except for some of the sound effects and the theme for this jam was out of control only actually managed to start about seven hours after the beginning of the jam but i began by brainstorming it's generally a good idea to spend a lot of time designing than to just wing it with the first idea you come across since you'd end up wasting your time developing a terrible idea and have to restart so i typically storyboard on paper but i thought i'd record it with critter this time my idea was to make a game about positive feedback loops loops that sort of feed on themselves and get more and more out of control so this would be about the rain getting out of control due to your sacrifices to the rain sprites this theme was largely inspired by weathering with you a really great anime i watched earlier this year i also decided to make a controlled by console by typing in commands because that would be a fun programming problem and would also create an element of being out of control of the game world once i settled on a theme i began by developing the core gameplay loop this was an important thing to think about as it is in most games but especially important in a game jam and it's basically the actions that a player will do over and over again in your game so the idea is that you sew a plant a random seed on a tile and then you feed the tile every day that the plant is fed it has a probability of growing now once it's done growing you can harvest the plant and then sacrifice it to the rain sprites and that's how you progress through the game the indicators of this is that there will be a bit of story that comes in the console every day as well as a change in the rainfall effect and some new seeds added to your inventory that you can randomly plant i used a sprite for the art like i usually do and i started by making some tiles so i used square tiles at first but i realized that didn't look very good and i wanted to try something that i hadn't done before because that's what game jams are for so i tried using isometric tiles and i think that was a good choice basically it made everything look a lot more polished and it conveyed the idea of a physical game board a lot better i also didn't realize you needed to make perfect hexagons so this got screwed up real quick with the tiling and i had to kind of redo it but anyways quick tip if you're making isometric tiles especially in pixel art form make sure everything's at a 60 degree angle or make sure each of the edges meet at 60 degrees angles and you form perfect hexagons for each of the tiles and to create the tile variation all i did was change the hue saturation and brightness values of the tiles in order to create different colors like a like a fed tile a dry tile a stone tile like a purple fire tile and a water tile then i created a new project in unity imported the isometric sprite sheet and added a simple drop shadow underneath to try to improve the isolated virtual effect so at first i made this drop tile with several sprites but i realized i was being dumb and i just created a single big drop shadow also for the fun of it i tried to make everything bounce which is easy enough i just applied a sine function of time to the vertical position of the tiles and to the scale of the drop top of the drop shadow so it would look like as time passed the tile the whole tile map would move up and down and the drop shadow would shrink as the tiles moved up then i created the main ui for the game it was surprisingly simple i just mocked up like a console shape and a sprite and i made it sliceable fortunately unity and text mesh pro have a very cool text input component a text input box which is very useful and i really didn't have to do too much coding on that end i also sort of tried to clean up the scene a bit and i experimented with a couple of different fonts to use with text mesh pro but i like the hack font so i sort of just went with that it was really really easy to get the text input module working and i really can't overstate that and it's one of the reasons i like working with unity okay so on to the development of the whole console thing [Music] the first thing i added was syntax highlighting and sort of a tokenization of the input and i came up with a really dumb idea that i ended up regretting afterwards which was to instead of just append text to the end of the output i decided for some reason to refresh and reprint the whole filtered history of the console output and then crop off the top in order to make scrolling easier which i suppose was true but that created a ton of problems later so i just wrote down a couple of key words in the list and i compared those against all the tokens or words that i was given things like sacrificed and harvest and such i ran that thing through a text parser and then i just printed the text with rich text formatting which was also built into the text mesh pro input component anyways my decision to reprint the console every time created a whole ton of bugs and i ended up spending quite a while to flatten all of them but i got it working in the end mostly now for the time system basically what it does is every three seconds it adds 10 minutes to the game time and then it uses a fairly simple formula just with like modulo and subtraction and integer division um i don't know i just kind of made it up in order to translate from minutes to hours and days and this let me implement my first functions in the console which were wait and time so what these would do is it would display the time when you typed in time and weight would just past 1 40 minutes which is the equivalent of 24 hours so it just moves from one day to the next i created a system for the tiles so i start this in a 2d array c sharp is a little bit weird in that it's not a bracket per dimension but rather it's comma separated dimensions and i've never really seen that in another programming language anyways i just made a 2d array for this and i created a tile map to store my tiles for some reason i started the tiles in a 1d array and then tried to loop through that to force them into a 2d map but just because i thought that would be easier than me just labeling them but that optimization ended up just wasting time i also added these coordinate markers to the grid which is actually quite useful as it would show the player what tiles were called which ones and with the tiles reference i could start with some more complex console commands so for example what the water command does is that it reads the first keyword and then after that it takes in parameters so it just splits every keyword you put in afterwards or every token you put in afterwards so you can say water a1 a2 a3 space separated and then you'll just split those and apply the water effect to each of those three tiles which i thought was pretty cool and very simple to implement you'd imagine that error handling would be sort of difficult and kind of a nightmare and something as complex as a console but i kind of just ignored any invalid commands so yeah that that worked well enough it's a game jam you can get away with that i also want to create a visual flash effect so you know what happened to what tile and in unity it's kind of complicated to make delays so i just used a simple code routine to toggle the opacity of the tile from 0 to 100 like twice in half a second and you can see that it works which is pretty cool and surprisingly straightforward to implement okay so on to adding plants the first thing to do as usual was to ignore the rules of prototyping and start by making art i decided to create three phases for each plant so you'd start from like a seed and then have a sprout version and then a mature plant very much like in stardew valley i then had to export that as a sprite sheet and then attach my plant object every single one of the tiles and my idea was just to toggle the opacity of the seed and then toggle through these specific sprites through a plant controller script which is fairly simple i use scriptable objects which are a very cool feature of unity to store the plants although you didn't really have to and i just thought it might be helpful and fun to gain some experience with those [Music] so how the plants work is that every day if they are in a fat tile at the end of the day they will have a chance of growing and after growing twice they are harvestable with the harvest command i also added the plant function to the console so you can plant multiple plants in multiple tiles at once cool so that's like half the gameplay loop done i also have to add a couple other functions and also an inventory but i didn't want the player to have control over the type of plan they would sew mostly because that would complicate and screw up my whole text parsing system so i kind of just picked a random plant for them to sew whenever they planted a seed in a tile and i would add more available seeds over time as you progress through the game i also had to make a couple of utility functions to list the kind of seeds that you had available as well as to check your harvested inventory so on to the raindrop effect the idea here was that raindrops would fall at different angles and different speeds depending on your progress to the game so that as you get got further the brain would become progressively more harsh and i thought that would be a pretty cool visual indicator the actual physics of this by using like collision volumes and rigid bodies and like other dumb polygon colliders was a complete nightmare to code so i kind of ditched it um unfortunately i couldn't make the rain splash on the tiles so it's just sort of like a screen space effect and i wrote a simple translation function i just specified a direction vector and then it would just move in that direction and it would just toggle the angle of the sprite so here's a test at this point in the game i have the feed function the plant function the harvest function and growth in plants implemented as well as some cool visual effects and at this point it was like 1am and i headed to bed here's a look at my setup [Music] after a couple hours of rest i woke up and i got back to it in the morning so on the checklist now was to finish off the remaining tasks like the sacrifice function usability improvements more plants general art like a main menu sound and publishing to itch.io last year i had an annoying experience trying to build it because it kept on crashing so i thought i'd leave a bit more time for myself in the future which was a good idea because i ended up having the same problem with building it and i had to restart my computer in order to make it work so initially i wanted the sacrifice function to randomly sacrifice platformer inventory but i couldn't figure out how to take things out of a list that i was enumerating over without completely screwing it up so i kind of just had the sacrifice command clear your entire inventory and i also added a help function which would display the available commands and this ended up messing everything up later because of how i wrote the console systems because i'm an idiot so a little bit more time was spent to bug fixing i also spent a good while writing some story and i thought this would show up in the consoles sort of like news reports every day so i just wrote 20 of these one for each level of rainfall intensity and as you sacrificed harvested plants the rain would get stronger you'd gain more plants and also maybe get a new snippet of story rich text highlight function came in handy but i also screwed up pretty badly and i made the highlighting opaque on two of them because i typed the wrong hex code forgot to add the opacity value so you can't read some of the story unfortunately sound was going to be an integral part of this project so i spent quite a while on it i was going for a melancholy but cozy feel reminiscent of a typical rainy day here's me and my guitar experimenting with a couple of sad sounding chords over which i placed a simple loopable melody i put this together in audacity because i really didn't know what dot he used but that's something i'll research for the next game jam then i applied some basic effects and imported it back to unity back in unity i created a couple of audio sources enabled in order to handle the three sources of sound in my game so there would be an ambient sound sound source like for the rain and the rain sound effect and there'd be an sfx audio source for the thundersound effect as well as an audio source for the background music working with audio in unity is actually really easy and a nice experience so i quite enjoyed this part and it was at this point i really felt that the project was starting to come together so the last thing to do was to build in a main menu so this would be the first thing the player would get to and instead of trying to put this in a different scene and rebuild everything and make like complex scene transitions i just moved everything off screen and i created a nice and minimalistic screen that didn't require unity's animation system which i hate and instead i just used a larp technique i figured out earlier to transition from a basic starting screen with the gameport centered a small instruction and the title of the game at the top to a screen split between tiles and the console now there are a lot of things to transition but it's really easy by just setting a target value for a property and then using the linear interpolation function to to move the property over time towards the target whenever it differed now all that was left to do was package up the game which was easier said than done and uploaded to itch.io i'm really proud of what i managed to make in less than two days despite a couple of smallish bugs and i'm really glad i joined this jam so if you want to give this game a shot i linked it in the description and it's completely free and playable in the browser play it with headphones and don't rush through it just relax and let yourself become immersed it's only maybe 10 or 15 minutes long the pc version if you download it is full screen 1920x1080 and possibly resizable though i don't know and that might be preferable to the browser version i'll also upload a full playthrough on my channel in case you want to watch me play it please leave a comment about what you thought and don't forget to like and subscribe for more game dev content i hope you enjoyed this video and i'll see you next time for the conclusion of my elements of motion graphics series [Music] bye you
Info
Channel: Wintermute Digital
Views: 278,973
Rating: undefined out of 5
Keywords: gamejam, gamedev, indie game, gmtk, game dev, indie, game design, programming, coding, pixelart
Id: qh7MCQzjH08
Channel Id: undefined
Length: 16min 55sec (1015 seconds)
Published: Thu Jul 16 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.