Mobile Turn based Game - Artist needing Blueprint advice.

Hi guys

My name is Mike, I am primarily a 3d artist, but want to take on an actual gamedev project in Unreal and learn a little bit of blueprints along the way. I’ve decided on something I THINK should be relatively achievable.

I want to recreate the 1990’s handheld Barcode Battler handheld system as a mobile game. It was a flawed device but with a good premise. It was marketed as a gaming handheld, but was really more like a tabletop RPG, complete with monster manual, and an electronic device to handle the numbers. It was clunky and hard to operate. I want to recreate it as close as possible, but in a modernised, more playable form on mobile.

MY EXPERIENCE LEVEL

I am primarily an artist – 2d, 3d, and making environments in Unreal. I have a teeny bit of coding experience – I made a few very simple c# games in unity years ago, and a simple clicker game in Unreal blueprints recently. I understand basic concepts like variables, branches, functions.

What am I trying to create:

A MENU BASED GAME

No 3d models or anything like that. It will mostly be like a very simple, menu driven turn based combat system. One player versus one enemy. Player stats improve as you win battles. There will be player stats, inventories, bestiarys etc too.

A DATABASE (?) OF ONE TIME ENEMIES

The original game had you fight a series of 120 enemies divided across 4 zones. Once you killed an enemy, they were dead. Random enemies held keys – collect 3, and you could head to the next zone (whether all remaining enemies were defeated or not).

A BARCODE SCANNING MECHANIC

The big selling point of the original machine – it allowed you to swipe barcodes from products, which would then have an algorithm determine if they were weapons, items, new characters or even new monsters to fight.

WHAT I NEED HELP WITH:

Basically everything lol, but specifically -

MONSTER DATABASE

– I plan to make a struct and data table with monsters and their stats. Is that the best approach? Data tables are Read Only, correct? So I cant have an ‘Is Dead’ boolean in the data table to just toggle after a fight. How do I then track and save which enemies are alive? And how do I assign 3 random enemies per world to have keys?

- Do I make a modular ‘enemy’ blueprint that loads for every fight, but takes its stats from the appropriate line in the data table?

- I plan to have a widget UI grid where you pick the enemies you fight, which then grey out when the enemy is defeated. Again – whats my best way to set up and track that?

BARCODES

– I don’t necessarily need an actual camera based Barcode scanner. (Is there any such plugin?)

But can I have it that player enters a random 12 digit number into a text box, and run algorithms on that?

So for example, take the first few digits to determine if its a weapon/character/monster, then the next few digits to determine stats, etc.

Can I separate out digits, combine them, reverse the order, etc? If so – how?

INVENTORY

- There is a set list of weapons and items from the original game. These adjust attack stats, heal hp etc. – again, do I use a data table and draw on these values during combat?

- New items/weapons from the barcode system – how do I store these? Best to use a separate table than the default items?

I’m sure I will have many other questions as development progresses, but these are the first things I think I need to solve, and cant seem to find any relevant youtube videos. I appreciate any help you guys can offer!

Mike.

Your project is very achievable in Blueprints with just a few building blocks. Suggested layout:

Enemy “database” → Data Table. Create a Struct (BP_EnemyData: Name, Zone, HP, Attack, Defense, HoldsKey (bool), Icon (Texture2D), Description). Then Content Browser > Add > Miscellaneous > Data Table, choose that struct, and fill 120 rows (you can import from a CSV/Google Sheet; right-click the table > Reimport). Use Get Data Table Row with the Row Name to read stats at runtime.

One-time enemies / progress → SaveGame. Create a SaveGame Blueprint with: a Set (or Array) of defeated enemy Row Names, Player stats, Inventory (Map of Item ID → count), Keys collected (int), Current zone. On defeat: add the row name to the set and call Save Game to Slot. On load: Load Game from Slot and check “Contains” before offering an enemy.

Menus → UMG (Widget Blueprints). One main Widget with a Widget Switcher for Battle/Inventory/Bestiary pages. Keep game state (stats, turn state) in a GameInstance or a Game Mode, not in widgets.

Turn-based combat → simple state machine. Use an Enum (PlayerTurn, EnemyTurn, Won, Lost) and a function per state; branch on the enum with a Switch on Enum. Damage formula goes into one function you can tweak easily.

Barcode scanning. Unreal has no built-in barcode scanner, so you have two routes: (a) a mobile plugin/marketplace barcode scanner (search “barcode scanner” for iOS/Android) that returns the string; (b) type the number in a text box for prototyping. Either way the “algorithm” is easy: convert the code string to a number (e.g. hash it with a simple function or take digits), then use modulo to pick an outcome: Hash % 4 for weapon/item/character/monster, and the result indexes into a Data Table. This makes each barcode give the same result every time, like the original.

Build it in small steps: first the Data Table + a widget that shows one enemy’s stats, then combat, then saving, then scanning last. Good luck!

Much appreciated ChenDong.

I never even thought about the battle mode! I’ll have to look into state machines. Are they used for animation too? I feel like I’ve encountered them when setting up characters, but never in a pure coding context.

I’m glad I’m going in the right path with a strut/data table for the monsters - thanks for confirming.

I think I understand most of the rest of what you say, so I’ll go do some googling on some new terms you’ve mentioned! No doubt I’ll have plenty more questions soon!