Nikola Lukic
16 Mar 2022
β’
5 min read
=> Migrate to ue4 builded from source. => Only active for now is 4.24.3 , i will wait until finish Barbarian Road Mashines basic demo with one game play map.
https://github.com/RocketCraftingServer/rocket-craft-server
Basic account session staff based on node.js and MongoDB. Integration done:
Node.js http1.1/http2 server Basic session account support (mongoDB) Vue-Typescript administrator panel project Test clients (rocket-craft repo) Rocket-craft client (4.22) exchange IP for opened dedicated users server run. Run rocketcraftingserver in local (dev):
This project can start without rocket-craft projects. If you wanna use your own client app you can use it with rocket-crafting-server (REST)used only httpRequest.
From ue4 client
Barbarian Road mashines
race game.Project structure First char in name I (for example IApp.ts) represent current interface used for generating API documentation. Dont upload this project in www, htdocs, public folder on you public domain mashine. Like any node.js app. Folder admin-panel is somekind of sandbox. Dont import any file from root like congif.js. Even admin access it is still posible for public access. Top secret list: system email password public database password
βββ database/
| βββ data/ (internal mongodb generated)
βββ docs/ (Output for documentation html)
βββ node_modules/ (auto generated)
βββ admin-panel/ [Vue - admin app]
| βββ dist/ (auto generated)
| βββ images/
| | βββ icons/
| | | βββ svgs
| | | βββ pngs
| βββ node_modules/ (auto generated)
| βββ public/ [Vue - Public]
| βββ src/ [Vue - src]
| | βββ components/
| | βββ administrator/
| | βββ accounts.vue
| | βββ local-storage/
| | βββ my-common/
| | βββ common-func.ts
| | βββ literal.ts
| | βββ styles/
| | βββ App.vue
| | βββ IApp.ts
| | βββ main.ts
| | βββ error-instance.ts
| | βββ shims-tsx.d.ts
| | βββ shims-vue.d.ts
| | βββ store.ts
| βββ .eslintignore
| βββ .gitignore
| βββ babel.config.js
| βββ index.html
| βββ manifest.web [PWA - staff]
| βββ package.json
| βββ package-lock.json
| βββ typedoc.json [Documentation generator config]
| βββ tsconfig.ts
| βββ vue.config.js [PWA - staff]
βββ self-cert/ [server side local cert]
βββ multiplayer/ (raw implementation - support servers)
| βββmatchmaker [optimal]
| βββsignalling-webserver [optimal]
| βββserver-builds [optimal]
| | βββwindows [for win host plan]
| | βββmacos [for macos host plan]
| | βββlinux [for linux host plan]
βββ .gitignore
βββ config.js [server side config]
βββ LICENCE
βββ README.md
βββ package.json
βββ package-lock.json
βββ server.js [Main Server]
Active RocketCraftServer integrated Features List:
Active RocketCraftClient engine 4.24.3 integrated Features List: Client application (all platforms releases/builds) use communication with rocketCraftServer only on API level with http/https protocol.
Only implications between ue client vs server.js is account session status (in database field online). Logged or not.
+-------------------------------------------------------------------------------------------------------+
| Active project use 4.24 ue version - Project name : Barbarian Road Mashines |
| Server use 4.24 ue version fro source |
| +-----------------------------------------------------+ |
| SOURCE : https://github.com/zlatnaspirala/rocket-craft |
| +-----------------------------------------------------+ |
| |
| |
| DESKTOPS MOBILE GameConsoles WEB |
| +-------------------------------+ +------------------------------+ +----------------------------+ |
| | | | | | | |
| | WINDOWS | | ANDROID X-Box | | Unreal export direct from | |
| | (dedicated server) [DONE] | | | | 4.22 or use engine 4.24 | |
| | | | | | | |
| | MACOS | | IOS | | (build from source) | |
| | | | | | | |
| | | | | | AdminPanel (ONE PART OF | |
| | | | Sony Playstation | | THIS REPO) | |
| | | | | | | |
| | LINUX (dedicated server) | | etc | | Also can be used by any | |
| | no implication with account | | | | web application fetch call | |
| | session http server. [DONE] | | | | (API JSON Based content) | |
| +-------------------------------+ +------------------------------+ +----------------------------+ |
| rocket Client builds |
| rocket Server builds |
+----------+----------+---------------------------------------------------------------------------------+
^ |
| | MATCHMAKING [OPTIMAL]
| |
| | SINGNALING SERVER [OPTIMAL]
| |
| | WEB SERVER [For hosting ue html5 clients also for rocketcraft session]
| |
+--------------------------------------------------------------------------------------------------------+
| | | |
| +----+----------v---------+ +-----------------------------+ |
| | | | | |
| | REST API | | HTTP, HTTPS (1.1 or 2) | |
| | [/rocket/register] | | | |
| | [/rocket/confirmation] | +-----------------------------+ |
| | [/rocket/register] | |
| | [/rocket/login] | |
| | [/rocket/profile] | |
| | [/rocket/profile-delete]| |
| +-------------------------+ |
| |
| +------------------------------------------------------------+ |
| SOURCE : https://github.com/zlatnaspirala/rocket-craft-server |
| +------------------------------------------------------------+ |
| |
+--------------------------------------------------------------------------------------------------------+
| NODEJS CORE |
+--------------------------------------------------------------------------------------------------------+
| MONGO DATABASE |
+--------------------------------------------------------------------------------------------------------+
Status/info: Admin Panel (Vue-ClassComponent-Typescript) Debugging proccess for server part with Visual-Code. (Launch.json tested on windows)create folder.vscodein root of workspace and copylaunch.json`. Please use debugger and learn and feel node iterrator flow. Admin ban user [NEXT] Active servers list [DONE] Admin only - delete profile [done] Production Public RocketCraftingServer API: Prefix: rocket
http://maximumroulette.com/ Admin panel:
http://maximumroulette.com/admin Note:
Make shiled from Hacker attacks. Recommended is to run mongo without remote access! Make strong database password Use permission by definited host be mac-address or ip...
All this prevent job is minimum action to make your server application stay a live.
About .permission there is no setup this arg from code. Use MongoDB console or GUI Mongo DB Compass. This is all free. Just replace value basic with admin.
Basic data:
Dedicated Server CentOS 8.3 Build shipping version at the end. Security:
Use non standard port it si small but good secury feature. If you have mongo on same mashine use bind localhost not domain name. It is easy to use distribution platform with more servers host mashines.
mongo --host IP-ADDRESS-OF-MONGODB-SERVER --port PORT_NUMBER Be aware of NAT and need to have opened port if you have firewall active on your server.
CentOS 8.3 use DB_NAME_ROCKET_ID db.author.insert({"name":"Nikola Lukic 2021"}) Format:
firewall-cmd --zone=public --permanent --add-port PORT/tcp Examples for cent os 8 in case of signaling server useage:
sudo firewall-cmd --permanent --add-port=5349/tcp sudo firewall-cmd --permanent --add-port=5349/udp sudo firewall-cmd --permanent --add-port=63000-64535/udp
firewall-cmd --zone=public --permanent --add-port 85/tcp firewall-cmd --zone=public --permanent --add-port 8888/udp sudo firewall-cmd --reload Server flow For production or stage server dev use secured arg and also you need to have ssl private key and .crt file. Run:
npm run app Localhost MongoDB setup:
run mongodb service on your computer Then attach it:
mongod --dbpath data --bind_ip
mongo --host IP-OR-HOST --port SECRET_PORT_CUSTOM -u "userAdmin" --authenticationDatabase "admin" -p Manual operate with database:
show dbs use <database_name> db.users.update({},{$set : {"role":"user"}},{upsert:false, multi:true}) Deep look at package.json in root dir:
"scripts": { "app": "node server maximumroulette.com secured", "sameDomain": "node server IP_ADDESS secured" Ue4 Clients -> Must be game engine builded from source. Generate visual studio source files. Build on right click -> first ue4 instance than build game instance. Use Development or Shipping - Editor If you wanna dedicated server build Development-Server or Shipping-Server build configuration in visual studio. For package run also game engine from source and simple package selected platform. For all platforms
4.24.3 Main reason is devices with opengles < 3.0 support plus Linux supported websocket experimental net driver [also dedicated server works fine].
This is Tradicional way. On finish whole this staff i will add future modern way brach ( 4.26 > ) with last ue4 upgrade.
Signaling Server host [optimal] 80 - for all HTTP requests coming from clients. To change this value, set the --httpPort parameter for the Signaling Server.
443 - for all HTTPS requests coming from clients, when the Signaling Server is running in HTTPS mode. To change this value, set the --httpsPort parameter for the Signaling Server.
8888 - for all incoming connection requests from the Unreal Engine application. To change this value, set both the --streamerPort parameter for the Signaling Server and the -PixelStreamingPort parameter for the UE4 application.
Matchmaker Server host [optimal] 90 - for all HTTP requests coming from clients. To change this value, use the --httpPort parameter for the Matchmaker Server.
9999 - for all messages sent by the Signaling Server. To change this value, set both the --matchmakerPort parameter for the Matchmaker Server and the --matchmakerPort parameter for the Signaling Server.
Multiplayer proxy servers for support [optimal] From ue4 engine recommended files
Turn server come from webRTC excellent feature for next update. Be sure:
npm install -g npm Test from browser console Read more at routes.md
From http://maximumroulette.com/ or from your own server.
Login: fetch("/rocket/login/", { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, body: JSON.stringify( { emailField: "zlatnaspirala@gmail.com", passwordField: '123123123'}) } ). then(response => response.json()). then(data => console.log(data)); For private job i also run KureOrange at: https://kure.maximumroulette.com/
Nikola Lukic
work at ASTER MEDIA NET d.o.o. , worked : anatronica.com , maximumroulette.com , Seavus , International (GmbH in GrΓΌndung) ...
See other articles by Nikola
Ground Floor, Verse Building, 18 Brunswick Place, London, N1 6DZ
108 E 16th Street, New York, NY 10003
Join over 111,000 others and get access to exclusive content, job opportunities and more!