Plant Placer Release!


Yahallo! I've just released Plant Placer! I'm gonna talk about it for a bit.

I technically made this game in about a workweek but I did most of the game design a long time ago, and just quickly rewrote all the logic for it. It's nothing terribly complicated, and it was a good excuse to get into Godot's tilemaplayers (even if history indicates that godot 5 is gonna replace them with something new).


There's a decent amount of complexity to how everything is drawn, or at least more than you might expect. Grass and water are their own dual-grid layers (good explanation video by jess::codes [that I more or less followed] popped up recently here, originally popularized by this talk [at least that's when I heard of it]). The Stålberg talk was what inspired me originally to make the game a few years ago, but I went for higher-fidelity 3d art and it ended up being too much of a time sink. I'm not really a serious artist, at least not primarily—I've learned to make do with pixels. I consider it a style more than a crutch but I know everyone's opinion on that varies.

The dual grid textures look like this:

     

Grass and water have a screen-space texture splatted onto them for more variation. This idea is stolen straight from jess::codes. I've implemented it as such (although I think she has a video where she does a better job of it):

shader_type canvas_item; 
uniform sampler2D tex: repeat_enable, filter_nearest; 
uniform float wobble = 0.0;  
void fragment() { 
     vec2 coords = SCREEN_UV / SCREEN_PIXEL_SIZE / 32.; 
     coords.y += sin(TIME) * wobble / 32.; 
     COLOR.rgb = texture(tex, coords).rgb;
} 

`wobble` is there so the water can oscillate up and down a little. `32.` is the size of the texture, hardcoded bc w/e. You'll notice if you move the camera it doesn't track right, this could be fixed by a uniform that updates with the camera's position every frame but idc I think it's cute that it doesn't quite look right.


Props and their variations are all in a bigger sheet:

You'll notice props are bigger than the grid size 8x8—this allows them to peek out over the edges a little. Obviously this would be super expensive/illegal on the consoles the art style draws from, but it's current year じゃんよ. The palette is also oversize, I wasn't counting but it's 20~25 colors in total (plus I never reskinned the godot buttons).

Paths are also their own layer, but it's just 12 variations of the same 6x6px tile. Everything else is a prop that stands on top of the grass/water.


Internally, the tilemap is set up as below:

The `LogicalLayer` does everything real, it's just invisible. The other layers are set up to place graphical assets whatever you tell them to. Most of the gfx logic is a series of ugly lookup tables for the dual-grids (although you might be able to make godot terrain do it as well, I didn't try because godot terrain and I don't historically get along) and the props.


The actual scoring checks are what you'd probably expect, not gonna go into it here. The path loop detection involves some creative floodfilling but it's nothing crazy. I tried to balance it so that all the tiles are worth about as much as each other in isolation, but using the more complicated tiles effectively rewards you more—not sure how well I did, but that was the plan.


I'm proud of the music system in the game, although I'm away from home right now so the actual music is a lot more thrown-together than I'd like (did you know Musescore had an .ogg export? me neither before this morning!). It's violin1/2/viola/cello/bass separated into 5 different layers that are faded in as you fill out a level, the order they appear in randomized each time you start. There's technically 4! = 24  different options, and how long each section plays is arbitrary, so there's like theoretically infinite music in it, but it's also just a ~20 second loop so I wouldn't get too excited. I may hotswap the track later on—I have another one sitting on my home hard drive that I think works a lot better, but I wanted to put the game out now.  Regardless I think the system is really cool and shoutout godot's `AudioStreamSynchronized`. All of godot's aleatoric music tools need some more work imo but they're usable if you're willing to work around them a little.


The rest is basically boilerplate. I've never loved having to make a main menu/level select/options screen for every game I make, in the future I may try to make either an addon or just a folder of files that streamline the process, along with something that makes saving/loading easier. Probably a third of the time I spent was just on menu screens, scene changing, and load logic, and none of that is particularly, well, fun. I already have a nice `helpers.gd` I use for stuff like Freya Holmer's decay, t3ll8r's 2nd order interpolation, etc., I don't see an issue with a few more. (Godot is great but there's a lot of small functions I tend to want to have at hand for almost every project I attempt, but that probably don't qualify for inclusion within the engine [do we really need 3 different lerp flavors when tweens are right there? I prefer working with them—I think it's a lot more gamedev-ic to work with live data {position, velocity} over states {animating, not animating}, but they're not really essential functions at all].)


I think that's all I have to say right now. Hope you enjoy plant placer! It's a couple hours of gameplay max but I think it's a fun couple hours.

Files

plant_placer.zip (win) 28 MB
10 hours ago

Get Plant Placer

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.