how to host UE4 shooter game across multiple pc in the same network - unreal-engine4

I am trying to build an FPS shooter game on top of the Shooter Game project that epic have in the learn tab, but I did stumble upon a problem when I tried to package it into a standalone game to test with some other people, they all use the same network as me by the way(meaning we connect to the same router, just to be clear). I am aiming for the LAN functionality where I host a game and then others can then join the session, but the problem is that it only works if both the instance that host a game and the instance that tries to connect to it, is in the same computer, otherwise it won't find a session at all. I have tried many things like port forwarding, DMZ zone, but still nothing works. It doesn't seem to be anything wrong with the code though, as it works if all the instances is on the same computer(like I can successfully connect to the hosted session). I really don't know what else to try, I have searched for days, but it doesn't seem like people use that project at all so the answers is also limited, but I tried all of them and nothing seems to work.
I have also tried the dedicated server by the way, but also there I only got it to connect once the server a establish a game session, but after that time I tried alot of times to replicated it, but to no avail. Do someone have any idea what the problem might be here?

never mind I figured it out, just wanted to share it if anyone else also have problem with this. Basically having something a virtual network like virtualbox can mess this create this problem as it can make it so the search packet will be broadcast to UDP, 255.255.255.255, port 14001 instead of the main network. In my case I just removed virtualbox(as I didn't use) and everything worked.

Related

Simple Localhost Server in Xcode/Swift?

I am making a macos app in XCode, and I was wondering if there was a way to make it host a local server that is visible across the network.
I am trying to find a way so that it would host something on the devices's network with it's hostname/ip address, so if someone goes to http://hostname:5000 they would be able to see the response, and the app would be able to see the request, just like how hosting a local python server works. Is there any way to do this in XCode with Swift?
For example: the user presses 'start server' on their screen. The server is hosted across the network. Anytime a request is made to it, they get a notification.
Just to make you concern you may find some sample codes, including local web server inside the app.Few of them I found are:
https://github.com/ooper-shlab/MyWebViewApp-Swift
https://github.com/depoon/SwiftLocalhost
The main thing is it's just a public
, experimental code, so it's not simple, not easy to adopt, not all coding best-recommended, far from readable and may have severe bugs.But you can use it as a working example and take any parts of it into your app.

Matchmaking not showing matches in Unity3d development HUD

I'm not sure why matches are not showing up in the HUD. If both clients are on the same computer, the match shows up, but not if they are on separate computers, whether or not they are on the same network. I'm following this tutorial: Multiplayer matchmaking. I checked with others having the same problem on different threads but I can't get any solutions to work.
I disabled all firewalls and still had the same result, so it can't be that.
If this is a common error, then is there a solution that actually works?
ok - I changed the data center from mm.unet.unity3d.com to us1-mm.unet.unity3d.com. This actually worked. I don't know why it works but it looks as though two instances on different computers use different data centers. Don't know why though.

PJSIP via CLI on Raspberry

I am new to Raspberry and VOIP. I am interested to make a door intercom system using raspberry, as I read most of the post here and those are really helpful,one of the raspberry is acting as server (Asterisk and PBX). I was able to call using sflphonebut that was only for desktop mode and I am interested to call using CLI and for that I installed "PJSIP" as reffered by most of users, but don't have any idea what to do next (I mean how should i start). As it is written after installation I am supposed to try for "pjsua" and "pjsystest" in pjsip-apps/bin, but it doesn't ring any bell for me.
Sorry for my level as beginner but if you don't begin how are you supposed to masters it.
I shall be very thankful.
so i can't explain all of the stuff you need to know, but with this Site you should be able to register to you PBX. It's an documentation to the high level API of PJSUA. If you go further on that site they will lead you through the things you have to do to establish a call.
Although this can be very frustrating because there are many error that can appear. There are some python test application under pjproject/pjsip-apps/src/python/samples, here you should firstly try to establish a call between two clients to be sure you server is well configured.
Just for info, the dest_uri you have to give in the call.py is like so sip:ip:port and you have to change the values in the register.py to your client infos. Then run the register.py in one shell and the call.py in an other shell.
Hopefully i could help you over some barriers, feel free to ask if something was unclear.

AIR server connections

I am wanting to give back to a small gaming community. The idea is to make an app that acts like a chat client to connect to the game servers. I am trying to grasp the concepts on how connections work through examples I've found on the web, since I am self taught by seeing examples.
So far the examples I found are for connections on the same network. What I need is some kind of example that will allow me to connect from different networks or at least an explanation on what I need to do. Also I need to be able to get around a router without with setting port forwarding on the router.
In the end the app will be connecting to the game developer's server but I need a working app before I get his permission to connect to his servers.
Any help will be most appreciated. If any additional information is needed to help just ask and I'll do my best to fill in the gaps.
That is a very broad question, but I try to give you as much information as possible from by point of view. As I'm not yet sure if you want to have a P2P Connection (game-application to game-application) or a standard server model, I will just mentioned different approaches to this problem.
Adobe has support for P2P since a long time. Read some FAQ, esspecially "How does RTMFP differ from RTMP?" (I try to choose Sources with infographics, as that helped me to understand it).
What you really should start playing with and making first steps in, should be NetConnection. This is the very basic Function that will allow you to communicate to a Server running e.g. PHP or connecting to a Flash Media Server (FMS). FMS is inpartcular interresting for you, as it really boosts the ideas what you game could do, but setting up a FMS is not that easy,to host a own instance is even more complex. So if you come to the conclusion that you want to travel the road of using a FMS, I can suggest you Onyx Server. They mainly marketing theirself as a Streaming service, but in reality you will get access to a FMS for a ok'ish price (FMS instances on Amazon were way worst the last time I checked).
The FMS basicly only a Flash AS2 File with some extra Commands. Your FMS can handle real-time (!) persistent connections (!) with any client that connects to it. Everyone is able to connect to the server at first, and you can then choose in your FMS Script what a client have to bring to the table to stay on the server or is rejected. After that, you have a very string tool for a Game. For example, you could have a game instance connect to it, tell the server that an enemy was hit and the server near-instantly (the speed is really amazing, there is no feeled delay, it really is instant. Its called SharedObjects) pass this information down to the enemy game instance. I used FMS only for one project and it was a very long ride to understand it and work with it, but it was a really nice experience, as you code the Server in the "same" language like the game itself (AS2, AS3 = ECMA).
If you dont want to spend money at this stage, you can use the Adobe RTMFP Instance at p2p.rtmfp.net. It is, as far as I know, only for testing and you will be rejected if you misuse the service for a real project, but for starting and testing it will do. If you use the Cirrus Engine, you can even follow this Tutorial. You will find sample code in there:
// Cirrus connect info
private const SERVER:String = "rtmfp://p2p.rtmfp.net/";
private const DEVKEY:String = "{YOUR_DEVELOPER_KEY}";
// Used to connect to the Cirrus service
private var _netConnection:NetConnection;
_netConnection = new NetConnection();
// Listen for status info
_netConnection.addEventListener( NetStatusEvent.NET_STATUS, onNetStatus );
// Connect to Cirrus using our unique URI
_netConnection.connect( SERVER + DEVKEY );
My adive for you would be: Try getting comfortable with NetConnection. It is really straight forward. When I first started using it, I had a couple of days struggeling and reading a lot on the web, but I learned a lot doing so. You should too. Use NetConnection and try to create two simple AS3/FLA instances of your code that both connect to the same domain (use the adobe rtmfp domain for now) and try to exchange some simple String-Data between these instances.
To take some of the pain of your shoulders, add the minimum amount of listeners to your NetConnection like so:
//Main NetConnector
nc = new NetConnection();
//Troubleshooting Listener
nc.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
nc.addEventListener(NetStatusEvent.NET_STATUS, status_handler);
//nc.objectEncoding = ObjectEncoding.AMF0; //Default
nc.client = this;
nc.connect("https://some-domain");
////////////////////////////////////////////////////////////////////////////////
/// CALL ERROR LISTENER
////////////////////////////////////////////////////////////////////////////////
private function status_handler(e:NetStatusEvent):void {
//trace("NetStatusEvent");
dispatchEvent(new CallEvent(CallEvent.CALL_NATIVE_NET_STATUS, e, true ));
}
private function securityErrorHandler(e:SecurityErrorEvent):void {
//trace("SecurityErrorEvent");
dispatchEvent(new CallEvent(CallEvent.CALL_NATIVE_SECURITY_ERROR, e, true ));
}
You will get alot of errors and netStatus and NetSecuriy Events. Flash will often run into Sandbox-Violation errors when you now know what you are doing. That can be frustrating but if you keep it up, google every error and compare you implementations with the implementation of others, you will wrap your head around this and can do really neat stuff with it.
I recommend you google sources and tutorials for NetConnection and stick to one that is on your level of knowledge.
Good Luck.

Concurrent Connection Test

So I ran into a network problem the other day and I was trying to find a way to test for this problem in the future.
I had a lot of users online at once and hit my routers max IP connection limit (not DHCP! TCP/UDP connections.)
Once I figured out what the problem was it was fairly simple to fix however I was wondering if there is any way to simulate this kind of activity? Everything worked fine when I tested it, it wasn't until I had 150+ users that I discoved I had a problem.
I have spent the last 3-4hrs looking for such a test/audit tool. Here is what I found:
http://bittwist.sourceforge.net/ -DDoS simulator (can't make it work, barly get +300 connections)
http://stevesouders.com/hpws/max-connections.php -Browser concurrent connection tester (This hits the browser limit (6 in chrome) w/o making a dent on my router even open in 70+ tabs at the same time)
http://www.smallnetbuilder.com/lanwan/lanwan-howto/31103-how-we-test-hardware-routers-revision-3 -Some tool linked about halfway down the page (Reads like its exactly what I want, however it barely has a noticable effect on my router.)
http://www.http-kit.org/600k-concurrent-connection-http-kit.html -Concurrent HTTP connection simulator (This one seems like it would do what I want, but my linux-foo is limited and I can't get it working. tear)
So do you guys have a tool to test your routers with? I would love something that does both TCP/UDP.
(btw, for anyone misunderstanding I'm not trying to test "speed", just sheer number of connections)
Thanks!
Kz