Hi. I have a game that uses Unity Networking. and atm, it uses the default master server in unity HQ. But this would be really clunky if I had to use the server once the game is released.
How would I go about setting up my own server remotely? I can’t do it at home, as the internet there isn’t on all the time. I was considering google drive, but it can only host HTML, not full-blown server software! Failing that, I could use UDP sockets or something, but only Unity Pro has that…
EDIT: Turns out there is a possibility of having the connection up all the time! I still wouldn’t mind a solution that might work remotely though!
You should be able to run the master server on a small VPS fairly cheaply. You only need a little space and 256MB RAM on a Linux server to build it, but could get away with less for a low-traffic server once it’s actually running. All VPS hosts let you scale it up if your game starts getting popular.
BTW, I got a compile error saying: “Unknown reference: FindParent” Is this something the ncurses library has? I also go the error about the “Height” But I was able to fix that easily, the only thing barring me is the FindParent error.
In case you need some more info, here:
CPU: Intel Atom N270 (Might question server performance, but a mini lappy can’t be that bad… ;))
RAM: 1GB (Might need more, I can upgrade to 2)
OS: Linux Mint 15. (Could THIS be the problem?)
You should probably have the package “build-essential” installed at the very least. It should be in Mint, since it’s based on Ubuntu. I’d need to see the rest of the error messages to even guess what it could be that’s missing. There might be need to get "
libncurses5-dev" or a similarly named package too.
I can recommend Lubuntu over Mint for a laptop like that. It’s real Ubuntu, but the default is an extremely lightweight desktop (Xubuntu is similar).
Yea, I actually had Xubuntu installed, but I ended up overwriting the install with Windows Vista (REALLY?! ) at some point for some reason… Anyway, I can easily overwrite the install again to do this. That’s the best thing about my mini: it is good for all sorts of testing! I also like Xubuntu, as it has a nice theme that isn’t much of a strain on resources. (gotta love the brushed metal… :))
And is that what the package is called? I wondered why just typing “ncurses” came up with an obsolete package… Anyway, thank you for your help so far! I shall deploy in 3… 2… 1…
I have successfully built the executables, and have them running on my Mini Laptop!
I will post results soon.
Once that happens… I shall seek out a good, free, not over-the-top VPS service!
there is no such thing. just invest the 8$ a month for a really nice vps. it can also serve you for other purposes such as hosting your game’s homepage, blog, forums, support, custom email, databanks and backups. basically every cheap hoster can get you this for a hand full of dollars a month.
@Arp-Leonhard : I actually have a good website host already: GOOGLE DRIVE!
And I am sure there are free VPS services out there (I only need a simple 1GB free thing for the game server, and nothing else! ;))
@orb : I worked it out: since I have technically got my own server at home, would it be possible to map my Dell Mini 9 (aka. the Master Server) to a dot.tk domain? I actually have two: the second one was created just for this purpose.
What would you recommend then? I was also going to have it so that the game could use the test server at Unity HQ, should mine go down. and plus, I want to see how MY network can handle 1000 connections, and to do so, I need a way to access the server from anywhere, which means I need to map the computer to my domain name. (aka. gamemode-bedroomlogic.tk) This way, when I post my server test on the forums later, I can then assure everyone the server will point to the right one!
BTW, here is screensot of my domain’s DNS details:
You can do what you want (as long as your ISP doesn’t decide to shut you down!), but a home router-modem isn’t good for reliable connections and response times with thousands of connecting users. The master server might be fine for a lower number, but a large number of users hitting it every 10th second will cause your 'net connection to suffer.
@orb : again, I wish to test this to see how my network handles it. true, home networks aren’t the best option in the world, but not everyone has a fibre-optic magician! (I wish I did… )
BTW, I worked out how to map it to a domain! (Actually, it’s a really n00b answer… ;)) I found out, facepalm that the router at home has port forwarding, and reading this: http://www.howtogeek.com/66214/how-to-forward-ports-on-your-router/ I worked out the basics of it. this means I can then map the public IP to the domains, then the port forwarding takes care of the rest.
Here is how I think it would work. also note: I changed the domain names, I now have two dedicated domains, one for the master server, and one for the facilitator. (masterserver0-bedroomlogic.tk and facilitator0-bedroomlogic.tk respectively) I might also set up a connection tester in future…
the user connects to the internet with the game. (let’s assume my current game project, “ZAPPI” is being used to connect.)
the parser in the network code retrieves the public IP from the DNS service at feenom.com (dot.tk domains are stored here) the router’s port forwarding “forwards” therequests to the correct ports. (in this case, 4**** for master, 4**** for facilitator)
the IP is retrieved, a connection is made, and the master server registers the correct hostdata: DONE
This is how I think it works. please feel free to correct me if I am wrong.
EDIT: Removed the port numbers for security reasons…
Ok, for some reason, facilitator pings, but ms0-bedroomlogic.tk doesn’t…
maybe I should wait for DNS records to update? the facilitator ponts to the netgear router, (and thus, my Dell Mini 9) but the masterserver pops up 202.136.40.61, (NOT my public IP) now what?
BTW, if the same IP address but different port number is port forwarded, does this cancel each other out? I am confused a lot right now…
EDIT: I also found the facilitator won’t connect in-game. how to use the public IP? (or, at least, basic instructions on what to do to port-forward the router to my computer?)
My current port-forwarding setup:
External start port: 42000
External end port: 42100
I think the problem is here:
Internal start port: <same as external start. maybe it should be different?>
Internal end port: <same as external end. maybe it should be different?>
The ping is probably lacking because your modem-router blocks some or all ICMP packages.
Port forwarding is just what it implies: One range facing outwards is translated to a potentially different range on an internal computer. It’s a bit of a headache to figure out sometimes when modems have different labels for everything. The simplest and most dangerous solution is just to stick your server in the DMZ, if your modem has that option.
I also noticed that common network debugging tools simply won’t use that domain name. I think that may be a problem, because you lose a ton of tools which could aid you in setting it up.
I had a look around at DMZ type hosting, and it appears that might be the way to go, if it directly exposes the computer to the internet, as that is most likely the problem. (TOO MUCH… SECURITY!!!) It runs Linux, and being that it is there purely to be a game server, an attack from transmitting to my laptop probably won’t happen. or so I believe…
BTW, I figured out the URL problem: the .tk domains hadn’t actually updated the DNS records yet… And that resulted in some weird issues! I found the new domain (ms0-bedroomlogic.tk) didn’t work yet, but the older one (masterserver0-bedromlogic.tk) was somehow found in the DNS records. (of course, it timed out on the ping command) I also forgot to name them MS0 and FACILITATOR0 respectively!
And the assumption that network debug tools won’t use it… is somewhat wrong. I was able to ping the facilitator URL just fine.