Announcement

Collapse
No announcement yet.

Best Practices: Modifying gameplay variables from a menu?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Best Practices: Modifying gameplay variables from a menu?

    What is the preferred method for implementing variables which can be adjusted in a menu and are communicated across game modes / maps / etc.?

    e.g. a Difficulty Level would be set from the options menu before game start, and that variable would in turn likely influence all sorts of things in the game across ALL maps and modes; things like what AI patterns are in play, total HP of enemies, enemy spawn points, the spawn locations of health pickups, etc.

    Surely at this point there's got to be a standard practice for this sort of thing?

    #2
    I'm not sure of the standard practice, but I save variables like that to the Game Mode blueprint itself so I can access them anywhere. If you're changing Game Modes, use the Save Game class and save persistent variables to it that are relevant across different Game Modes (such as difficulty). Save them when you're about to load a different Game Mode, then load them when the new Game Mode is in effect.
    iTween For UE4
    Procedural pathed animation for actors, components & UMG - $0
    Runtime DataTable
    DataTables dynamically loaded from text or Google Sheets while your game is running!
    easyCSV
    Fast, cheap, and accurate CSV parsing at runtime!

    Comment


      #3
      For my project, I save the player settings in a blueprint, then pass that info to the game mode. Then, the game mode(s) can take that info and pass it to the map blueprint and spawn it, or spawn different blueprints and levels based on those player choices.
      Map Generator 1.0
      Map Generator 2.0
      Map Generator 3.0

      Comment

      Working...
      X