DEV Community

evangelos dimopoulos
evangelos dimopoulos

Posted on AI-assisted

Building a route-chaining block puzzle in Unreal Engine 5.8 with C++

We're a small team of gamers with mixed coding backgrounds, and we just released a free demo of our first game, Wyrd Hands: Block Puzzle (Windows, Linux, Android). This post is about how it's built, not about the game itself, so here is the short version first: every tile carries a skeleton hand pointing up, right, down or left, and you chain the hands from one edge of the board to the other to clear a route.

Demo and downloads on itch.io

The rule that makes it a puzzle

A tile on the edge of the board that points away from the side it touches is a route starter. One that points straight at a side it touches is a route ender. A chain of tiles that each point at the next, from a starter to an ender on the far side, clears and scores. Routes that share tiles score extra.

That's the whole mechanic. The board logic is a small amount of C++: find starters, follow the pointing direction tile by tile, and stop when the chain breaks or reaches an ender. Most of the work was in everything around it.

A UI built entirely in C++

We build the UI (UMG widgets) from C++ instead of designing it in the editor. Menus, the riddle cards, the score and combo badges and the play-size card are all created in code. For a small team this keeps layout changes reviewable as diffs and lets us change a screen from the command line. We also added debug commands that open a given screen directly, which made testing phone layouts fast.

A bot that plays the game

The project has a built-in bot, started with a -demo flag, that plays the game itself. We use it three ways:

  • recording gameplay for trailers
  • balancing, by watching how far it gets on different board sizes
  • performance, because a bot gives you a repeatable run: on a tablet in landscape, a bot-played Halloween event run held a median of 29 fps (minimum 26.5)

Phones are a different game

On Android we switch to a lightweight scene. The cathedral background is a single pre-rendered picture, made from the real scene with a capture command. The bats and steam are flat animated sprites, and the 3D resolution drops by itself when the frame rate falls. Phones and tablets are capped at 30 fps. On one 720x1640 phone that measured about a fifth less power while playing, 383 mA against 491 mA uncapped.

The PC version keeps the real thing: Lumen global illumination and reflections, virtual shadow maps and TSR, with a low-graphics option for weaker machines.

Content tools that aren't Unreal

Campaigns (a sequence of levels with goals, timers and curated piece orders) are plain JSON files that the game reads at launch, so a new level can be tried without rebuilding. We also wrote a standalone HTML editor for them that opens in any browser with no install.

What we'd like to hear

This is a demo and feedback is the point. Does the tutorial explain routes well enough? Is the difficulty fair? What was your first impression, and how did it make you feel?

If you want to try it: oakwyrdtales.itch.io/wyrd-hands-block-puzzle. A trailer is on YouTube.

Disclosure: some of the art and text in the game and this post was made with AI assistance.

Top comments (1)

Collapse
 
alexshev profile image
Alex Shev •

Using the built-in bot for both balancing and performance is a strong way to make game behavior comparable across builds. I would save the board seed, bot decisions, device profile, and frame-time trace together, so a change in difficulty can be separated from a rendering regression on the same replay.