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"

How can I create level instances? One server with multiple levels loaded.

Hi Guys,

Seems like UE runs one level at a time. If I want to reproduce games' architectures like DOTA or LoL, where there is a lobby, and then players can start games running on a server, and they being clients. I assume there is a server that can start instances of a game on demand.

How should I face this on UE4?


Product Version: Not Selected
more ▼

asked Mar 21 '14 at 05:55 PM in Using UE4

avatar image

38 3 4 6

avatar image MaxFights Mar 11 '16 at 10:10 PM

Sorry for bringing this up so late, but I am trying to create a mini mmo server, one that will only replicate players currently in your 'room'. Rooms would be generally small so it would be pretty efficient. The idea behind this is that players can switch rooms, which would despawn the old room and spawn a new local copy of the room they are connecting to, then they would start getting information about the players in that room. Currently I am using the websocket protocol to transfer data serialized in JSON from the clients to a multi-threaded server written from scratch in php. This generally works, but my issue is how do I handle replication, I only need general replication with top down movement, but how can I achieve this? I've been trying to use grid based maps with the same A* path-finding algorithm on both the server and the client, this way the server can send correction packets to clients based on where the server thinks the given player should be. Is there an easier way to do this?

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

3 answers: sort voted first

I think this is a very complex issue.

There might be a way to fake this by grouping players together, and basically running multiple games on a single map, but only replicating game/player state between players that are in the same 'group', but you are still going to be pretty limited to a handful of games, with a few players per 'server'.

I think the 'correct' way, but far more involved, would be to completely replace the networking/replication system on the client, so that rather than connecting to an actual UE4 server, it would connect to some other server software, which you would have to write from scratch (could feasibly implement that in Node.js or Go, or whatever language/library of your choice). That would potentially be much easier to deploy in a large scale on something like Amazon EC2.

Maybe someone else can think of a more elegant/simple solution, but those are the only options that spring to mind for me.

more ▼

answered Mar 21 '14 at 06:06 PM

avatar image

16 1 1 3

avatar image gastonb Mar 21 '14 at 06:33 PM

I see. I was thinking this would be the answer. The problem I see with creating a server from scratch is having to work with physics in server and having to deal with it myself.

Thanks for your answer.

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

This sounds very much like matchmaking. If so, this is a fairly complex topic, but here are a few things to think about:

  • Matchmaking is definitely separate from game state, and you can think of these as two separate problems.

  • You can definitely still use the UE4 built-in replication system along side any matchmaking solution you choose to use (matchmaking is just a way to discover servers that are waiting to be connected to)

  • While the matchmaking infrastructure isn't built directly into the engine, UE4 offers support that wraps third party solutions into platform agnostic API's (look at the Online\OnlineSubsystem stuff).

In your example where you'd like players to wait in a lobby, and then play games, etc:

  • Players that want to join lobbies could contact the matchmaking service (either use third party, or roll your own; UE4 does wrap the ability to invoke these calls from platform agnostic API's though)

  • The matchmaking service would return results back to the player in a form of a list of servers

  • These servers could be instances of the engine waiting for players to connect (singles instances, each with a single running level)

  • The matchmaking service would be responsible for spawning the instances of these servers based on demand.

  • When players join this instance of the engine that is running, it would look like they were in a lobby, this is comletely up to you how you do this in the engine though

  • These players could then start the game, etc, using that server until they were done with it

This is an extremely simplified view of one way this can be done, and if I've completely missed the mark on what you were trying to achieve, I apologize!

But I do hope this gives a few ideas on this very complex topic!

more ▼

answered Mar 21 '14 at 10:21 PM

avatar image Rama Mar 21 '14 at 10:23 PM

welcome to the UE4 Forums John!

Nice to see you again!

Thanks for the detailed explanation!


avatar image gastonb Mar 21 '14 at 10:45 PM

Right. That is the first conclusion based on what I've learned using UDK. I could make a lobby and handle spawning server instances on demand, one instance per "group of players". In this kind of games, that group of players is 5-10 people.

As far as I've researched in old UDK forum regarding performance, it would mean a lot of PC resources for only 5-10 players, and would be really expensive architecture for a large playerbase.

That's why I thought about "level instance" approach, where the main Engine modules would be shared among levels (core, physics, etc).

Any ideas?

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

I want to say that this type of feature is already in the engine with the master server/browser approach.

more ▼

answered Mar 21 '14 at 09:05 PM

avatar image

76 2 5 9

avatar image gastonb Mar 21 '14 at 09:32 PM

How is that? Can you expand?

avatar image gastonb Mar 21 '14 at 09:45 PM

My idea is that players start a server instance of a map, and all players play in the same server, in different level instances.

avatar image Reality-X Mar 21 '14 at 10:25 PM

Ahh, I misunderstood. I was thinking it was a system where players join a lobby area, see running servers and then join a server. So a multiple servers approach.

(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