Buying levels with in-game currency

Hey guys!

I’m working on a game right now that I’m developing for mobile. I’m still quite new to development and would consider myself a ‘beginner’, so basic phrasing and explanations are appreciated! ^^

I’m currently trying to get started on a feature that, to be completely honest, I have no idea where to start.

The game will have different ‘Stages’ ( like, ‘The Woodland’, and ‘The Garden’, for example) and these stages will contain multiple levels. I would like each ’Stage’ to be unlocked with coins/ in-game currency that the player will earn while playing and replaying the levels in Stage 1.

So I essentially need a few features:

  • When played for the first time, levels in a stage must be played in chronological order.

  • In-game currency that carries over to the main menu.

  • Being able to spend this currency to unlock the next Stage (or bunch of levels). Ideally these would also only be purchasable in chronological order as well!

I can’t seem to find much about this anywhere else, so I thought consulting the forum would be the best way to go about it! Thanks for your time, and I can provide more information about the game or my question if needed! ^^

I’m also planning to have this currency alternatively available to purchase as an in-app-purchase, but that’s a whole other kettle of fish, so I’m focusing on the first half at the moment!

Save the Money as an int in a GameInstance. Have buttons on a menu that go to each level, but only if the level is unlocked (Boolean). If the Level is not unlocked, make a button to pop up to buy and then the button deducts the money and unlocks the level. Save it in an array maybe. When you make money in the game, it increases the money variable.

You need to break the problem down into smaller chunks.

1 Like

This is super helpful!! Thank you so much for breaking it down for me ^^

Do you have any recommendations of where to start with the coding and such? I’m still quite a beginner and have mostly been using YouTube videos and tutorials for the basic gameplay mechanics, so I’ll probably start looking for a few videos on these topics to get me started, but is there any code in particular/ forums/ videos that you would recommend on the topic?

You’ve already helped a lot, so no pressure though! ^^

I think the best way is to just start trying to code. It will be frustrating because you won’t know how to do anything, but frustration is something you need to get familiar with, particularly with Unreal.

I generally use YouTube to get an idea of stuff in Unreal.

1 Like

Awesome, thanks so much!! ^^

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.