Coder Social home page Coder Social logo

7mersenne / uewebsocket Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dajiangningjing/uewebsocket

0.0 1.0 1.0 16.94 MB

unreal engine 4 websocket plugin for both c++ and blueprint developer

License: MIT License

C++ 98.28% C# 0.59% Batchfile 0.01% JavaScript 0.08% TypeScript 1.03% C 0.01%

uewebsocket's Introduction

UEWebsocket

unreal engine 4 websocket plugin(support ssl) for both c++ and blueprint developer.

This plugin is for unreal engine 4 c++ and blueprint developers, you can easily use c++ or blueprint to connect to remote server and send receive messages.

Unreal network is great for FPS or moba and IO games, but there's some games, you need to process network by yourself, this plugin is for these people, you don't need to write any c++ code, the plugin support blueprint api to make json string from message object, and can also decode json to message object.

Even the io game, we still need to connect to non dedicated server, I first write this plugin for my poker game, and then I use this plugin in a simple .io shoot game, here is the demo webgl version:tankfire.io, you can open it with firefox(I use the latest firefox for test), please confirem your browser support webgl.

There's two level in the demo project, one for test websocket connect and send receive, The other level is test message Object serialize to json string, and from json string to message object. I did not use struct, because change a value of a struct in blueprint is not convenient.

Supported Platform

★ 1. Win64

★ 2. Mac

★ 3. Android

★ 4. IOS

★ 5. Linux

★ 6. UWP

★ 7. Win32

★ 8. HTML5(NEW!!)

this plugin tested on 4.20 4.21 with vs2017(vs2015 may build fail).

Install

This is a normal plugin, if you are a beginner and don't know how to install it, please watch the video on my another plugin.

currently, this plugin automatic create a ca file, so you can use wss. If you have any problem, please email me:[email protected].

Usage

★ Connect To Server

ScreenShot

★ Bind Event, Send And Receive Data

ScreenShot

★ Generate message class

When you work for a large game project, you can't write all message data class yourself, you need to use tools to generate message class. Under the ProtoTool/ there's a tool to generate cpp code for unreal engine 4 and d.ts for nodejs type info. I like use nodejs as my game server, the client and server communicate with json message. The proto write with js format, there's a example "message.js", you can run the "generatetue4.bat" to generate class.

★ Object to json

ScreenShot

★ Json to Object

ScreenShot

★ ssl support

this plugin support wss, it will automatic create ca file, the ca content is an array in WebSocketCA.cpp file.

License

This is an open source project, you can use it free. If you think this project useful, please give me a star to let me know it is useful, so I'll continue make it better.

uewebsocket's People

Contributors

feixuwu avatar dreamfreebyte avatar y4ure avatar

Watchers

7Mersenne avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.