Making a game with choices and consequences?

So recently I wanted to attempt to make a game where your choices affect how the game ends/what happens to the characters such as Life is Strange or Until Dawn. I’m using Ren’py to make it, since I want it to be in the format of a visual novel. The problem is, I have absolutely no idea how to execute my idea. I know the basics of coding and all that, but I don’t know any way to create alternate endings/scenes that isn’t complicated. If anyone could point me in the right direction, that’d be great.

…Unfortunately, if you’re using Ren’py, this seems to be the wrong place to ask - as this is the Unreal Engine forums.

THAT being said, no reason to not help - so while I’m not an expert, how I would tackle it is by “flags”. Basically, a given event enables a data flag, and later down the line you have the game check for these flags to make it happen.

Example: You get a choice. The choice can enable flags A, B or C. If you choose A, you go down path AB (that happens whether you chose A or B). If you chose C, you go down path C. In path AB, you get a choice that enables flags X or Y. If you choose X, it checks for flag A as well, leaving you with 3 choices in 2 checks: X and A, X not A, or Y. If you choose C, you get choices, so on.

Basically, think of it less as “a tree of choice” and more as “a path with detours” or as “sorting the player”.

Using flags is also very friendly for recursive pathways - for instance allowing the player to progress one way until they have something and they return later (or even next playthrough) because they couldn’t possibly have that flag on until then.

Examples in games where it works like this:

Mass Effect: Works like this all over, but the most prominent example is this: in Mass Effect, you can import games from the previous titles. If the savefile has the flags for 10 Asari writings and a specific weapons license from the first game, you get a bonus.

Undertale: EXP/LVL count as flags here - so do the number of monsters killed, the specific high-tier monsters killed, and the Genocide run.


Borderlands: It’s CLEARLY made obvious that EVERYTHING works off flags - whether a mission was completed, failed, objectives completed or not, everything. The game even ticks off checklist items when a flag is set up (or, when faced with a choice, which flag is set up)

Skyrim: several missions will not appear until previous missions are fulfilled - in this case, the missions’ completion act as flags.

If it’s not clear, I’ll make a schematic when I get home.

From a coder perspective, you got a state machine and each state goes to another state via a transition state, forming a graph. The graph must be navigated forward or backward. It is a common problem for computer science and there must be a lot of examples of code covering this. Im afraid that you will need to code in C++ to make the best implementation, because trying to do it in Blueprints requires a lot, but you anyway will use both, making code in C++ and exposing part of it via Blueprints.

I suggest you seach in or youtube, inside Unreal Engine user, video series about state machine for a start. If you are not familiar with C++ in UE there is a very good course in that is actually an investment of U$ 31.00 (with a great discount atm) if Im not mistaken.

Wish to you success! I love “Life is Strange” btw.

Hello, you can use my plugin to create choice based games. It doesnt require blueprint or c++ experience. You just need to create your sequencers and use the plugin to connect them with each other with choices. Have a look at it from here;