official devlog for
carrotcake
written by Louis Durrant
Thursday Report: Show Me The Options
Just a quick report today.
With expanding the map by some size last week, I quickly ran into an issue of performance. While I could fill out an acre with many thousands of nodes, having the game render that another 36 times across the map on the fly was asking too much.
Fortunately Godot has a ‘VisibilityEnabler’ node that allows the game to know whether the character is walking into range of a prop (say, a bush or a tree), and when they are walking out of range. This means I can set each item to remove itself from the game, then spawn itself back in when the character moves close enough (hopefully, all off screen). This took a little time to figure out since it was all new to me, but things seem to work pretty smoothly. The trick is having things load in such a way as to prevent stuttering.
It’s dawning on me that not only for the sake of performance, but also for the sake of saving and loading the game between play sessions, I’ll likely need to package all props and items in their own container nodes that carries nothing more than the item’s location, and whether or not the item has spawned or not. It will simplify things in the long run, but I do wish it was something I had considered earlier on into development.
I built a main menu for Godot some months ago now, but never showed it on the blog. The main reason was that I hadn’t settled on a name at the time. In fact, when making the menu was the first I had written down ‘The Garden Path’ as a placeholder name, and I suppose seeing it everytime I booted in made me more and more fond of it.
I’m even more eager to show it now also because I spent some time this week fleshing out the options menu. I figured it was important to begin mapping out what the players would be able to change early on, so I can anticipate how the game might be played and perceived differently on different machines.
I do think there’s a balance when it comes it options. While giving more power to the user is rarely a bad thing, sometimes you can overwhelm the user and create the opposite effect ā where users will be hesitant to touch the settings at all. I know personally that while I love to get stuck in with a good number of options, having so much power can sometimes be a headache.
Being a 2D game, the possible list of options is pretty limited to begin with. I’ll be building and testing the game at 1080p, but a wider range of resolutions will be supported. Currently shadows and foliage are the biggest culprits of performance, and although I’ll be tuning things to run on my own modest machine at 60fps, I will need to experiment to see how less powerful computers tackle the game.
Sound will be divided into three buses, ‘Music’, ‘Voice’ and ‘Effects’, although I’m still deciding whether or not I want voices in the game. It certainly won’t be full voice acting, but sometimes a line or two can help set the scene.
Godot 3.1 came out yesterday, which is a pretty exciting release that I had been looking forward to since the latter months of last year. While I had initially set aside the morning with plans to import The Garden Path into the new engine, as it turns out very little needed doing. The new engine is a bit more picky when reading and processing code, so some of my clumsy programming raised some flags that it didn’t used to in 3.0. It’s encouarged me to do a bit of spring cleaning under the hood, which is always a good thing. It only took editing a few lines to get things up and running again as they were before without error.
I had saved myself from using the new engine until its full release in case any bugs rendered The Garden Path dead in its tracks, so it’s exciting to dive into all the new features for the first time. For the most part though, it seems like a refinement of what 3.0 brought to the table. 3.1 is, as the developers put it, a much more mature bit of kit, so it feels much more smooth, and more modern.
I’m unsure yet if any of the new features will be a boon to developing The Garden Path.
It’s a simple game, so simple features are all it really needs.
Thursday Report: Picking Things Up Where We Left Off
Some more ‘juice’ this week, and making a start on some more serious scripting that should be keeping me busy for the month of March.
Last week I was expressed that, regarding analogue controls, I also wanted to have both walking and running states for the character depending on how far the analogue stick is pushed. This isn’t necessary, but I thought it would a shame if the player couldn’t walk at a slower pace through their garden ā perhaps for a cinematic moment, or just while they think about what they want to do next.
The trouble I encountered last week was that I had the script running whenever the analogue was pushed further than a certain amount (say, if the analogue stick push is greater than 0.8, execute the running script). The trouble with this is that the script executed itself every 60th of second while the stick was pushed so far ā returning the run animation to its very first frame (the animation is being initialized sixty times a second), making it appear as though the character is stuck on one frame, but sliding around the map.
This was a bit of a head scratcher, but the solution was easy once I saw it ā check the current animation: if the player is already playing the ‘run’ animation, don’t play the animation again.
Then everything fell into place. It was just a case of tuning the speeds so that the character’s feet align roughly with the ground, so it doesn’t look like they’re walking on ice.
Holding Shift or either of the Triggers on the controller will have the character move at an even faster rate. I’m still undecided whether this should be put on a recharging limit. Speeding around the garden seems counter to the mood for the game, but I also don’t want to dictate how anyone should play.
Trouble is, you give players power and they tend to use it, even to the detriment of their enjoyment. I think I’ll just keep the speed in a reasonable place for now.
We’re at the early stages of inventory management. The player can now drop items and pick them back up. It’s not the cleanest piece of code written, but it successfully carries over the item’s icon, it’s name, and it’s quantity ā the bare minimum. The inventory will also now search for the first empty slot to fill upon doing so.
The animations are still baking, but picking up an item will have it find the top of the players head before lowering in ā representing the item being picked up.
The player will exchange items with characters too, and I’ll be soon needing a visual for this. Games famously obscure item transaction between characters, raising the camera just above elbow height as the two character lean in toward each other. It works ā player imagination is a powerful tool, and it saves the hassle of mapping every item to each character’s model’s.
Animal crossing has a cute solution where each character has a ‘holding out’ pose, as well as a pocketing animation. The item kind of floats as an icon between the two characters, eventually shrinking into the receiving character’s pocket. This works because each item is represented by its own icon, and all character share the same animations (and, obviously, we take the world of Animal Crossing with a grain of salt).
I’m considering an option that works similar to picking up items ā having the item appear above the characters head, moving over toward the player’s head, then lowering back down. It’s representative rather than literal, and I’ll be cautious with how well it really works, but I think it could be a fun compromise while I focus on more important things.
Lastly, I decide to begin dabbling in the world building script.
This came with a caveat that I thought I had an answer to, but turns out to be a more difficult question than anticipated: how big should the garden be?
This is obviously a question that I can’t answer at this stage. The only way I’ll really be able to know is by having a playable game, and seeing what ‘feels’ right.
It should feel expansive, but limited. I want players to feel like there’s a thrill to exploring, but that they’ll soon have it mapped roughly in their heads. To have curated the entire space should be a tremendous challenge, but most players should feel content that they have shaped a corner of the garden to their liking.
I’ve settled on not having the world entirely randomly generated, but compiled of different puzzle pieces (nostalgically named ‘acres’) that will be pre-baked. Each will have certain notable features, floor heights, rivers and so on, that will allow them to be put next to a series of other acres. Some will be more interesting than others, some will be rarer than other.
This way, while players who constantly reroll might experience some deja vu, I have a system that ensures a certain amount of reliability when a new world is generated, but also keeps things fresh.
An ‘acre’ will be approximately 9 screen sizes. A garden, for now, I’ve settled on being 36 of these acres.
This seems pretty big, and running from one side of the map to the other does take a fair bit of time, but currently the space is entirely empty.
As we all know, rooms feel so much bigger when all the furniture is removed.
The Garden Path was chosen as the featured image for Godot’s 10th beta snapshot this last weekend, which gave the game a good little boost of publicity, especially over on itch.io with a spike of new followers.
If you’re one of these new followers ā hi! Thanks for reading. Hopefully I’ll have some more exciting subjects for you soon.
Thursday Report: Aligning The Stars
This week has been mostly bug fixes and finicky programming on item ids, so I’ll be going through some little pieces that I’ve neglected to mention from the last couple of weeks.
The star menu is coming along nicely, transforming from a concept to something that’s actually starting to function and be fun to use. The main challenge is navigation. Stars won’t be in such a rigid grid as, say, an inventory screen, so the game needs to know which star it should move to when the player pushes one of the four directions ā up, down, left, right.
One possible solution was to assign each star up to four other stars that the player can move between. Which star the game should select if the player hits ‘up’ for example, would be predetermined and selected. This would ensure that things would feel as natural as possible, at least as attuned to my personal expectations. The first problem I immediately noted was that there could be well over 100 stars, so this would require a great deal of arduous work. I wouldn’t mind that, except the other, larger issue: flexibility. Unless I were to decide the entire constellation before hand, moving any star as an after-thought would mean not only having to re-input the directions for that star, but also all the stars around it. That could be exponentially time consuming.
So I wrote in something to select stars automatically, based on their relative location. The easy part is selected between two stars on a clean axis ā if there’s a star to the right, and you push right, you want to select that star. But what if the closest star to the right (scanning left to right) is also way, way up high? Then you’d probably rather select the star further to the right, but on the same horizontal plane. What if there’s two stars, equally distanced to the right, and equally horizontally apart, only one is above, the other is below?
Which star would you expect to be selected when moving left to right?
Well, in that case you might not get the one you want, but certain numeric thresholds can help disregard stars that are tangentially too far away.
As a bit of added ‘juice’ I implemented a simple three-layer background parallax to give the scene a real sense of depth. This was done by simply layering three different PNG star sheet sprites and assigning them different distances. The game finds the distance between the two stars selected, and multiplies that distance by 0.2, 0.5, and so on. The effect is quite satisfying!
I’m also considering looking into giving each individual star it’s own depth, to make certain unlockable stars feel more or less distant. But that opens up a whole new can of worms that I’m reluctant to tackle at the moment ā I think this works fine for now.
To the likely chagrin of some PC Gamers, I have decided that I will be developing The Garden Path with a gamepad first and foremost. I think this makes sense.
I recall when I first picked up Stardew Valley, which was first released on PC, I wanted nothing more than to kick back with a controller to play the game. I think it was a mistake that Stardew Valley was developed as a Mouse+Keyboard game first. Latter ports to console have a virtual mouse that’s clumsy at best, and weren’t well received.
That isn’t to say their aren’t benefits that come with a mouse. Everybody knows inventory menus are easy to navigate with a mouse, which is why I’m not striking out the possibility in the future, but it won’t be a priority.
My highly sophisticated control map reference.
Hollow Knight is still immensely popular on PC despite essentially requiring a gamepad. And while you would have to be some kind of masochist to attempt the game on a keyboard ā the option is still there for those who aren’t fortunate enough to have a gamepad of their own. The key point here is where you center the game’s control philosophy, not what can and can’t be done. The Garden Path is about comfort, and controllers are a more comfortable way to play for many people.
So I’ve made a start by restructuring the character’s movement as analogue rather than digital. Now you can move in all 360 directions, and adapt your speed based on how far you push the stick. It feels good, and it feels how it’s meant to be played. Digital inputs, like WASD, can still be made, but they are translated back into analogue absolutes.
Zooming is now also done with the right analogue stick, allowing much smoother and controlled camera movement. The combination of the two makes everything feel much more slick.
I’m still figuring a way to have the player perform a walking animation when the stick is pushed just slightly, but things aren’t quite working there yet.
Godot put out a call for game devs to submit footage of their game for their 2019 showreel which will be releasing soon. This gave me an excuse to clean up a few things in the game before submitting. I finally got round to filling out the player character’s ‘side’ view ā ie. giving the player their tools in their hands or on their back. Previously everything disappeared if the player turned.
I think the video does the game justice in it’s current state. I wanted the video to appeal to those unaware of the game, so while those who have been following me will have seen Augustus and Tellstone a hundred times, they’ve routinely been my most popular characters when shared on social media, so it makes sense to feature them.
I decided to feature a music piece I’d recently finished that I’m quite proud of, although I’m fairly certain all sounds are being replaced with a selected track for the whole showcase. I guess you never know.
So fingers crossed we get featured. I got an email back from Juan Linietsky, Godot’s lead developer, with some kind words ā that meant a great deal. The last showreel has over 100k views, and interest in the engine is only growing, so hopefully that’s a good number of fresh eyes that might be interested in learning more.
And of course, I’m looking forward to learning about more games being made in Godot myself!
Thursday Report: Feeling the Breeze
I’ve been focusing on smaller aspects of the game over the last couple of weeks. While a lot of ‘polish’ isn’t always necessary at such an early stage, I think it’s good for the proverbial soul ā when testing something that feels more polished it’s easier to get excited, and that helps with motivation on more arduous tasks.
I had been toying in my head for some time about rendering the foliage for the game’s trees leaf-by-leaf. Previously, foliage for any tree would be a single pre-rendered texture. This worked fine, and it meant texturing and shading was easily managed, but it also meant that foliage was what-you-see-is-what-you-get.
Instead, I thought perhaps I could import a single ’leaf’ texture, have that leaf be its own node, and then individually place each leaf on the tree in order to form the foliage. This way, each leaf can be altered by itself ā it’s colour changed, it’s position changed ā all on the fly.
I gave each leaf it’s own AnimationPlayer node, with a simple animation of the leaf rising and falling. Then, when launching the game, each leaf determines its own playback speed at random. This way, none of the leaves are in-sync, and they can react more naturally.
The result was transformative. Although subtle, having that soft sense of motion really loosens the game up. Things feel less like cardboard cut outs, and more like there’s a weight and an air to the environment.
Godot’s animation blending also helps give a sort of pseudo-physics impression to the trees, where I can fade in a more violent rustle of the leaf when the tree is reaction to being hit or chopped, for instance. Hopefully in the future I’ll be able to have all trees react to stronger wind, or even rainy weather.
My biggest concern was performance. Each layer of a tree’s foliage could have some three hundred leaf nodes, each tree could have three or four layers, and there could be dozens of trees on screen at any one time. Suddenly what would have been a a few nodes, is a few thousand nodes, all individually doing something more complex than those few nodes ever were to begin with.
And for the most part, that’s okay. Being new to programming, I’m often surprised just how fast computers actually are, and how many lines of code can be completed in a fraction of a second.
The Garden Path needn’t be a demanding game ā if my computer can run Witcher 3 without a hitch then it shouldn’t be struggling with a 2D gardening game ā so I’ll be hunting down drops in performance first and foremost. Having two or three trees on screen was okay, but when dropping in some twenty-or-so trees, performance began to cut in half very quickly.
As a compromise, I realized that it’s the foliage in the foreground that plays the biggest role in given the environment a sense of movement. As such, I decided to make static the very back layer of the foliage by making it a single texture as before, effectively cutting the number of nodes being generated by a third. The visual difference is negligible, especially when seeing how much smoother the game runs as a result. As I begin really filling out the scenes, I may also comprise the middle layer of a series of multiple leaf batches ā so instead of each leaf animating itself, maybe five or six move and react together. This would likely bring that layer’s node’s down from a few hundred to just a handful, while still giving that sense of motion underneath the first layer.
The trees have already been well received on social media, and will certainly help make the game look even more professional.
I also finally made a bit more progress on a global shadow system. Godot doesn’t yet have directional lighting (as in, a light coming from a single, global source, like the sun) for 2D games, because none of the items have a Z-height to draw a shadow from ā how long do you know a shadow will be if you don’t know how tall what’s casting it is? The lighting option for 2D games currently is omnidirectonal, it casts shadows all around the object. Which, while technically is what our sun does, the sun is so huge and far away that it visibly casts shadows in only one direction.
One solution, then, since the sun is so huge and far away, is to create a light source that’s ridiculously huge and very far away. It’s not elegant, but it kind of works, especially for a small scene. The available map in the Garden Path is going to be quite large, however, and the larger the map, the larger and more far away said light source would need to be. Otherwise, the light source would run out on one part of the map, like the dark side of the moon. The further away the light source, the less accurate the shadow casting becomes.
One idea was to create a dynamic polygon with a fading gradient that I could shape through code to react as though a shadow would. There’s a number of problems with this method. The first is that polygons, being vectors, are very clean lines, whereas shadows often bleed or soften depending on the light source. The second, is that shadows are the absence of light, not the presence of a shadow ā creating a shadow by drawing them means that multiple shadows begin to stack ā getting gradually darker the more shadows are stacked. That’s not how shadows work.
I realized, however, I could put the light source on the CanvasLayer. This is the layer that the user interface sits on ā it doesn’t move with the rest of the game world, the game world moves underneath it. As such, the game world can be as large as it needs to be, and the sun is sat among the menus and the clock, just off screen
This means, well, the ‘sun’ needn’t be quite so huge, or quite so far away.
Again, it’s not elegant, but I’d hate to see the game launching without it ā shadows give a real depth to any on-screen environment.
Thursday Report: Give a little, Get a little.
It was only natural I found myself working on dialogue and inventory at the same time. Both are data heavy, and both are about giving and receiving between nodes. As such, both became a little bit messyāāāwith a large number of signals and functions all passing along the same information to one another.
Should the player decide to equip a specific hat, for instance, a series of signals collect and submit information about the hat. Whatās the name of the hat? What does it look like? Does the player have more than one of the hat? What stats does the hat give the player? Is the hat even a hat at all?
Once this is received, it must be updated by asking the same questions to replace it. When wearing a hat, it must be taken off to wear a new hat. That way, the āslotā on the players head has all the right information, and so does the āslotā in the players bag where the hat is put away.
Dialogue, similarly, requires both the player and the character to exchange information. Who is the player talking to? Is it currently raining? Does the character like the player? What might the player say in response?
I had used JSON previously for tiered dialogue, but needed to do something more sophisticated with the database to introduce response and reply.
How does the game know if the conversation is ending or if this is when the player should be given the option to respond? Originally I thought I could tack it on to the same way the game knows what emotion the character should be feeling. Dialogue that ends with āsusā allows the game to know that the character should have their āsuspiciousā face swapped in, for instance. So perhaps I could tell it that should the dialogue end with ā*resā it should allow the player to respond.
For whatever reason, this caused a number of problems. A character can only show one emotion at a time, and layering further commands lead to the engine getting confused.
The current solution was more simple, add a new field to the JSONāāāāresponseāāāand the game simply checks whether or not this field is empty or not. If the content exists, it is displayed.
The next challenge was dialogue trees. As soon as you give the player more than one thing to say, you begin branching the possible dialogue the character responds with.
In my last game, Kingdom Ka, I was dealing with a small number of very branched out conversations. The first conversation in particular, had the player talking to the game itself in effort to convince the game they are human. I spent some days on this, providing as many conversation branches as possible to keep it feeling as natural and conversational, allowing what must be in the thousands of possible paths to the final conclusion.
Fortunately, while The Garden Path will feature many more conversations, there will be far fewer options. Kingdom Ka was a game about talking, The Garden Path will be (among everything else) a game about listening.
The player will always be presented with three options. The third will always be āGoodbyeā (because if the player wants to bail, who am I to stop them?). I had toyed with the other two options being simply a happy face, and a sad faceāāāa yes and a noāāāfor the sake of simplicity and manageability when it comes to possible translation.
But why pass on all the possible flavour that written text can give? If the player is asked a more philosophical question, a simple smiley face suddenly feels a bit redundant, or at least a bit too narrow.
The vast majority of these two options will be asking the character if they would like to talk, or asking if they have a task they would like fulfilled. Point of all this being, a system allowing a sprawling tree of dialogue simply isnāt necessary.
So, the response is a dictionary with three entries each holding an array with the following dataā what the text says, and what ātypeā the NPC should respond with. If the player wants to chat, the game can deliver any one of many different dialogues that are appropriate. If the player says āgoodbye!ā I could write hundreds of different goodbye messages if I wanted to, and the game will have the character say one at random. If a response is more specific, the ātypeā can be a unique identifier, so a unique reply is given.
Phew.
Iām feeling happy with it for now, but Iām excited Iām at a stage where I can theoretically begin writing content for the game and slotting it in without my trouble.
While Iām forcing myself to spend as little time on artwork on the game at this stage as possible, I fancied stepping back from coding and working on some visuals this week as a breather.
Fire was an interesting challenge. While the particle itself was fairly easy to set up (I drew a fiery spiral and had it emitting from a central point), fire burns a much less steady source of light than, say, a lamp. So, I set up a script that shifts the light in a random direction, and enlarges or shrinks it by a random factor after a certain amount of time has passed. This allows shadows to react, and gives it that flickering look thatās so cozy.
Lastly, I figured out how simple it was to mask sprites using Godot, which meant I could get stuck into making the UI for when the character is fishing.
Still early days, but hopefully Iāll have something for next week.
Whatās a game without fishing?
Thursday Report: Designing Progress
With the holidayās now long gone, itās time to get deep into some dev time. Despite needing to blow off the dust and getting the ball rolling again, Iāve made some pretty comfortable progress already this month.
The general roadmap for this game has been to spend 2018 learning Godot, (which was very successful) then spending 2019 building the gameās systems to allow a smooth 2020 of content creation. This, above all, is a game about content. Even if that content might reveal itself slowly, a sandbox game needs huge variety to keep the intrigue ticking.
All players have different interests, and while they might play the same game and enjoy it, their drive for what keeps them playing can be widely different. Many players will enjoy the act of designing and curating their garden, and even if there are no further objectives, if the tools compliment their creativity well enough, no further systems need to be in place.
However other players may need something moreāāānot everyone gets a thrill from design, and not everyone has the creativity to set their own goals. Sometimes, even if they do, they need that small push that rewards and inspires it.
So those are the two foundations for the gameāāāproviding fun tools for creativity, and providing a sense of progression.
Sweet, sweet statistics.
Progression often comes in two formsāāāhorizontal and vertical. Vertical progression is where your character simply becomes stronger, and objectively better than they were when they started. Horizontal, on the contray, is where the player obtains more options. For a classic exampleāāāa character might find a better sword that kills enemies quicker, or they might find an axe that has the same power as their current sword, but attacks in a new interesting way that the player might enjoy, or might be better against certain enemies, but worse against others. More options.
I believe that most games these days find a balance between the two. Vertical games suffer from āpower creepā, where (since the only way is up) things become so powerful that anything beneath it becomes trivial or obsolete. Horizontal games can obscure any feeling of progressionāāāthat player might unlock a hundred different unique weapons, but find they still like the first or second weapon they ever obtained the most.
Fortunately, āunlocksā tend to be a compelling reason to progress for many players regardless of genre. Take Mario Odyssey, a game infamous for its huge number of āmoonsā the player can achieve. While to begin with you will need to collect a certain number of moons to progress, many players will still enjoy collecting all remaining moons for nothing more than the glory of doing so. Iām the opposite. Any āunlockā that doesnāt effect the game itself is ājust a numberā and doesnāt engage me at all.
I hold the mantra that good design is when everything feels connected, and everything has a purpose. So why not give unlocks a purpose that effect the game in a meaningful way?
New star unlocked?
I came up with āconstellationsā as what I hope will be an essential part of urging players to continue playing, by giving them meaningful objectives. Stars will become unlocked by the player completing a huge variety of different tasks, both menial and obscure. One star, for instance, might be for catching 20 fish, another might be catching a rare fish that only comes out at a certain time.
Once the right stars are unlocked, they can be connected as constellations. If a correct constellation is drawn, is becomes activated, and provides a unique change to the garden while it is active. Say four or five āfishā related stars are connected, perhaps this increases the number of fish in the garden, or increases the speed at which fish go for the bait.
In this way, players both have a record of their accomplishments, but they can also utilise those accomplishments to actually benefit them in fun ways.
Elsewhere in the game, some players will get a kick out of finding clothing and cute matching outfits, or unlocking their favourite villagers to live in their perfectly designed garden. But why not also reward those that want to find the right gear that gives them the best stats for the task, or unlock the best combination of villagers with the right personality types to help unlock the most furniture types? The goal is to give each play style a chance to be gratifying, without being the ābestā way to play.
The ground-to-stars transition as-is.
I knew I wanted a transition to go from the game view to the stars. Being a top-down game, this makes things a little tricky. The imaginary camera would be pointing downward at the scene, and then would have to tilt upward toward the stars. This is a 3D motion, but in a 2D game this wouldnāt be possible without placing things on a 3D plane, or some smart shaders to bend the pixels in a convincing way.
What I did have on my side was speedāāāthe stars are ultimately a menu, so it should be snappy going in and ou. What looks good isnāt always what āfeelsā good, and while a slower transition might be more to behold, having to watch that transition for the 100th time might start feeling sluggish.
Speed helps with the illusion; the fewer frames, the more the brain fills in the gaps. The transition is made of a few moving parts, the camera, the gradient, the clouds, and the stars.
As the camera pans up on the Y axis (remember, itās not tilting, this is 2D), the gradient (which is just three colours: complete transparency, sky colour, night sky colour) pans down.
Me moving the gradient up and down with my mouse.
Somewhere midway, the clouds (which are panning down with the gradient) do a little split animation. The clouds are made of four cloud sprites moving at different speeds to give a slight sense of depth.
Cue choir.
And thatās it. Once the gradient is all the way down, itāll be the colour of the night sky, so we can just fade the stars in to form the scene for the menu.
I think itās a pretty neat effect, and it conveys what it needs to convey without playing around with perspective. Again, the speed obscures that. Iām not entirely happy with the rhythm, so to speak, it feels a touch robot where it could be smoother. But, for now, it works just fine for testing purposes.
Also implemented was a system to move the furnishing around. This was pretty simple, the effect is put on the object to make it translucent and blue for that āblueprintā look weāve come to expect, and then itās position is simply updated as itās moved. The object can also be cancelled to move back to where it was.
The tricky part is actually determining exactly what item the player wants to move. Each item has itās own zone that the player must be standing in for it to know the player might want to move it. But what if those zones are overlapping? Currently I have a system where the game finds all the items (yes, allāāāso weāll see how performance is once we have a sizable furnished garden) and then compares the distances from the center of each item to the center of the player.
The same system works for NPCs as well, so I killed two birds with one stone. No more having two characters yapping at you when you only wanted to talk to one.
After all, three is a crowd.
Follow me on Twitter.
>> Link to post.Thursday Report: JASON!
This week I spent some time looking into databases. Since thereās going to be a great deal of possible conversations through the game, it wouldnāt make sense to deal with this dialogue directly in the engine itself. Sorting through great numbers of copy in code probably isnāt even good for the soul.
External databases make things more manageableāāāI knew this much. My time creating or even using databases is virtually non-existent however, so I knew I had some learning to do.
I began looking into CSV, which seemed at first like the ideal format. It can be formatted and edited in most spreadsheet software, but exports to raw text that can be parsed by the editor.
Through my digging, however, I learnt about JSON, and how itās a popular choice for many modern systems and software. While JSON is built with Javascript in mind, itās wide-usage has made it viable on all kinds of different platforms, including Godot.
From what Iāve discovered, the beauty of JSON is also itās curse: JSON is simple by design. You add the label of a thing, and then you type what that thing is.
Taking the above example, if you were writing this out the hard way, you bet your butt that youāre typing out ātypeā and ānumberā for every single ātypeā and ānumberā that youāre dealing with.
Fortunately, since both CSV and JSON are just text, they can be converted between format without too much trouble. My plan, then, is to build everything in a spreadsheet, where I have a full and clear view of all the data, export to CSV, and then convert to JSON. Which means we go from this:
To this
And itās good to go.
I donāt know if this is the right way of doing things, but it seems to be working for now. As always, Iāll be keeping to the standard practice of keeping things as simple as possible, until anything breaks.
Speaking of which, I did spend an embarrassing amount of time this week trying to figure out why my arrays (the dialogue itself) wasnāt translating correctly between the JSON and the game when running. As it tturns out I had been using two different kinds of quotation mark the whole time, which systems donāt like much, no-sir. Who knew there was more than one kindāāāI certainly do now.
These arenāt the same thing, folks!
But, with that out the way, I now have a pretty effective way to assign each character their own unique database of dialogue that the engine will pick and hand the character on-the-fly. While travelers will each have their own unique dialogues, the vegetable villagers will have different personality āidentifiersā that they will be labelled with to help balance the workload.
Tellstone now speaking his mind.
Currently Iāve been able to randomise different dialogues, but Iām hoping to have Godot navigate the database to select dialogue based on many factors, including the weather, how āwarmā they feel toward the player, and pure chance.
Iāll eventually be extending databases for different items, tasks, and other such areas where there are too many items Iād be mad not to.
Unfortunately my previous plan to assign dialogue instructions by including capitalised, three letter terms to the end of each entry (such as āSHOā for āshockedā) has fallen a bit short. It works by itself, but combining different instructions seems to be giving strange results.
Still, this is the beginning of building a dialogue system where I can start establishing conversations where character really start to react and convey emotion, all in an environment thatās clean and structured.
After saying, āHey, itās my favourite gardener!ā
The player-response system is still being toyed with. I really like the philosophy behind using icons rather than text at this pointāāāa picture paints a thousands words, after all. However Iām still struggling with finding icons that donāt feel too gamey or interfacey. Itās hard to describe, but I donāt want the player to suddenly feel like theyāre navigating a phone rather than a world. So weāll see, something to come back to.
Throwing around ideas for conversational responses.
Lastly, Iāve been reworking the inventory system with my new wisdom derived from working on the equipment screen.
The result is something thatās almost functional, but still needs some work. Each slot is now itās own node that takes care of itself, rather than the inventory screen managing all the data. This makes it really easy to assign the quantities and item of each node.
Will six slots be enough?
The only thing left are the many items to begin filling those slots with.
My original placeholder was an apple, which I quickly scrapped after realizing that eating an apple in this game would, of course, be abominable.
Follow me on Twitter.
>> Link to post.Thursday Report: Play Me A Song, Jack
Iāve always believed music is a perfect way to start any project. Perhaps more than any other medium, it transports you somewhere immediately, and all you really need to do to understand it is listen. In that way, a sense of tone is immediately in place, and from their it really lends to the imagination. Music is abstract enough that it doesnāt dictate what should be built around it, while providing that framework of āmoodā right from the get-go.
As such, Iāve discovered that all my recent game projects Iāve started with music. Even projects I havenāt yet started, Iām sitting on music for.
Iāve found writing music to be maybe the only creative activity I find difficult to put down once starting. Something about piecing everything together, and finding something new among the twelve few notes there are, is very satisfying once the ball is rolling. As such, itās eaten up large portions of my spare time.
For this particular project, I began the very beginning of the gameāāāthe player entering the garden. āBreath of the Wildā became reknowned for its radical step away of traditional soundtracking, opting for greater stretches of silence, and subtle piano motifs to compliment the vast open world that was new to the franchise.
So I started with this fresh in my mindāāātrying to find very simple melodies to punctuate moments of pause. And while this seemed like the way forward, I couldnāt ignore that I would also need to convey something entirely differentāāāwork needing to be done, plants emerging, characters going on about their dayāāāa growing metropolis.
I started focusing more on arpeggiated chords for the piano, and to build that sense of adventure: rapid fire wind instruments (thereās surely a more accurate term for this).
All of sudden I had something that was showing an inkling of Sufjan Stevenās āOut Of Egypt, Into The Great Laugh Of Mankindā, the closing track to his 2005 release āIllinoisā.
I knew then immediately who I had to look toāāāSufjanās own inspiration for this sound, Steve Reich. While āMusic For 18 Musiciansā had always been a favourite record of mine, I had never really dived into his other prolific works. It wasnāt long before I knew I was exactly where I needed to be.
The foundation of Reichās music is using melody to create rhythm, where we typically see this process done the other way round. Pitched percussive instruments like xylophones, marimbas and even pianos, are layered many times to create a wall of sound and unusual rhythms compliment one another to create something vastly larger than the sum of its very simple parts. At least, thatās my uneducated assessment.
Although Iām unaware of any other game thatās taken this approach to its music, Iām cautious not to sound like a Steve Reich wannabe. And afterall, hours of heavily layered music might be distracting to a player that just wants to focus on the game.
So I went back to the silence that I started with, and the piano melodies, and thought there was still a place for both.
The result, hopefully, is a sound that begins quiet and gradually builds. Sometimes, at leastāāāmaybe not always. Iāve begun scripting a system that will hopefully delivery music more dynamically, playing music at key moments, but with the likelihood of music playing becoming ever more increasing.
So all of my compositions so far have had a focus on both quiet and more āfullā moments, they begin often with simple piano, that may or may not build into something more rhythmic, with a deep body of strings underneath to give it more of a broody, pensive quality.
Iām sitting on at least half a dozen music ideas, but Iāll share just of them today (although you might have heard the others in the background of the various videos Iāve been sharing on social media). This is what I had written to be the main theme of the gameāāāthe melody that will appear and reappear in various places throughout.
Whether or not this piece will be played while game is running, or whether this is more of an introductory piece, Iāve yet to decide. Maybe a little bit of bothāāāIām hoping to strip each and every song into its elements to re-purpose them in as many ways as possible.
Itās certainly not finished, but I think it gives a good sense of how Iāll be working with music in the game. While everything else I have so far feels more static, I was able to get this piece to move between three distinct sections, and Iām very proud of it for what it is.
Enjoy!
Expect slower Thursday Reports as we move into the holiday season, but Iāll be back at it as soon as I can for the new year.
Happy Holidays!
Follow me on Twitter.
>> Link to post.Thursday Report: The Right Tool For The Job
This week I focused on building and refining the action system in the game.
While I had something rudimentary in place to handle digging holes, talking to NPCs, and so on, building upon the system should give me a great platform to fill the game with potential interactions.
This time, the system first checks which tool the player is holding, and then looks to see if that tool is relevant to any contextual item that is around them. This goes on the theory than thereāll be fewer tools in the game that interactable object types. This might be jumping the gun at the moment, but I guess time will tell!
Certain actions will likely supersede everything elseāāāspeaking to an NPC, for instance, shouldnāt mean you have to put away anything youāre holding. So, if the playerās interaction bubble meets an NPCās, and they press the action button, a discussion will always take place. Iāve no doubt somewhere down the line this could cause frustration, where a character might be milling around a space where the player wants to dig. Iād certainly favour this over swapping out tools whenever a character is nearby.
That said, thereās no reason I couldnāt implement a toggle button where the tool always have priority.
This actually a terrible interaction bubble, squares might be better.
With the new system in place, Iāve begun rolling out more specific actions like, for instance, planting a seed in a hole dug by a trowel.
Iāve yet to sit down and figure out a system where a vast array of different types of items, seeds, flowers and so on, can all be introduced into the gameās framework without too much work on each typeset.
Not quite tall enough for golden goose eggs.
This leads me to the new equipment menu (or so Iām calling it for now) that I have been developing. Most games have a menu separate from their inventory menu that allows quicker access to certain items. This usually resides at the bottom of the screen, always visible, and items can be hot swapped much faster than trawling through any inventory screen.
There are a few principles Iām resting my laurels on in regards to the game and UI. The first is that I want the screen free of any UI whenever possible, and the second is that UI (when on-screen) should feel tied to the world itself.
A bar at the bottom of the screen wouldnāt feel tied to the world, since that space is dictated by the screen itself (the āscreenā doesnāt exist in the established world). Instead, a menu that appears around the character is more appropriate.
A definite downside to having no constant UI elements is that this usually means the UI is locked behind a button and an animation that only leads to slowing you down. While Iāve always been one for taking the slow road, I want to create something that feels very clean, and responsiveness is a big part of that. Some players may also wish to play as efficiently as possible, and thatās fine too.
Iām comfortable with how snappy the menu is behind a button, but Iām hoping to have the menu also tied to the number keys on the keyboard, and the right analogue stick on controllers, so tools are just a flick or a press away.
Iām undecided whether this menu should be tied to exclusively the tools the player owns, or if this is something the player can customize with whatever items from the inventory they wish. Currently I have the seeds tied to the fifth slot for the sake of demonstration.
A few small animations and sounds tie the whole package together.
Many of you have probably also noticed the addition of the playerās tools being appended to the backpack itself. Iām surprised this isnāt something that occurred to me even after playing some hours of āBreath of the Wildā. Itās an addition that just gives the world a little bit more weight, especially as more and more tools get added. It also helps visualize swapping out different tools, as theyāll appear and disappear from the playerās back.
Maybe most importantly, itāll be a chance to flaunt unique and rare tools that can be obtained throughout the game. Of course, those that arenāt so hot on the āburdened gardenerā look should be able to switch it all off if they choose to.
So stylish!
Iāve toyed with the idea for a unique visual gimmick being ridiculously large backpacks, but Iām not sure Iām ready to make that jump yet.
Follow me on Twitter.
>> Link to post.Thursday Report: The Race
One of the scariest aspects as an artist on large-scale projects is competing against oneās own artist capabilities. Itās a raceāāāthe longer a project takes, the better an artist youāll probably be by the finish line. That is, of course, if you are practicing and creating and improving in the meantime (which during a project, you almost certainly are).
I have no idea if this is avoidable. A year ago I released āCrossing to the Cold Valleyāāāāa project which I had initially created entirely in about 21 days as a university project back in spring 2016. It was the first time I had really committed to environmental illustrations; I adopted a quick brush-stroke style that seem to generate backgrounds very quickly, and I remember being very happy with how they looked.
When deciding to release the game to the public a year later, the job was simple, I had to upscale all the 720p artwork (I have no idea why I built the game in 720p) to be 1080p and call it a day. I soon realized I would need to touch up areas with the brush tool, and after just a few minutes on my first image I realized: āOh, Iām better at this nowā.
Suddenly I knew in my gut that a weekās work was actually going to take me until Christmas.
2016 v. 2017
Over those months, something even worse happenedāāāthe last improved illustrations were looking much stronger than my first attempts. All of a sudden, I wasnāt correcting 2016-me, I was correcting 4-weeks-ago-me. Thatās even more work to tackle.
āHalf of art is knowing when to stopāāāājust about everyone is quoted as saying something along these lines online, but thatās probably because it rings true. The answer is, of course, to set a deadline and stick to it. While we can look back as single pieces as relics of a past, old artwork for a larger project, while āfinishedā is part of a much bigger piece that isnāt. The challenge is a compromise.
Iām guilty of being human: social media has been invaluable in sharing with me inspirational artworks that teach and guide what I do, but I do get jealous. Not necessarily jealous of someoneās ability, but more often a stylistic decision theyāve made in a project that looks stunning. I often find myself thinking āWhat if my game looked like that?ā.
And itās liberating to know that Iāve made things arenāt yet set in stone, the style of the game could change. That said, itās important to remind myself to see value in my own style and my own perspective. Always bring yourself to something if you can.
So, Iāll go back to some placeholder artwork and improve on it. I pushed out a large amount of art, before and during the summer this year, because itās an easy way to build engagement, and itās something I know I can do already. And sure, itās nice to take a break from coding and development, but I do run the risk of pushing out artwork that will only need to be replaced a month or two down the line as my understanding of lighting, shading, shapes and colour change.
That said, practice is practice, and thereās no shame in wanting a project to look as good as it can be. Right now Iām going to be slowing down on artwork, so that as the game mechanics develop Iāll have (hopefully) grown into a stronger artist from my other illustration experience over time.
Iām always flattered whenever anyone comments kindly on the look of the game, because, for the most part, the sprites themselves are very rough still. But so much more than the raw artwork contributes to the look of a game. Itās important to experiment in taking those rough sprites as far they can go, so that when more refined sprites come through, itās the full package.
I added subtle eye movements to Augustus, and it contributes a great deal of life and character to the game experience. Suddenly you read more into his character, he seems more anxious and observational, rather than having his eyes focused dead on a single, dull point. Itās a simple loop, but it goes a long way.
In a similar vein, I had a request a couple weeks ago to talk about my dynamic shadows, and felt it made sense since itās a feature thatās often commented on across social media. Truth is, itās built right into Godot, and requires very little work to get working, but it certainly gives the characters a sense of weight and place.
Godot has a āLight2Dā node as-standard. This is essentially a bunch of preset features for how the game should treat a certain texture.
The texture itself is just a radial gradient, with a bright yellow tone in the center, fading out gradually to full transparency.
Godot then runs this as the blend mode āAddā. Blend modes, for anyone that doesnāt know, are fairly standardized across many pieces of software dealing with visuals. The gist is that it decides how a layer visually effects the layer beneath it. āAddā lightens the layer beneath it according to the brightness of the layer above itāāāso with the texture above, the center would be lighter than itās surroundings, gradually fading away from the center. Thatās exactly how a light should be.
Godot also has a āLightOcculder2Dā node. This is a two-dimensional polygon that, as the light emits and hits it, will remove the light texture in that direction to create the illusion of a shadow.
Itās essentially an invisible opaque wall, but it should be drawn to reflect the character that is drawing the shadow. Larger characters would have larger light occluders, for example.
And youāre ready to go. You toggle shadows and so long as the light occluder is within the light texture, it will draw a shadow. The shadow will continue until it reaches the end of the light texture.
I would love to have a global lighting system, for sunlight or moonlight, but this isnāt currently so easy in Godot. The Light2D shadows rely on the shadow extending as far as the light itself . The sun lasts as far as the horizon, so it would need additional data to figure out how long to cast the shadow for. One trick is to make an absolutely huge Light2D that covers the entire game, but this is pretty taxing and unpredictable. Iām still looking for other solutions. I would love to convey light breaking through foliage somehow.
The last thing I will mention is āItem Cull Maskā. In Godot, you assign each node to a different, labeled layer. This helps the engine, but also me, to know whatās the ground, whatās the interface, whatās an NPC and so on. By ticking on only āenvā, it means the shadow only casts itself along the ground, and not through items or characters, resulting in things looking unintentionally translucent.
Iām hoping to focus myself and make strides in the gameās mechanics themselves as top priority over the weeks leading up to Christmas.
Iāll be sharing as much as I can on the development along the way.
Follow me on Twitter.
>> Link to post.