Fruits & Tails: an artsy hexagonal five-in-a-row game (with cute squirrels)

My girlfriend Zuzka (UX/UI and graphics designer) and I (programmer) have been working on a little game for the past year in our spare time. It’s written in Zig and playable here (bring a friend): https://fruitsandtails.fghj.cz/

The source code is available here: spiffyk/FruitsAndTails: Five-in-a-row with cute squirrels! - Codeberg.org
Please note that while the code is free, the assets are proprietary and for personal use only :slightly_smiling_face:

I’ve also written a little introductory blog post and plan on writing a little more about the journey, as well as releasing the source code for the world to see.

Let us know what you think and feel free to AMA :slight_smile:

Edit 1: Added a link to Zuzka’s site

Edit 2: Added source code link

31 Likes

Cannot say anything about the code, but hand-drawn style is awesome!

3 Likes

Thanks! I’m of course passing all art-related comments onto Zuzka :orange_heart:

Sorry about the code not being available yet, need to figure out asset distribution first.

2 Likes

It looks and plays great, congrats to you both!
I look forward to the future blog posts.

I have actually also been trying (and failing) to get my artistically-inclined partner to make a game with me! :slight_smile:

and I’ve already been cooking up an algorithmic opponent (you know, AI, but the good kind) that is already quite competent at playing the game

What’s your plan here, for making an AI that’s “good, but not too good”?
It feels like I would want to make it “perfect”, and then introduce “defects” in its thinking, but maybe just having it use some basic heuristics would actually feel more fun to play against.

I read recently this book “AI for Games”, and it had a good anecdote about how players project all sorts of complex behaviours onto the AI for the ghosts in Pacman, when actually each ghost’s AI is like a single line of code.

4 Likes

This is exactly my line of thought, mainly because the “defects” can then be parameterized, and then you can have difficulty levels. I’m thinking having a small random chance wherein the bot just “forgets” some of the scoring it normally does in order to find the best move would do the trick.

Funny, and very plausible! In fact, when I had the initial version of the AI down, it was like 69 lines of code, but was already pretty competent – my first reaction when playing against it was “I have created a monster” :sweat_smile:

Side note: it also puts into perspective how LLMs can fool people into thinking that they are actual personalities.

1 Like

Heh, yeah, I’m super lucky! Zuzka is actually in gamedev professioally, and as such has much more experience in it than I do (I’m an embedded sw engineer by trade right now). The bigger problem was coming up with something small enough in scope so that we could actually finish it. :slight_smile:

3 Likes

Hi! So I finally got around to sorting out the asset situation and the game’s source code is now available at Codeberg: spiffyk/FruitsAndTails: Five-in-a-row with cute squirrels! - Codeberg.org

3 Likes

How’s the native version coming?

1 Like

Hah, did not have much time to spend on it. I did do some work on the bus from Nürnberg back to Prague, but I’m finding SDL’s Renderer API, which I originally wanted to use, kind of meh, so I’m thinking about switching to something else. It will happen eventually, though.

I’m actually tempted to just go raw OpenGL ES, which I could then also port back into the WebAssembly version and throw in some subtle shader effects and stuff. Maybe. I still need to decide on what I actually feel like doing so that I don’t burn myself out on it :slightly_smiling_face:

2 Likes

Hello! It’s a super cool project!! The art is lovely and the code seems very well organized (i just skimmed through it but looks pretty good!)

What was your reasoning to target webassembly and not use raylib or a more traditional developement? Thank you!

1 Like

Thank you! The reasoning is that it is actually the most hassle-free way to get the game onto as many devices as possible, especially when we’re talking mobile, where we thought a game like this would shine the most.

I find Android’s SDK super annoying to deal with and I don’t own a Mac to make a native iOS app. Building the game with WebAssembly gets us both of these major mobile platforms with none of the hassles. And since we’ve also got a PWA manifest, people can make it an icon on their desktops and generally get visually even closer to something native. Now, if I figure out the right HTTP caching headers, it could even work completely offline after the initial launch.

The perfectionist in me still wants to make native versions as well, but basically WebAssembly was the fastest way to a minimum viable product.

EDIT(2026-05-03): Updated link to the manifest

2 Likes

There’s now a native version in a raylib branch (based on the name, guess what library I settled on :D). It is very much work-in-progress, but already fully playable.

https://codeberg.org/spiffyk/FruitsAndTails/src/branch/raylib

What’s missing:

  • keyboard controls (what little there is in the first place)
  • fonts are not yet being rendered the way I want them because of differences between Raylib and the web’s CanvasRenderingContext2D – I’m thinking about side-stepping them both by just using my own copy of FreeType internally, with custom minimal typesetting to make it all consistent across platforms

Add -Dplatform=raylib to compile.

4 Likes

Slightly off-topic for this forum, but I must share. Look at these gorgeous bookmarks Zuzka made for the game!

If there is, by chance, anyone coming to the Anifilm festival in Liberec (Czechia) next week, you too can have one :blush::chipmunk:

5 Likes

I also managed to get the Raylib version of the game mostly done. It’s the same game, just running outside the browser, with most of the code shared between the web and Raylib versions.

It’ll be playable on this single-purpose Acer One 10 tablet at the festival. The device is utter garbage, but when there is nothing but the game in the cage compositor, it runs absolutely smooth, so I’m proud of that. :smiley:

4 Likes

So, the Raylib variant is quite stable now (apart from a few missing cleanups), so I made a new release. The same version is also available on the web (link in the OP) and I have uploaded pre-built binaries for x86_64 Linux and Windows: https://codeberg.org/spiffyk/FruitsAndTails/releases/tag/v1.2.2


Complete changelog here: https://fruitsandtails.fghj.cz/CHANGELOG.txt


What I think might be interesting is that the Linux pre-built binary is dynamically linked against the Steam Runtime (via -Dsteamrt, see the client/build.zig.zon), so it is playable on multiple systems. I tested this with Arch Linux, where that binary just works out of the box (without installing any special runtimes, not even the Steam one - just what Arch provides).

I’m thinking about making a Zig package that makes linking against the Steam Runtime easy. It’s not the ideal solution, but it’s something we can use before we figure out how to do statically linked GUIs :slight_smile:

1 Like

Nice work! We played a couple rounds this morning on a small phone screen. I won! :grinning_face:

But I only won a game because we did not know where the real edge of the board was. I got lucky and had a run of tiles that were near what we thought was the edge so I couldn’t get 5, but then the grid expanded and I had the room.

On a large screen now, I see the tiles that will expand, but on a small phone screen they were basically invisible. That might be a nice thing to improve, somehow.

1 Like

Thank you! It means a lot to us that people actually like to spend some time with our game :heart_hands:

We’re aware of the board expansion situation, it’s on the TODO. Out of curiosity, did you look at the How to play at all, or did you go straight for the Play button? The information is currently not there, but maybe we could add a page explaining this briefly.

3 Likes

I did read through that before playing. It one of the first things we did after waking up so we weren’t in an idea-learning headspace, but it got the job done.

One thing we weren’t sure until we played was: does it have to be a straight line of 5 tiles, or can you bend corners? That’s clear in retrospect so not a huge deal, but was a question at the time.

1 Like

Our tiny Fruits & Tails corner @ Anifilm


4 Likes