Announcement

Collapse
No announcement yet.

RPG MMO Server System for UE4

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

    [TOOL] RPG MMO Server System for UE4

    UPDATE: The developer version is now FREE FOREVER and you can get it here: http://www.sabredartstudios.com/Marketing/FreeTrial

    I spent the last 6 months building this system for a game I am working on and just wanted to see if anyone else would be interested in using this system.

    RPG MMO Server System for UE4



    Why do I need this system?

    UE4 does not currently support large MMO worlds out of the box. The are many components UE4 is missing, such as world origin shifting, user/login management, and persistent storage.

    How it Works

    Click image for larger version  Name:	ServerDiagram1.gif Views:	1 Size:	10.5 KB ID:	1203713

    The system is powered by three different software components. The Login / Management Server, the World Server(s), and the UE4 C++ classes that communicate with the servers.

    Click image for larger version  Name:	LoginScreen.gif Views:	1 Size:	53.0 KB ID:	1203714

    The Login / Management Server is a SQL Server with a JSON Web API that communicates directly with your UE4 clients. When a player opens your UE4 game it connects to the Login / Management Server. This server communicates with the Login map that contains the UI elements for a user to login with the email / username and password. The character data for that email / username is accessed and sent back to your UE4 client for your game to use. The SQL database provides persistent storage to record where a player is in the world at all times and keep tracking of character related data for your game. Here are a few of the fields that are tracked in the persistent storage system: Character Name, Email, Password, Current Map, Current Location on Map (X/Y/Z), Character Level, STR, DEX, CON, INT, WIS, CHR, Character Statuses, Armor and Weapons Equipped, and dozens more. If the map that your character needs to load is not currently running, then a request is sent to one of the world servers to boot up that map (or another copy of it if the current map is full).

    The World Server software component can be loaded on one or more servers. This system is responsible for loading and unloading UE4 dedicated server instances as needed. This software responds to requests from the Login / Management server and then lets the server know when the map is ready for player to join.

    The UE4 C++ classes contain a GameMode and Character class that you can inherit from to gain the base functionality needed to communicate with the server system.

    How can I build my game with this system?

    All you do is inherit your Game Mode from my RPGGameMode base class and your Character from my RPGCharacter base class. All of the functionality above is now available for you to use.

    Can I use Blueprints or do I need to use C++?

    If you start with my project template the C++ is already compiled for you and you can do all of your game building with blueprints. If you want to add the functionality to your existing game you may need to install Visual Studio 2015 on your PC and follow some simple instructions to set up the C++, but you do not need to know how to code in C++. Even if you know nothing about C++, I still recommend that developers always have Visual Studio installed along side UE4 as it opens up a lot of options for you.

    How Large of a World can I Create?

    Each map is run on a specific IP and port that is managed by the Login / Management server. Then these maps together create your larger game world. During development I often run a dozen maps on one PC without any noticable performance issues. Each map can be multiple km in size and with enough servers your could support 100's of maps. So you can create as large a game world as you want.

    What are the limitations of this system?

    You are limited in how many players can connect to one map instance at a time, but you can load multiple versions of that map to support more players; they just won't all be able to see each other. It is up to you to decide how large each map is depending on your game design and performance considerations. The transition from one map to another is not seamless, but it is fairly quick (1 or 2 seconds).

    What kind of hardware do I need to run this system?

    For development I can run all of the components on my development PC. For deployment you can run all of the server components on one Windows hosted server or your can split it up into a large web-farm. For my game with a very limited number of players I run the Login / Management server on a Windows server (Virtual Host with 4 MB RAM) at 1and1 web hosting and then have one of the players (myself) run the world servers along with my UE4 client. The code runs on Microsoft .NET and uses the free edition of Microsoft SQL.
    Last edited by Dartanlla; 10-09-2018, 09:52 AM. Reason: The developer version is now free forever.

    #2
    Hey [MENTION=8243]Dartanlla[/MENTION] - I am interested in this. Unreal does support large worlds in multiplayer however it is still an experimental feature and It was just introduced with version 4.14. Link

    So handful of questions from me -

    1. Is this system locked to RPG like games or can we make other game types such as FPS, RTS, or VR games with this?
    2. What OSes can we deploy the software? I am a fan of Linux servers and Windows servers.
    3. What are your plans for this? Do you plan on selling it? Open sourcing it?
    4. How is security with this? I do not want is to have player data stolen.
    5. Can we get a video of this to show it in action?

    Comment


      #3
      Thanks for your interest [MENTION=260]HeadClot[/MENTION]. I had heard something about UE4 adding World Origin Shifting, but hadn't heard that it made it into the 4.14 build.

      1. The system is not locked to RPG type games. Many of the fields I am storing in persistent storage just happen to be RPG game related (lots of character stats), but adding additional fields to store is fairly simple. From the UE4 side the system is just a Character class and a GameMode that you would inherit from and then build whatever kind of multiplayer game you wanted. You also have to install the VARest plugin from the marketplace to make JSON calls in UE4.
      2. The system is written in Microsoft .NET and is targeted at Windows servers.
      3. I'm not sure what my plans are for it yet. I didn't have any intention of releasing the system when I built it. I wrote the system for a Pathfinder/D&D game I DM with a group of friends. We are playing Wrath of the Righteous UE4 style
      4. Currently there is no security (other than password hashing) since I don't store any sensitive data. If I release it to the public I can beef up security. My day job is as a systems architect for web applications with highly-sensitive data (SSN's and bank account numbers), so adding security won't be an issue.
      5. I will be out of town this weekend, but I will work on putting a video together next week to better show how it all works.

      Comment


        #4
        Originally posted by Dartanlla View Post
        Thanks for your interest [MENTION=260]HeadClot[/MENTION]. I had heard something about UE4 adding World Origin Shifting, but hadn't heard that it made it into the 4.14 build.

        1. The system is not locked to RPG type games. Many of the fields I am storing in persistent storage just happen to be RPG game related (lots of character stats), but adding additional fields to store is fairly simple. From the UE4 side the system is just a Character class and a GameMode that you would inherit from and then build whatever kind of multiplayer game you wanted. You also have to install the VARest plugin from the marketplace to make JSON calls in UE4.
        2. The system is written in Microsoft .NET and is targeted at Windows servers.
        3. I'm not sure what my plans are for it yet. I didn't have any intention of releasing the system when I built it. I wrote the system for a Pathfinder/D&D game I DM with a group of friends. We are playing Wrath of the Righteous UE4 style
        4. Currently there is no security (other than password hashing) since I don't store any sensitive data. If I release it to the public I can beef up security. My day job is as a systems architect for web applications with highly-sensitive data (SSN's and bank account numbers), so adding security won't be an issue.
        5. I will be out of town this weekend, but I will work on putting a video together next week to better show how it all works.
        Sounds good.

        Comment


          #5
          I'm sure a number of people would find this useful.

          Comment


            #6
            Depends on the price

            Comment


              #7
              What are the limitations of this system?

              You are limited in how many players can connect to one map instance at a time, but you can load multiple versions of that map to support more players; they just won't all be able to see each other. It is up to you to decide how large each map is depending on your game design and performance considerations. The transition from one map to another is not seamless, but it is fairly quick (1 or 2 seconds).

              How many players exactly per server? Are you speaking of the natural limitations of a standard Unreal dedicated server?

              That 1 or 2 seconds if over a network or over the internet?

              WIP Thread

              Comment


                #8
                The limitation I am speaking of is the natural limitation of the Unreal dedicated server. Because UE4 replicates all player character objects to every client it quickly runs into performance limits that a traditional MMO server system (WoW) does not have. I don't know what that limit is in UE4, but I would guess it is in the range of 64 to 128 players per map instance depending on how efficient you player character code is. My system does not remove this limit, it merely allows you to spin up more map instances to support more players.

                I have tested it over the local network and over the internet and I don't remember it taking much longer over the Internet since all it is doing is transferring the client from one server port to another. It is possible this time will increase some when under a real load. This time is assuming that the map you are transferring to is already loaded, otherwise add an additional 10 seconds for the server to spin up a new map. I place trigger volumes in the maps that once your character enters they are transported to the new map. So you do have to design your maps in a way that it seems natural to transition to other maps in a way that isn't seamless. This is in contrast to a traditional MMO system where it transfers you between servers just by walking over an invisible line and there is no noticeable change to the player.

                Comment


                  #9
                  Hey [MENTION=8243]Dartanlla[/MENTION],

                  I have a few more questions -

                  1. Would it be possible to support seamless transitions between maps? So people can walk/fly/whatever over the map edge and it loads them into the next map with no noticeable change.
                  2. Is there any form of "load balancer" included with this?
                  3. Are there any plans to take advantage of the world origin shifting solution included in Unreal?
                  4. Are there any plans for a Plugin system? So we can add our own custom functionality to the server.

                  Edit: Added a few more questions.
                  Last edited by Mr_SquarePeg; 12-12-2016, 12:00 AM.

                  Comment


                    #10
                    [MENTION=260]HeadClot[/MENTION]

                    1. I don't see how seamlesss transitions would be possible since it has to use ClientTravel to switch maps. The transition is fairly quick as long as the map is already loaded. However, if it needs to spin up a map on the server it has been taking about 12 seconds on my development PC (however this is using UE4Editor instead of compiling a dedicated server, so my hope is it is faster and takes up less memory with a dedicated server build). When I switch maps I save the character status, call ClientTravel and then load the character again on the other side. I tried using the seamless ClientTransfer, but was not happy with the results. I use box collisions to trigger the map transfer, so I design my maps to have small areas to transfer to the next map (a doorway, a castle gate, a skinny area between canyon walls or rocks, etc).

                    Maybe with the new world origin shifting I could come up with some kind of seamless transfer. I can look into it. I am still running on 4.13, so I have not taken a look at 4.14 yet.

                    2. Yes, I plan on adding loading balancing at the map instance level. This is fairly easy to do because the Login / Managemenr server decides which World Server to load the next map instance on and it keeps track of how many are already running on each World Server.

                    I haven't finished the video yet as I am still cleaning up some stuff to make it look better, but here are a few extra screenshots:

                    Click image for larger version

Name:	ManagementConsole_Users.png
Views:	1
Size:	41.7 KB
ID:	1119957

                    This is the management console that runs as part of the Login / Management server. You can use it to manage users, world servers, and see the currently running map instances. Before I release this to the public I am also planning on adding a registration system that you can use for your players to use to sign up for the game and create their account.

                    Click image for larger version

Name:	WorldServer1.png
Views:	1
Size:	5.1 KB
ID:	1119958

                    Here is a screenshot of the C# windows app that you run on each of the World Servers. The Login / Management server communicates with this app to tell it which maps to bring up and down and what ports to run them on.

                    Comment


                      #11
                      3. Are there any plans to take advantage of the world origin shifting solution included in Unreal?

                      I haven't upgraded to 4.14 yet. I will do that and see if this is something I can integrate into this solution. A truly seamless system would be pretty awesome!

                      4. Are there any plans for a Plugin system? So we can add our own custom functionality to the server.

                      Since the server software is written in C# and SQL and requires a server running IIS, I'm not sure creating a plugin will make the server more customizable. However, I am planning on adding a custom field in JSON format where developers can add additional custom data to the persistent storage system.

                      Comment


                        #12
                        I'm very interested in this kind of solution. what kind of timeframe/price break are u looking at?

                        Comment


                          #13
                          [MENTION=35165]Chieling[/MENTION]

                          Originally posted by Chieling View Post
                          I'm very interested in this kind of solution. what kind of timeframe/price break are u looking at?
                          The system is already working as I have been using it in my game that I play with a few friends for the last few months, but I need to clean up some of the user interfaces and beef up the security. It is possible that I can have something ready within the next few weeks.

                          I understand that the UE4 developer community is mostly made up of hobbyists like myself who aren't likely to ever finish a game to sell, but just do it because they LOVE making games. I have been game programming as a hobby for the past 30 years (since I was 5) and I am super grateful to Epic for allowing me to use UE4 to achieve my game programming dreams. Because of the fact that most UE4 developers will never turn a profit with their game projects, I am thinking of releasing a very low-cost developer license that will allow hobbyists to easily build persistent worlds in their games. I would likely let developers with this license use my Login / Management server so they can get up and running fast, don't have to pay monthly fees for server hosting, and don't have to deal with complicated server setup. Then if someone does build something they actually want to sell using this system, we can discuss licensing for release and I can help them setup a web-farm that will support their game's performance needs.

                          Comment


                            #14
                            I would likely let developers with this license use my Login / Management server so they can get up and running fast, don't have to pay monthly fees for server hosting, and don't have to deal with complicated server setup.
                            so then you are looking to host also?

                            Comment


                              #15
                              This is almost an exact fit for my needs except I would need to spawn a server based on matchmaking and would have multiple launches of possibly the same map but for a more traditional teambased 5v5 or 6v6 (basically a lot more instances of a smaller world )would you say there are any preferences for this being on windows as opposed to linux based and how much you would charge or if even interested in making modifications along this line?
                              Last edited by Smartay; 12-12-2016, 12:15 PM.

                              Comment

                              Working...
                              X