Helloöooooooooooooooooo. I've been working on a game and the main aspect is multiplayer, and since I knew nothing of making a multiplayer game I had to do some research . I found out about sock.lua, getting updates to match all clients , etc, blahblahblah, etc.
So then I got a local connection and the game ran with the server (playing as the client too) .
I've read that to get a proper server for actual use you need to pay/rent on( or make one yourself, but that costs too and is bothersome) so I don't really know how/where to start with this.
Is here a free server available for games to use?
How do you implement it in, does the server run the game or what?
Getting a server for a love2d game
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Gunroar:Cannon()
- Party member
- Posts: 1143
- Joined: Thu Dec 10, 2020 1:57 am
Re: Getting a server for a love2d game
You need to either run the server yourself, or rent one.
To run it yourself: have a computer at home online 24/7, and run your server there. It doesn't need any screen, mouse, or keyboard (after setting it up), and can be a cheap one like a Raspberry Pi.
To rent one: pay for a cloud VPS (virtual private server) instance. Providers often allow you to choose a flavor of Linux to install.
In either case, you make the server software just like you make the client, install it on the server computer, and leave it running there. Because the server is very game-specific, you probably won't find any off-the-shelf solutions, you'll have to write it yourself.
If your game is turn-based, you can get away with a much cheaper cloud web server instance. Learn the PHP programming language and write your server with that. Have the client talk over HTTPS.
To run it yourself: have a computer at home online 24/7, and run your server there. It doesn't need any screen, mouse, or keyboard (after setting it up), and can be a cheap one like a Raspberry Pi.
To rent one: pay for a cloud VPS (virtual private server) instance. Providers often allow you to choose a flavor of Linux to install.
In either case, you make the server software just like you make the client, install it on the server computer, and leave it running there. Because the server is very game-specific, you probably won't find any off-the-shelf solutions, you'll have to write it yourself.
If your game is turn-based, you can get away with a much cheaper cloud web server instance. Learn the PHP programming language and write your server with that. Have the client talk over HTTPS.
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Getting a server for a love2d game
Löve still doesn't have inbuilt support for SSL (and so, HTTPS); that'll make this a bit harder to do.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
- Gunroar:Cannon()
- Party member
- Posts: 1143
- Joined: Thu Dec 10, 2020 1:57 am
Re: Getting a server for a love2d game
Thnx...so if I get this right I should rent a server (how?), and then install the game there(...how ) and then write my own server code, I don't understand that part at all. Pls explain.
Oh, and is it possible to use p2p(peer-to-peer) instead and is it cheaper? Is that what among us uses(I don't think so, but just asking?
And concerning p2p, is there a way to do matchmaking of players without a central server (there is but all the ideas I've read about are ...confusing), so if anyone knows how it's done then pls say.
(Sorry for all the blabbing.Those are 5 question plls)
Oh, and is it possible to use p2p(peer-to-peer) instead and is it cheaper? Is that what among us uses(I don't think so, but just asking?
And concerning p2p, is there a way to do matchmaking of players without a central server (there is but all the ideas I've read about are ...confusing), so if anyone knows how it's done then pls say.
(Sorry for all the blabbing.Those are 5 question plls)
Re: Getting a server for a love2d game
Ohh yeah, damn, that's right.
There were a couple of creative solutions around the forum for that, e.g. a Steamworks library using FFI, and an operating system -dependent method. But yea that's an issue for security.
Google for cloud VPS or web hosting providers. Compare prices and features, pay online, and then each provider has their own web-based management panels for configuration. My website is on OVH.
Essentially, your love.update() loop, but in a separate instance on another computer. Then, using the magic of the Internet, receive input from clients, and send results back. The client instances send player input to server, and then display the result.
This is, I'm afraid, not an easy task by any means.
Depends on the method and provider you choose.
If web hosting, your server needs to be written in PHP, and installation is a matter of uploading the PHP file. Usually via FTP but some providers may have a web access panel.
If VPS, then your target system is a Linux box. You'll have SSH access and must install your server program remotely from the command line. Exactly how depends on the flavor of Linux.
Is possible, and is cheaper (free, in fact). But is much, much more difficult to get working, and is vulnerable to cheaters.Gunroar:Cannon() wrote: ↑Sun Dec 27, 2020 6:40 am is it possible to use p2p(peer-to-peer) instead and is it cheaper?
Yes, but now we venture deep into experimental technology. The BitTorrent network invented the Distributed Hash Table, or DHT, expressly for this purpose, through which they do peer exchange (PEX), i.e. decentralized discovery of other clients. But this is really, really, really advanced stuff.Gunroar:Cannon() wrote: ↑Sun Dec 27, 2020 6:40 am concerning p2p, is there a way to do matchmaking of players without a central server
- Gunroar:Cannon()
- Party member
- Posts: 1143
- Joined: Thu Dec 10, 2020 1:57 am
Re: Getting a server for a love2d game
...
...thnx for answering so much.
hmmm, since I have no cash I'll try to use p2p and I did see some sites that talked about it and it did seem advanced but I saw no implementation, so those anyone have the implementation (site) of matchmaking(I already implemented p2p...kind of)
...thnx for answering so much.
hmmm, since I have no cash I'll try to use p2p and I did see some sites that talked about it and it did seem advanced but I saw no implementation, so those anyone have the implementation (site) of matchmaking(I already implemented p2p...kind of)
- Gunroar:Cannon()
- Party member
- Posts: 1143
- Joined: Thu Dec 10, 2020 1:57 am
Re: Getting a server for a love2d game
Is it possible to have a site for the game where people post the IP address of a game they want to host?
If so is it advisable?
And how do you connect to an IP address over the internet(without a hotspot)?
If so is it advisable?
And how do you connect to an IP address over the internet(without a hotspot)?
Re: Getting a server for a love2d game
Sure, and it can be automated - i.e. a matchmaking server. If it makes your life easier, I can do this part for you.Gunroar:Cannon() wrote: ↑Wed Dec 30, 2020 5:31 pm Is it possible to have a site for the game where people post the IP address of a game they want to host?
If so is it advisable?
Good thing you're thinking about security. IP addresses are pretty public, I see no serious harm that can come of this.
TCP or UDP sockets, as provided by LÖVE. See the reference manual. For HTTPS we need another solution, though...Gunroar:Cannon() wrote: ↑Wed Dec 30, 2020 5:31 pm how do you connect to an IP address over the internet(without a hotspot)?
- Gunroar:Cannon()
- Party member
- Posts: 1143
- Joined: Thu Dec 10, 2020 1:57 am
Re: Getting a server for a love2d game
Thnx for the replies, Xii! Being really helpfül!
Woah, for real? How @nd when?
Re: Getting a server for a love2d game
Whenever you like. What will you use it for exactly?
Who is online
Users browsing this forum: Bing [Bot] and 4 guests