Announcement

Collapse
No announcement yet.

TCP Blueprint Plugin

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

    [RELEASED] TCP Blueprint Plugin

    Hello everyone,

    I am happy to announce my TCP Blueprint plugin:
    https://www.unrealengine.com/marketp...ueprint-plugin

    It allows you to connect to a server using tcp protocol and it's designed so users
    can use blueprints only so they dont need to write code with c++.

    Source code is also provided so you can customized to your needs.

    Features:
    • custom IP and port defined in blueprint nodes
    • Blueprint nodes to connect/disconnect
    • blueprint events onConnect/onDisconnect/onConnectionFail
    • receive and send: int32,float,string
    • Blueprint node to read all as string
    • 5 Python server scripts examples included
    • Example project using the 5 tcp servers simultaneously
    • ready for ue4.13


    Video :
    https://www.youtube.com/watch?v=Et0woN_u9Lg



    Example project available for download (requires plugin to compile):
    www.motion.mx/ue4/tcpexample/TCPexample.zip


    UPDATE 03/01/2019

    Added easy to use "bp_EasyStringTCP" to the blueprint, just drag to your viewport and use its method "SendStringToServer" to send strings and the "onTcpStringReceived" event to listen for incoming strings.

    I am also sharing an server utility program to create tcp and websocket servers to allow you to quick test the plugin and communicate several clients with ue4 (the server utility is only for testing purposes and is not part of the plugin)
    you can get the download link from the plugin blueprint bp_EasyStringTCP graph code.

    New tutorial "simple chat with tcp" using the "server utility"


    Hope you all like it
    Attached Files
    Last edited by paranoio; 03-02-2019, 08:35 PM.

    #2
    I also created a new example to connect UE4 with Community Core Vision ( CCV 1.2 )
    to show how to use the TCP blueprint plugin to get touch detections.

    Download the project from (requires the plugin to compile):
    http://motion.mx/ue4/tcpexample/CCVexample.zip

    And this is the video:

    Comment


      #3
      CRASHING EDITOR ON WIN10 quick fix

      CRASHING EDITOR ON WIN10 quick fix

      Some users started to report an editor crash when using the plugin, i found that there is a problem
      with the plugin binaries installed on the Engine directory.
      I reported this to EPIC and im waiting for their feedback,
      meanwhile these are the steps to fix the problem until i get a response from epic:

      *****Be aware, if you follow these steps you will have to manually copy this plugin sources to your projects

      STEPS TO INSTALL PLUGIN PER PROJECT AND COMPILE
      1. open the directory C:\Program Files (x86)\Epic Games\4.13\Engine\Plugins\Marketplace
        Click image for larger version

Name:	1.JPG
Views:	1
Size:	54.8 KB
ID:	1116958

      2. in that directory there must exist the BluNet directory, create a zip of it (to keep a backup)
        Click image for larger version

Name:	2.JPG
Views:	1
Size:	56.9 KB
ID:	1116959

      3. move the BluNet directory to your "yourproject/plugins/" directory (if dir plugins does not exist then manually create it)
        Click image for larger version

Name:	3.JPG
Views:	1
Size:	108.3 KB
ID:	1116960

      4. delete everything inside "yourproject/plugins/BluNet/Binaries"
        Click image for larger version

Name:	5.JPG
Views:	1
Size:	76.0 KB
ID:	1116961

      5. open yourproject and let the editor compile the plugin binaries
        Click image for larger version

Name:	6.JPG
Views:	1
Size:	28.3 KB
ID:	1116962



      Please let me know any issues you may find posting in this thread or using the email support@motion.mx
      Last edited by paranoio; 10-25-2016, 10:19 PM.

      Comment


        #4
        Someone asked me to create a demo for using the tcp plugin with android, i just made a proof of concept project, if anyone wants the project just send me a pm.
        This is the video :

        Comment


          #5
          EDIT - It's ok I managed to get it working in my UE4 16 project anyway,
          Main priority was to simulate the python scripts successfully, that i did by using Python 2.7 IDLE GUI.
          -------------------------------------------------------
          Hey Paranoio

          I can't seem to open your example projects in UE4-16 !
          Opening the projects I am getting the ~

          The following modules are missing or built with a different engine version
          UE4Editor-TCPexample.dll
          UE4Editor-BluNet.dll

          go to recompile then ~

          CCVExample could not be compiled try rebuilding from source manually

          I have the plugin successfully in seen engine with any new project,
          I have copied the plugins to the project plugins too (as above)!
          I don't have VS 2013 or 2017 on my machine do i need it to recompile this?

          all best

          Cliff
          Last edited by Clifford Sage; 10-06-2017, 12:17 PM.

          Comment


            #6
            Great to hear you found your way around, i was not aware of your post sorry.

            Comment


              #7
              Can you give instructions on how to run on UE 4.18.3 just keeps giving me the same error as Clifford was getting in the above post.

              Comment


                #8
                Hello CMTech,

                are you getting the "modules are missing or built with a different engine version" ?

                i actually dont mantain the project CCV (only the plugin and the example project) , if you are getting that error is probably because i created CCV and have not updated to a new version of UE4,
                to solve it :
                -try changing the ue4 version of the project (second mouse click over the project file) and "switch unreal engine version" then choose the same ue4 version to match the one of the plugin (probably latest 4.18)
                -alternatively you could try moving the plugin from ue4 directory to your project directory(so you can recompile the plugin) , just follow my instructions above about "CRASHING EDITOR ON WIN10 quick fix"


                Comment


                  #9
                  Hi paranoio, I have a question about the update function. (posting this here, maybe someone have the same question)

                  In your example (did the same in my project for now), you run the Update each tick. So if I'm correct, it mean that if I have 60 frame per seconds, it will try to update the socket 60 time in a second.

                  So if I receive more then 60 data per second, example if I have 20 player that send their position 10 time a seconds, that mean 200 string to read each second, so you'll be update for only 33% of the new position and you'll have to wait another second until the next 33% segment can be read, but a new 200 string will arrive at the same time. Correct me if I'm wrong, my test using the plugin lead me to think it work like this.

                  So my solution for now (didn't test yet, but I'll edit this when it's test) is to keep my reading on tick + starting a «Set timer by Event» on begin play that update 20 time each 0.1 seconds like this:


                  Not sure if it's really appropriate. I want to ear you tell me what you think about this problem and solution. If you have other solution (test or not) tell me, I'm open to any suggestion!

                  have a good day!

                  Comment


                    #10
                    Hello
                    Thats not the way it works, as you can see in the screenshot in the node connect you have a parameter "In Update Time"
                    wich defines the time to wait between updates.
                    In the code of c++ there is a buffer wich receives your data and when the update time is reached it sends the accumulated data.
                    If you want to see the code look in the FBluNetConnectionThread.cpp file.



                    Attached Files

                    Comment

                    Working...
                    X