Download

Viable options/best workflows for SP game with multiple interaction modes?

How would one efficiently implement multiple interaction modes (that can be switched between) in a single-player game via Blueprints? Examples of “interaction modes” would be:

  1. Open-world exploration (WASD movement, etc.)
  2. Final Fantasy X-style combat (all participants fixed in place, turn-based, combat-specific stats & win/lose conditions, etc.)
  3. Horse-racing minigame

One main difference between interaction modes would be that they each require different animation sets, behavior trees, HUD displays, etc. while all taking place within the same persistent map (i.e. no map loading).

Is this typically done with GameStates or something? As I understand it, GameModes aren’t ok for this since switching game modes requires loading a new map? Has anyone done something like this successfully?

@DsyD

A lot of your questions will be answered maybe if you look at a template for a character / vehicle toggle. There’s a few in Community Tools… In short, if the inputs (WASD etc) are passed directly to the Blueprints responsible for the character / vehicle, each will behave individually / uniquely. However, if all the inputs are processed or arrive at Player-Controller, then you’ll need some kind of ‘States’ system, built-in or 3rd-Party. In short, Gamemode can Possess character / vehicle to control either. Or you can start with Character or Vehicle and they can directly possess or control the other. Overall Character / Vehicle will each have their own unique HUD system which is hidden / destroyed when you toggle between them etc.

But it doesn’t really matter about Framework per se. You have to code for each case anyway… The framework (Gamestate / Gamemode) is just a placeholder if you want or chose to use it. But its not a magic bullet where things are done automatically for you. In that sense UDK (the previous engine) was quite different from UE4. So you still have to code this all yourself… Gamemode will work fine for all 3 modes in single-player (Gamestate applies more to multiplayer). You’ll just be coding a 3-state solution which could be as simple as 3 -way enum to remind Gamemode what gameplay is currently active. Gamemode could also infer this from looking at what objects are currently spawned in the world.

Ok, thanks - wasn’t aware there was a Content example for something like that. I guess I’d just like to avoid huge spaghetti-like graphs in my character blueprints, but I suppose it’s unavoidable to some extent.

@DsyD

That’s more myth than truth to be honest… BP ugliness / beauty is your own hands / destiny!
If you have unimaginable spaghetti, you’re most likely going about something the wrong way… :stuck_out_tongue: