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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Where to put game initialization logic?

Hello, I'm making a Trading Card Game and I am a little confused as to where to put the game initialization logic. by game initialization I mean all the stuff that are general for the game like spawning some initial actors, setting up initial cameras, etc.

For example in my game a normal match has 1 player and 1 AI controlled pawn, a field, two decks belonging to each player, etc.. I wanted to know if for example to spawn the field and cards should i put that logic inside the player controller or in the GameMode or create a class that handles all that and put it in the level as an actor?

Product Version: Not Selected
more ▼

asked Sep 03 '14 at 02:20 AM in Using UE4

avatar image

198 38 36 43

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

2 answers: sort voted first

You can put that in Gamemode and load anything you want from there. You can have multiple gamemode to handle different thing like MainMenu Gamemode : show your main screen with menu, login .. Normal Gamemode: 1 player vs 1 Ai like you said, then maybe Multiplayer Gamemode,

When you want to test it also very easy to test, just change Gamemode in World setting of your level you can test any specific mode you want.

more ▼

answered Sep 03 '14 at 02:40 AM

avatar image

Duncan Dam
3.1k 121 50 164

avatar image DylanVelez Sep 03 '14 at 04:11 AM

Thanks i was confused as to how to use the GameMode, now i kinda understand it.

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

I think a good place to put the initailization logic in this case would be at Level Blueprint with BeginPlay event. This way game data will be driven by level blueprint to keep game mode and player controller independent.

more ▼

answered Sep 03 '14 at 03:28 AM

avatar image


(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