Announcement

Collapse
No announcement yet.

Networking Issue.

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

    #16
    So according to my research I can use Python for the socket server and make it perform all of the tasks I need. Would that take the place of my dedicated server? Could I use it to do just what I need and continue to allow the Dedicated Server to handle the rest? So basically I would need someone to help me get started as to helping me put the Cpp in that allows the game client to talk to the python socket server and then help me write some blueprints for being able to send out certain variables and whatnot. From there I should be able to man the helm without a GPS if you catch my drift.

    Comment


      #17
      Originally posted by Hudolus View Post
      That point me in the right direction was directed at sswires. Can I use Python to write a winsocket backend? What do I need to do where should I start?
      Python can be yeah and there's plenty on Google about creating a TCP server in just about any language. You just need to make sure your game and talk to it and vice versa. You'll also want it so that your TCP server runs on multiple threads so that it can deal with multiple clients sending data simultaneously. I've only done sockets programming in C# and a little in C++ using Winsock. For Unreal, I imagine there will be a TCP sockets abstraction layer (for cross-platform) in there somewhere.

      Comment


        #18
        Yeah I found lots for using python with this framework https://docs.python.org/2/library/socketserver.html seems to do exactly what I need. All I need to do now is get Unreal to spit out some data so I can see what it looks like so I can build the server from there. Did you see my other post? Right above your last?

        Comment


          #19
          Originally posted by Hudolus View Post
          Yeah I found lots for using python with this framework https://docs.python.org/2/library/socketserver.html seems to do exactly what I need. All I need to do now is get Unreal to spit out some data so I can see what it looks like so I can build the server from there. Did you see my other post? Right above your last?
          It wouldn't be in place of your dedicated server as your dedicated server would handle the game world itself and interacting with other players. Your Python server would be responsible for doing any persistence such as storing character data or any other data you want to store or calculate centrally rather than on the game server itself. Though I do just recommend having it store player/world data and actually performing actions (such as combat) on the game's dedicated server.

          Comment


            #20
            Yeah now that the interaction between DB and Dedicated server has been simplified so much, I can have the clients log in and whatnot through the socket server and then the socket server gives them their character data, then the client sends its character data to the dedicated server and the server checks it for authenticity with the socket server. After authenticity check server calculates the values that will be necessary for combat interactions and hands them back to the client, probably have these values refreshed every 5 minutes or so. When combat occurs i.e. ability gets used spell cast whatever, player says I'm hitting dudebro heres my info hands the relevant information to the dedicated server, server handles the calculations for combat and the combat resolution is passed back to involved clients. Sound good? You've been so friggin helpful. I just need one more thing, You mentioned TCP Socket abstraction layer, does that mean that the application already has the capability of starting up a data stream and that blueprints are already available to use for passing data to a socket server? If not, where would I get some information, neigh an example of how I would go about adding a .cpp to my project to handle this data stream. And make some blueprints for handling data. Would only need 8-9 blueprints for what I can think of right now.

            Comment


              #21
              Originally posted by Hudolus View Post
              Yeah now that the interaction between DB and Dedicated server has been simplified so much, I can have the clients log in and whatnot through the socket server and then the socket server gives them their character data, then the client sends its character data to the dedicated server and the server checks it for authenticity with the socket server. After authenticity check server calculates the values that will be necessary for combat interactions and hands them back to the client, probably have these values refreshed every 5 minutes or so. When combat occurs i.e. ability gets used spell cast whatever, player says I'm hitting dudebro heres my info hands the relevant information to the dedicated server, server handles the calculations for combat and the combat resolution is passed back to involved clients. Sound good? You've been so friggin helpful. I just need one more thing, You mentioned TCP Socket abstraction layer, does that mean that the application already has the capability of starting up a data stream and that blueprints are already available to use for passing data to a socket server? If not, where would I get some information, neigh an example of how I would go about adding a .cpp to my project to handle this data stream. And make some blueprints for handling data. Would only need 8-9 blueprints for what I can think of right now.
              I found the sockets stuff in the engine code which lives at Engine\Source\Runtime\Sockets. You will have to look at C++ to use that functionality (in the same way you'd have to do it for Http unless you used a plugin) as it doesn't look like it's been hooked up to Blueprints.

              Comment


                #22
                How well versed are you with creating C++ and creating blueprints would you be able to help me put some together once I solve the issue of getting it to the socket server and build the socket server. I should have a basic socket server built tonight and just make it to where it deposits anything it receives into a file. Then if you could help me build the blueprints I can take it from there.

                Comment


                  #23
                  Originally posted by sswires View Post
                  Wow, mysql_query, really? You know that's been deprecated for the longest time and you should use mysqli or PDO instead. Is that also vulnerable to SQL injection too? Also you shouldn't use local files or Steam's cloud saving functionality to save persistent data about a player as that can easily be cheated.
                  Hey,

                  yeah sorry for showing a very basic setup to understand and use HttpRequests. It's not like there are thousand of helpful tutorials
                  or anything on getting UE4 to work with something like that. I asked the Hub and the Forum and no one ever even gave me a
                  response on how to do it. It's cool that you help the Thread Owner, but please don't be rude if someone not that skilled tries
                  to help with something not so good.

                  For me, Steam is enough, since i don't have an MMO. I just have something like Torchlight.

                  Maybe my post helps others getting started if they google for HttpRequests.
                  Sorry Thread Owner if that didn't help you and i missunderstood the
                  "Point me in the right direction" sentence.


                  eXi (:

                  PS: I don't know if that is vulnerable to MySQL injection. It could be. As i said, the whole thing was just for easy understanding...
                  Open for contracted work | C++/BP (incl. Multiplayer) | Tutoring | VR

                  My UE4 Blog/Page with Tutorials and more: Hit me for ALL the things!
                  (Including 100+ Pages Multiplayer Network Compendium to get you started.)

                  Comment


                    #24
                    Originally posted by Hudolus View Post
                    How well versed are you with creating C++ and creating blueprints would you be able to help me put some together once I solve the issue of getting it to the socket server and build the socket server. I should have a basic socket server built tonight and just make it to where it deposits anything it receives into a file. Then if you could help me build the blueprints I can take it from there.
                    I won't be able to help you any more than I have in this thread, I'm just trying to point you in the right direction. There's a good chance you'll have to touch C++ unless someone comes out with a sockets Blueprint plugin.

                    Originally posted by eXi View Post
                    Hey,

                    yeah sorry for showing a very basic setup to understand and use HttpRequests. It's not like there are thousand of helpful tutorials
                    or anything on getting UE4 to work with something like that. I asked the Hub and the Forum and no one ever even gave me a
                    response on how to do it. It's cool that you help the Thread Owner, but please don't be rude if someone not that skilled tries
                    to help with something not so good.

                    For me, Steam is enough, since i don't have an MMO. I just have something like Torchlight.

                    Maybe my post helps others getting started if they google for HttpRequests.
                    Sorry Thread Owner if that didn't help you and i missunderstood the
                    "Point me in the right direction" sentence.


                    eXi (:

                    PS: I don't know if that is vulnerable to MySQL injection. It could be. As i said, the whole thing was just for easy understanding...
                    Of course I'm going to call out stuff that's a not a good example, it's even more dangerous when someone is just learning and may not know any better. You should know better to use a MySQL library that's been deprecated for over a year and to protect against SQL injection by using prepared statements and possibly even stored procedures.
                    Last edited by sswires; 09-09-2014, 08:37 AM.

                    Comment


                      #25
                      I asked for help and i got this example as the only answer on the Hub. Now tell me
                      how shall i know, as a beginner, that this isn't good. It was even posted by
                      an Epic Staff Member >.<

                      Till now, no one offered help on that section before. So i will keep watching the thread
                      to learn something new.
                      Open for contracted work | C++/BP (incl. Multiplayer) | Tutoring | VR

                      My UE4 Blog/Page with Tutorials and more: Hit me for ALL the things!
                      (Including 100+ Pages Multiplayer Network Compendium to get you started.)

                      Comment


                        #26
                        Originally posted by eXi View Post
                        I asked for help and i got this example as the only answer on the Hub. Now tell me
                        how shall i know, as a beginner, that this isn't good. It was even posted by
                        an Epic Staff Member >.<

                        Till now, no one offered help on that section before. So i will keep watching the thread
                        to learn something new.
                        If you'd like when I come across a resolution I will post it here so that you may use it as well. I am currently building the basics for my socket server. Once I get it constructed I will take the rest of the process and lay it out here.

                        Comment


                          #27
                          It's not only me. There is no Tutorial for Multiplayer things at all.
                          Only the RPC Tutorial from Epic, but that's not the hard stuff.
                          We would need a Tutorial for what you do and for getting
                          the OnlineSubsystem running.
                          That's why i'm working on understanding the Subsystem in
                          another thread by working with the ShooterGame.
                          Sad that no Staff Guy helps here :/
                          Open for contracted work | C++/BP (incl. Multiplayer) | Tutoring | VR

                          My UE4 Blog/Page with Tutorials and more: Hit me for ALL the things!
                          (Including 100+ Pages Multiplayer Network Compendium to get you started.)

                          Comment


                            #28
                            Originally posted by eXi View Post
                            It's not only me. There is no Tutorial for Multiplayer things at all.
                            Only the RPC Tutorial from Epic, but that's not the hard stuff.
                            We would need a Tutorial for what you do and for getting
                            the OnlineSubsystem running.
                            That's why i'm working on understanding the Subsystem in
                            another thread by working with the ShooterGame.
                            Sad that no Staff Guy helps here :/
                            What are you referring to by Subsystem

                            Comment


                              #29
                              Steam for example. So that your game can use their Master Servers,
                              Friendlists, Store, Achievements and so on.
                              Open for contracted work | C++/BP (incl. Multiplayer) | Tutoring | VR

                              My UE4 Blog/Page with Tutorials and more: Hit me for ALL the things!
                              (Including 100+ Pages Multiplayer Network Compendium to get you started.)

                              Comment

                              Working...
                              X