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

23 Likes

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

1 Like

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.

1 Like

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.

3 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:

2 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:

1 Like

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.

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.

2 Likes