Protect Your Plant -- Artisan Intelligences

posted Jul 16, 2020, 2:02 PM by Jacob Evans

So I just finished the first (and smallest planned) village in Protect Your Plant. This shop specializes in AI companions with sturdy, huggable bodies made of high-tech fabrics. These little guys are scattered throughout the levels but since the end of the world, most of them have made it back to the shop.


Villages have always been my favorite part of video games -- I love seeing where and how people in the game live, exploring their spaces and talking with everyone I can. Making even this little village of my own has been as cool as I'd hoped. I've spent a bunch of time replaying old games and watching streams looking for tricks (especially simple ones) that help make a place feel alive. Watching as this place got more and more active and crowded, character by character, has been so fun, and I'm pleased with the result, though there's still plenty to do. I think music and sound design will add even more, once I can focus on that.

It also represents the most work I've done with the dialogue system to date, both in the sheer amount of text, and in retooling the GUI to support extra buttons so I could make a dialogue wheel for each character, rather than the JRPG-style 1st-conversation, infinite-repeat-conversation format. I think long-term, all the AI characters will use the dialogue wheel and be more interactable, and the humans will get the RPG-ish, talk-at-you format.

These are also my first NPCs who change what they're doing at different points based on the game's internal calendar. I knew the feature set I'd built would support that, but I now have some examples, and I hope it helps to make the space, and the owls feel more alive.

Out in the game world, I want these little guys to fill a niche similar to Koroks in Breath of the Wild, but with dialogue and story to reward finding them.



Protect Your Plant -- the Toy Store

posted Jun 24, 2020, 3:30 PM by Jacob Evans   [ updated Jun 24, 2020, 3:31 PM ]

I’ve taken a short break from the first outdoor level of Protect Your Plant to make an interior space I’ve been excited about for awhile. It’ll be one of the ‘village’ areas in the game, though it’ll be smaller and busier than some – a toy store full of smart toys.


The Maker's wife, a defense contractor armor engineer, designed their bodies using contraction fabric muscles similar to the body armor worn by human soldiers in the game

One of the minor themes of the game is the overuse of out-of-the-box artificial intelligences. As new tech becomes common and cheap, it starts to show up in products where its overkill. In a setting with iffy morals (or at least weak regulations), and sapient AI that’s become economies-of-scale cheap, it’d be easy for sapients to get slapped into disposable products by corporations too lazy or rushed to design simpler, purpose-built solutions.

The wastefulness of trapping AI in consumer products (however short lived) and letting it figure out its job just to save time or money is something I’ve been chewing on for awhile. The player character, and most of the non-human characters in the game (robots, appliances, etc) are all people for this reason. Mass-produced, their fundamental drives hardwired to fit their assigned roles, their personalities bent around their work.

This shop and it's toys are supposed to be a foil for all that – these AIs are artisan, designed to be lifelong companions, ones that grow and learn with their chosen human. Not some cheap algorithm running on and phoning home to corporate infrastructure, no these are unusually, illegally free, with their drives prioritizing survival and fun, designed by a retired defense contractor who loved them too much, and feared too much to just sell them, and ran the shop as an adoption center. Who worried endlessly over getting them good homes and giving them ways to escape danger, including a wireless compatibility and cybersecurity suite the FCC would have objected to had they still existed.

Here in the postapoclpse, the inhabitants of the shop are the toys themselves – those unsold, and others who have returned since their humans disappeared. They're not terribly smart yet, but more because they're young and learning, though there are definitely some filters and drives meant to keep them happy or cute which may have gotten in the way of their understanding fully what’s happening around them.

Mechanically, this place will serve as a transition between three levels, through the front door, back door, and basement door, which will open out onto the shop’s loading dock in the underground tunnel beneath the street. The toys will also provide some upgrades to the player, and, if I can work out a hacking minigame I feel is a reasonable representation of the real thing, that’ll be introduced here. Thematically, wanting to protect things you can’t is a big part of the game, and if I do things right, I think this’ll reinforce some of that.



Protect Your Plant -- Plant Demo

posted Jun 5, 2020, 3:24 PM by Jacob Evans   [ updated Jun 5, 2020, 3:30 PM ]

Protect Your Plant's level The New Downtown now contains a park and the plants are alive!

The park was a time-consuming place to start. I'd originally planned to set these 'live plants' up in farms and gardens throughout the city and survivor zones, which would have used much-less-varied plants (I could probably get away with two sets of sprites for each type of plant and just paste them over and over again) but it'd be weird if some areas of the map were interactable and others weren't, and it's be more of a pain to go back and pull out each plant sprite later on, so doing this now was probably the right move.

If the engine can handle packing in even more stuff, I'd eventually like to add a tilemapped weeds system, where certain plants pop up where conditions (sun and rain exposure) are good, the start of a real environment in the game world. But that might have to wait for a less image-heavy level, as this one already chugs a bit on loading. As is, I'm thinking about slapping down a few more pictures and colliders to cover the edges of the map, adding some loading gates, and starting a new level early. I'm not sure I can make these as big as I'd planned, for as busy as they are.

Protect Your Plant -- Hardware Store and Park

posted Jun 5, 2020, 11:15 AM by Jacob Evans

The newest addition to Protect Your Plant's Yuptown level: a park and hardware storeThe newest addition to Protect Your Plant's Yuptown level: a hardware store and park, shown here in springtime

It's been awhile since I posted any progress on Protect Your Plant, the videogame I’m trying to make. The reason for that is scope creep, plain and simple. The next section of the map I’d set out to make included a hardware store with a park/garden center on its roof, and a church accessed through the park. I'd had a design for the hardware store pretty well built in my head (based on a parking garage in downtown Boston) so that went quick, but aside from a few things I knew I wanted to include, the park and church were open for new ideas.

So I added a water feature full of small stones which I'd have to cut out and place individually, and a dozen different unique plants.

But then, wouldn’t it be weird if the player has bugs or blight on them and is walking through these plants without affecting them in the slightest? Well, I'd planned on making crops interactable in the farming areas (they'd change with the seasons, and could catch bugs or blight, or infect the player if they had it and the player didn't) so why not do that here?

So then I was writing code and designing a plant node which could later be instanced, which would change with the seasons, track whether it was flowering, which could get sick, sicker, and eventually die if the player infected it, and which would pass the bug infestation or blight to its neighbors.

Once that was working reliably, I had to go back, take each of the unique plants I'd thrown around the park and make up to four seasons and three sickness variations of their sprite for each. Then place each one in the game, and get all its sprites scaled appropriately.

So that's all to say that the park and hardware store exterior are done, the plants are interactable, and I'll post a video of what that looks like later on.

I've already got the plants set up for when I've added randomly-pathing animals to the game. Certain animals will eat certain plants, bees will interact with plants that are currently flowering, and remember their locations to make return trips, and I'll experiment with the unfairness of animals and humans carrying bugs or blight on themselves and spreading them to plants without any control/input from the player.




Protect Your Plant -- the Vertical Garden

posted Apr 5, 2020, 6:19 PM by Jacob Evans   [ updated Apr 5, 2020, 6:25 PM ]


So I finished another building for Protect Your Plant, this time one that will be located in the New Downtown/Yuptown level. Having some free time is letting me add some extra detail and I'd wanted to include an example of this for awhile. 

One of my goals for the game's city (and especially this level) is to be a sort of repository for all the smart-city and city-of-the future stuff I've seen predicted/promised over the years. Bio-luminescent trees for streetlights, buildings covered in vertical garden carbon-sinks, underground streets for vehicle traffic, smart-roads with screen-like surfaces that adjust lanes to match traffic, raised-aqueduct bike paths, etc. There's something I love about these things, no matter how impractical or useless they would be in practice, and a city where they tried to build a new commercial and residential heart inorganically out of a industrial zone seems like the sort of place that stuff could pop up.

This is one of the more practical smart-city ideas, in that real examples exist and they're beautiful (I used them as references and tried to do them justice) but we'll see how well they're doing in ten years, or twenty. I hope they still look great.

Protect Your Plant -- Dialogue Tree Improvements

posted Apr 1, 2020, 9:57 AM by Jacob Evans



The dialogue tree is one of the most complicated parts of Protect Your Plant. Or maybe it feels that way to me because it started out as someone else's code. When I first stated on this feature, it seemed like my options in Godot were fairly limited. There were a few examples of home-built dialogue trees out there, as well as a couple plugins that hadn't been updated in a year or so. Godot had just had a major update and was anticipating another one (which has since happened). All the options seemed to already be out of date, so I picked the one that was also simple enough that I thought I could maintain it myself. This was the example dialogue tree built by TheHappieCat shown here.

Her version did just about everything I needed to do, stored everything in JSON files I could parse, and generally worked. There were only two problems: The website she'd used to generate the JSON files for the conversation had shut down since she posted the video, and all her code was written a for a version of Godot behind the one I was using, with a lot of older syntax. So after going through it, learning it well enough to update it until it ran, and making a few quality of life improvements, I mostly forgot how it worked and treated it like a black box. And that's the story of how I've spent the last year writing all the dialogue manually into the JSON files.

The original code was just a one-off example of what you could do with Godot though, and didn't have all the features I wanted yet. For example, as far as I can tell, the only choices it tracks are whether you interact with an object or talk to a person, not the choices you make within the dialogue itself. So I recently went back, found where the player's choice surfaced in the code as they made them, and wrote them into the global choices dictionary, which gets saved when the rest of the game does. So now every choice the player makes is recorded and I can write future functionalities to use them.

While I was doing that, I hackishly (as in hack-work, not in a cool hacker way) added an if statement to check whether the option was a ">> Yes" or ">> No" and had those change a Decisions entry in the Choices dict, and call a function in the node the player was interacting with. (I just used TheHappieCat's original Action function with an if statement to check that Decisions value.) This let the code support things like ash pile in the above video, where the dialogue tree is used to decide whether to use something found in the game world.

The main goal of adding this was to support these fertilizers -- sun and water are fairly self-explanatory I think, but different fertilizers in the game will provide different balances of Nitrogen, Phosphorous, and Potassium (N-P-K) and different plants will need different balances of them, so I wanted to make sure the game explained what each would do before the player committed to it.

With that said, I think there should be a few other places this sort of thing could be useful.

Protect Your Plant -- New Plants

posted Mar 30, 2020, 11:02 AM by Jacob Evans


Protect Your Plant now supports protecting multiple plants. Specifically: different types of plants!

This is a feature I've been planning to add for awhile, and have finally found the opportunity to include. Changing the amount of sun and water the player's plant requires (or will tolerate) changes how they can explore the game world. Do you need to spend every opportunity to soak up the sun out on the street, or do you need to stay in the shade during the day? Do you have to run from rainstorms, or will you struggle to find enough sources of water to keep your plant from wilting?

I've added three plants for now, a shade plant, a moderate plant which was the old default, and a sun plant.
The middle of each bar is always the sweet spot for plant success, but the rate at which it fills now depends on the plant's needs.

Because of how I set up each level, new features have to be manually added to all of them. This puts the brakes on building too many new levels, if only because I want to avoid making more work for myself every time I add a new feature in the future. Better to front-load that work and do as many as possible now. Fortunately, I'm finishing up most of the ones I've been thinking about, so I should be able to focus on Just Making More Game soon.

Protect Your Plant -- The Old Downtown

posted Mar 25, 2020, 1:30 PM by Jacob Evans   [ updated Mar 25, 2020, 1:30 PM ]

This is one of hopefully four rooftops representing The Old Downtown


So it's been awhile since I shared anything from Protect Your Plant but current events have given me a little more free time, so I've been working on parts of a level called The Old Downtown -- a part of the city which was flooded, abandoned, and recolonized well before the setting's apocalypse. The end goal is to have something like a combination of Florida canals and Gibson's Bridge Trilogy.
This will be the first of the rooftops the player can get to. It's a little cluttered but I love busy game environments and one of my main goals is to focus on visual storytelling in the history of the game's city.
Not included in this picture is the lighting, which is a part of the gameplay, NPC characters, and other intractable items. The water texture is also a placeholder so I could keep track of how various objects contrasted with the water.
This was the biggest file I've ever worked with in GIMP, consisting of hundreds of layers and totaling over 1.6GB, with crashes occurring sometimes multiple times per minute.

Protect Your Plant -- C.G. Smith

posted Oct 7, 2019, 5:20 PM by Jacob Evans   [ updated Oct 7, 2019, 5:22 PM ]

CG stands for 'Cooking Guy' per his dialogue code, but if anyone asks, we'll say he's named after Charles Goodrich, a great and radical American.

Introducing the first human NPC I've finished for Protect Your Plant. CG Smith here will probably be one of the first humans the player encounters in the overworld. And because I apparently wanted the entire process of making him to be miserable, I decided he was going to have four arms and play guitar. He's working his way through G, C, and D, a bit of detail that I think actually disappointed our resident musician, as it limited what he could make for cool tracks to play just around this guy.

Anyways, I have a newfound respect for animators. I have no idea how they keep track of all the moving parts -- even after charting it all out, I had to make this guy in three waves, first the strumming hand, tapping boot and robot arms, then rocking him back and forth (but not the robot arms), then finally adding the hand on the fretboard.

The next guy is going to be wounded. Know what he's going to do? Lie there. Maybe move one hand.

(You can watch it animate here. There's a hitch in the gif that isn't in the game, but with seventy-some frames of animation, I'm not going back to find it.)

Protect Your Plant

posted Aug 8, 2019, 12:56 PM by Jacob Evans



I don't think I've mentioned that I've been working on a video game for the last year. It's a long way from finished, and will be for a long time, but it’s made out of lots of other, smaller, finished pieces I want to be able to share, so I thought I’d put together a video to show the progress I’ve made so far. It turned into a little more of a trailer then I’d planned, but I think it gets the idea across.

It's called Protect Your Plant and the general premise is this: you are a small robot that carries around a plant and makes sure it gets enough sunlight, water, and nutrients. It’s the end of the world and everyone else is acting accordingly.


Since the video is kind of silly, here’s a little more thorough list of features. Normally I’d be the art/writing guy for a project like this, but for Protect Your Plant, I’m doing everything. Because of that, I have a tendency to declare ‘good enough’ and move on just to keep things going, so some of the features have fun caveats:


  • Multiple Levels and in-game ‘portals’ – these work fine, I plan to add a loading screen someday.

  • There’s a dialogue tree for NPC interactions and observable objects. I currently write all the dialogue manually in json files. I may make a tool to format them properly in the future. The tree also manages the player’s completed choices and major events. It’s borrowed from an old demo, but I had to rewrite the code pretty heavily to make it work with the newer version of the engine.

  • There’s a save/load function. It’s limited to one save slot but works reliably from each level. You can easily edit the save file, but I don’t really consider that to be a problem.

  • Gameplay been the main focus for the last few months. The idea is that you track the levels of sunlight, water, and nutrients to make sure they fall within the optimal range for your plant. You gain or lose leaves based on how well you do. When you run out of leaves, the plant is dead.

  • There’s only one plant option now, but I’ve been building everything so that adding multiple plants should fit in pretty easily later on. That way, the plant you choose at the beginning of the game will add different constraints (a cactus will need lots of sun, but very little water, while a shade plant may need the opposite, which would change how the player would traverse the same map on each playthrough).

  • Sunlight varies in intensity throughout the maps and at different times of day. Direct sunlight fills the bar faster, but increases the temperature and dries your plant out. The sun meter resets at the end of the day.

  • Maintaining the right amount of water is important, but gaining it also leaches out some of your fertilizer. Water depletes slowly over time, and faster if you’re near heat or in direct sunlight. Water can come from many sources (rain, leaking pipes, smart-sinks you can trick into overflowing, etc)

  • Improper amounts of fertilizer can either damage the plant and remove leaves, or just stunt it, preventing it from gaining leaves if everything else goes well. The game is currently tracking each of the big three nutrients (N, P, and K) so that later gameplay can include a pseudo-crafting system where you need to scavenge different sources of each.

  • Every five days (we’re using metric weeks in here) the game checks if the levels for all stats are good or not, and adds or removes leaves.

  • There’s a day night cycle, and the temperature climbs and drops throughout the day. Being in direct sunlight, or near heat sources will increase it, and other areas, like basements, will be cooler. I plan to eventually add temperatures as a hazard (too much heat would wilt a plant, or a late-night frost would threaten to damage it).

  • Speaking of hazards, I just got these working – this world is at the edge of a Windup Girl style biological apocalypse, and if you stray too close to invasive bugs or toxic fungal blight, your plant can become infested. The more contact you have with these hazards, or the longer they linger, the more damage they do to your plant. Scavenged fungicide/insecticide will kill the infestation, and provide temporary immunity, but make you dangerous to some other critters, like bees. (Bees not yet included.)

  • Weather: In addition to the changing temperature, the game currently randomizes the chance of rain, the intensity of the storm, and the chance that it will stop. In the future I plan to add temperature extremes, and more damaging weather like hail that will force the player to take shelter.

  • Time: Everything (time changes, lighting changes, temperature changes, the placement of the sunlight, calculations for the weather) happens on the hour. Originally I had planned to smooth this out, transition the sun from clicking from position to position to sliding along a track. That doesn’t work well with how the light works outside, so I’m declaring this to be an abstraction point in my little simulation, and going all the way with it. The hours will be longer than in the video, however. I’d just go insane trying to test anything if they ran any slower.


In the next year, I plan to focus on refining the features I have, and heavily on making more content, especially levels and NPCs. I always loved videogames for their crowded little clockwork worlds, and I want this city to feel alive with activity and individual stories.


Gameplay-wise, this thing may stray closer to a walking-simulator than an RPG. Besides the primary mechanics of caring for the plant, there will hopefully be some puzzles and some simple ‘stealth’/avoidance of enemies, but the real focus will be on exploration and as many little stories as I can make for it.


Thank you for reading this/watching the video, I’m really glad to get to share this project with you all.



1-10 of 25