x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Understanding When to Use Game Modes and General Organization

This is a fundamental and organizational but basic type of question(s) that I'm trying to wrap my head around. I've read the documentation on Game Modes, and watched a few videos but it's still unclear to me how to answer your own questions on when and what to do when adjusting Game Modes. So in an effort to better understand how Unreal manages data, I'll try and make more specific questions here and hopefully get some insight from you awesome people.

  1. Can and should a game contain more than one Game Mode Blueprint? Why?

  2. Do you create a new game mode for pause menus and start menus? Does this also mean you need new pawn classes to control said menus?

  3. When isolating and organizing work, is it a good practice to place menu systems in their own levels/maps? How does this correlate with pause menus or inventory menus that need to exist in-game; do those exist on separate maps as well? If this is the case (as many youtube videos suggest) how do you call these menus without significant lag?

I have more questions regarding the organization of these blueprints but I'll start here. Any reading or insight would be really helpful, as I'm not sure how to ask these types of questions in documentation or video hunting on youtube.

Thanks!

Product Version: UE 4.20
Tags:
more ▼

asked Sep 16 '18 at 09:58 AM in Blueprint Scripting

avatar image

JJChalupnik
26 7 9 11

avatar image JJChalupnik Sep 19 '18 at 04:46 AM

https://www.youtube.com/watch?v=QJVn2mW67YQ

This is the best video I've seen so far to help shine some light on these questions. Thank you @mightyenigma for your response. This does help too.

I still don't know the answer to all these questions, but the video at least implies that you don't have to have different game modes just to do a menu. You can utilize Unreal UI Input nodes to activate or deactivate how the player inputs with the game.

Level Streaming menus do appear to make the most sense in this use case, but I'd be curious how to do this with various game designs that don't focus on level streaming, so all the questions still kinda stand. @mightyenigma, maybe a better question is "When should you use multiple Game Mode blueprints?" Are there good examples of this anywhere I can look?

Thanks again!

avatar image mightyenigma Sep 19 '18 at 06:37 PM

I am not sure when to use multiple game modes, except in unreal tournament for example, you want Deathmatch to have different rules than Capture the Flag, because in CTF you count the kills but the flag captures are the only thing that actually wins or loses the game, and it also changes how and where and when you can respawn and which Levels it would use.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

1) A game can contain more than 1 Game Mode blueprint. Because you can use game mode to set current level player controller, hud and spawn actor type, so with one level, you can have DeathMatch game mode, with DeathMatch player controller, while on another level, you can have CaptureFlag game mode, with CaptureFlag player controller, each game mode can has it's own game rule and win/lose condition, etc etc... So in short, it is to divide your blueprint into smaller module, for ease of coding/update/ understanding...

2) No you don't have to create game mode for pause menu and start menu. And this also mean you don't need pawn class to control said menu, in fact you can choose to have none as your game mode pawn class.

3) Unless it is a big menu like main menu, or some task that require user to work purely on menu, or you would love to implement level streaming system, then I would recommend you do that. Pause menu and inventory menu typical doesn't exist on separate map, unless again, there is some task that user need to work purely on menu, I usually just implement some widget and add them to viewport whenever I need them and remove/ hide them from viewport when I done with them. The point is that it cost less to create 1 widget then show/hide or add to viewport/remove it 100 times than create 100 widget every time you need it, especially if you also use Tick function inside each widget.

more ▼

answered Sep 19 '18 at 10:01 AM

avatar image

CKong
874 27 18 48

avatar image JJChalupnik Sep 19 '18 at 03:54 PM

Thank you for your reply! This helps a ton. So as an example... Let's say I have a 3rd Person Action game that has a mini-game in it to access a secret area. Would the mini-game be better served as a self contained, separate Game Mode with different rules and conditions? Or should the global aspects of the game mode simply be added to the primary one? Can these Game Modes be called and changed at any time? On the fly?

avatar image CKong Sep 19 '18 at 07:09 PM

In your example, it will depend on how complex that mini game is, if it simple enough to be implement with 2 or 3 blueprint function then i wouldn't bother create a separate game mode, and i would put those rule of the mini game into the current level game mode. On the other hand, with a really complex mini game, then sure, i would love to put those game into a separate level with it's own game mode, rule and condition. Note that you can still pass data between different game mode, using GameInstance, which is a kind of global blueprint that can be access from anywhere.

And it is a shame but each level can only have one GameMode and you can't change it on the fly, at least from Blueprint side, i think there is a topic on AnswerHub about switch GameMode with C++. But you can assign a GameMode as GameMode for the entire project, or you can have a different GameMode for each and every level.

The below tutorial series develop a system where multiple GameMode was used for each stage of an multiplayer game, from finding match->waitting room->select character->in game

https://www.youtube.com/watch?v=abmzWUWxy1U&list=PLZlv_N0_O1gYqSlbGQVKsRg6fpxWndZqZ&index=1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

My project only has one GameMode, and its main purpose is to be a container that sets all the other gameplay-critical stuff like which GameState Class, default Playercontroller etc. although it does handle a few things for managing players, starting stuff on levels etc. This is largely because my project is a multiplayer only game so Gamestate is doing most of what you would use GameMode for but in a multiplayer scenario.

My menus stand alone. I have a level mainly for menus to setup the game options but i also have some of these same menu widgets pop up during gameplay on other levels. It is the Viewport, not the level which contains them, unless youre using 3D widget actor components (those exist in the level). But even those dont have to be tied to the level, you can just spawn, show/hide, enable/disable or destroy them at will regardess of what level or how you are using them.

more ▼

answered Sep 16 '18 at 08:42 PM

avatar image

mightyenigma
3.8k 18 20 20

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question