Aaditya Parashar
Full Member
Just somebody with an abnormal coding routine.
Posts: 127
|
Post by Aaditya Parashar on Feb 26, 2024 13:30:48 GMT
I recently made an Air-Hockey game, and my friend gave me an idea to make it multiplayer. But the challenge is to host a server which is not local, since QB64 examples only show local hosts. If anyone knows how to open hosts to the internet, please help.
|
|
|
Post by bplus on Feb 26, 2024 17:52:56 GMT
At first I thought QBJS but you need same server hosting both players in the same game. Don't think QBJS is up to that??? ask dbox
|
|
dbox
Junior Member
Posts: 89
|
Post by dbox on Feb 26, 2024 22:57:04 GMT
At first I thought QBJS but you need same server hosting both players in the same game. Don't think QBJS is up to that??? ask dbox No, since QBJS runs in the browser that wouldn't really be a feasible option for hosting a game server.
|
|
Aaditya Parashar
Full Member
Just somebody with an abnormal coding routine.
Posts: 127
|
Post by Aaditya Parashar on Feb 28, 2024 14:14:15 GMT
Can we not include a c header file and code some stuff through there? I don't know much about that...
|
|
|
Post by Ultraman on Feb 29, 2024 13:06:37 GMT
Check out Fellippe's code for "Amongst". It was going to be an Among Us clone. He wrote code for a server application that I hosted on my own server over the internet and the clients would communicate with my server for multiplayer. I don't know Fellippe's GitHub but that is where you would find it.
|
|
|
Post by bplus on Feb 29, 2024 13:24:35 GMT
|
|
Aaditya Parashar
Full Member
Just somebody with an abnormal coding routine.
Posts: 127
|
Post by Aaditya Parashar on Feb 29, 2024 13:47:18 GMT
It's just working on localhost. No luck yet...
|
|
|
Post by commandvom on Apr 19, 2024 11:21:55 GMT
Hi Aaditya, I have been working on a multiplayer game project, here is the source code with resources, etc., you can take a look at it to see if it can be of any use to you. The code is compiled in an old version of QB64 (0.954), and the client part and the server part are in the same code. The compilation is for Windows SO... drive.google.com/file/d/1l96Z_j92JMh9mhBqqKw6lFfGH-40WNEb/viewAny questions, I will answer them with pleasure! the proyect is running on: aetricia dot ddns dot net
|
|
|
Post by Ultraman on Apr 19, 2024 13:23:48 GMT
Look up "No IP DDNS" on Google. You can set up a DDNS for your computer to open it up to the internet with its own unique hostname. Of course, you'd have to open up the ports on your router for the game's communication. I used to do it for Fellippe's Amongst game by using my computer as the US server for the game. It's super simple to set up.
|
|
|
Post by commandvom on Apr 19, 2024 14:34:11 GMT
I have contracted a VPS (virtual private server) with a fixed IP that never changes, where I put the server program. And from the client I connect to that fixed IP, and to a particular port. To do it on your own PC, it is a little more complex but it can be done, as Ultraman says, you could install a No-IP application (DUC No-ip and register into No-IP website) to obtain a fixed URL (public IP > fixed URL), and configure your home router , to forward requests to a certain port of that URL fixed to a certain private IP:port on your PC. For example here a screenshot of my router configuration, when I was testing with my pc as a server open to the internet:
|
|
Aaditya Parashar
Full Member
Just somebody with an abnormal coding routine.
Posts: 127
|
Post by Aaditya Parashar on Apr 20, 2024 6:46:35 GMT
I really appreciate your suggestion Ultraman, but the fixed IP address method will not work for me, because I cannot change my router settings. I will surely look into the code provided by commandvom. I haven't looked into a program this big.
|
|