What is the best solution if i want to switch between games?

Hello!
I’ve only just started working with UE4 and blueprints, so i’m quite new to this. so please, bear with me :slight_smile:

I’m trying to create a simple prototype for a game right now and one of the concepts we thought of was a hacking minigame.
for now, its a Cyberpunk genre 3rd Person stealth game where our character can hack into enemies to sabotage their cybernetics in different ways.
(Imagine the mini game something like Nier:Automata in the vein of Cyberpunk 2077)

I have not started visual scripting/bluerpints yet since i’m not sure where to start. I have been thinking of several ways to do this:

  • Switching Game modes.
    simply does not seem possible in UE4.27 though?

  • Simply Switch Cameras
    How would i pause the rest of the game while i’m finishing the mini-game?

  • Switch Game levels
    This would require to save everything as is and jump back in. not sure if thats efficient and would take some loading time inbetween levels and i would like to keep that to a minimum.

  • a UI overlay
    I think this solution would limit with what i could do with a minigame.

It seems the main problems would lie in pausing parts of the game while another is active, and saving parts of the game to go back to right before the hacking takes place.

How would you guys with a bit more experience go about it?

Hi @Boricmars :slight_smile:
here are two possible solutions to your problem:

  1. Simply Switch Cameras: When you switch the camera you could pause the whole game and set the relevant actors for your mini game to “Tick Even when paused” or you set a boolean in your GameMode/GameState/GameInstance that a mini game is running and according to that all other Actors have to wait.
    image
  2. Switch Game levels: You can load the level async and you can use a different GameMode for your mini game. Yes you have to save the current state of your main game. I would go with this solution :slight_smile:
3 Likes

Thanks for the fast reply @Ramon_Janousch!

Thanks @AntiGravity!

Suggestion: Always try to include sample video clips - always. So fix that first if possible (if only to generate more answers / interest in the thread). Also, if you’re linking to hour long clips then include target timestamps too… Don’t make us devs work for it. :stuck_out_tongue:

Also, thanks for the tip, i’ll think about it next time i ask these kinds of questions.

These are all great solutions to my problem which i can start digging into. ScneCapture2D is something i haven’t heard off and seems like a great alternative. As it appears to me that i’ll be able to implement something more interesting rather than a simple camera switch.

But right now i’m switching cameras to toggle between screens, and plan trying @Ramon_Janousch Solution. As that one seems a bit more simple for now. Although i do plan on a more elegent implementation in the future.

You can also leverage the Widget Interaction Component (WIC). Its probably the neatest thing Epic ever provided in the engine imo. You can overlay the hacking part as a screen-wide user interface, or control it in-world as an inset 3D widget.

Quick question about this part here: Would this limit me to a 2D mini-game?

2 Likes