I’ve seen a lot of people talking about @arthuro555 THNK extension today. It looks exciting but I don’t know how to get started. I’m pretty overwhelmed with questions.
Sorry, my question was really dumb. I’m trying to use the example @arthuro555 made. But I don’t know how to connect clients to the same server for actual multiplayer. There’s a lot of rooms in the example so I don’t know which one to go to. Any clues?
Connecting players together is left in part to you, the creator, as to not limit you. You ahave to first chose an adapter, in the latest version of the example released yesterday, there are both local servers (Geckos) and P2P adapters present.
With the geckos adapter, you can start a local server on your machine with the “Host a server” action. That server works just like if you were launching a minecraft server on your machine - you can connect to this server using your machine’s IP address and the port of the server. This can be done with the “Connect to remote server” action.
With the P2P adapter, you need to first connect to a broker server, and start a server with the “Start a server” action. Then, you need to display your P2P ID in some way. To connect to the server from another computer, simply connect to the same broker server, and use the “Connect to server” action with the P2P ID of the server.
Geckos is more suitable for games like minecraft, or games where you host a server for all of your players.
P2P is more suitable for LAN-like multiplayer (except it also works outside of your LAN :P) or games like among us, where youwant to be ablet co connect to a friend using a small code instead of an IP address.
Only when connecting, but anyone with your P2P ID caan initiate a connection and thereby obtain your IP. Just make sure you treat your P2P ID as you would your IP address
First, you would need to make a distinction between server and client. There can be only one server that must be started before clients connect to it, the other players need to all be clients that connect to the server. So you would need to add a button that allows a player to start a server in either a “Waiting room” scene or into the game directly, and wait for the other players to join there. You should display the P2P ID in that other scene.
In this connection scene, you can get rid of the stuff to get your own P2P ID - Just make a text input object that allows to input the P2P ID of the server, and simply connect to it when the connect sprite button is clicked.
Hello,
Thank you @arthuro555 for this great approach!
I’m trying to run the example from preview #3.
I preview ServerQuickStart scene, then ClientQuickStart, but it doesn’t add a client or throw an error.
ServerQuickStart hosts Platformer and ClientQuickStart stays gray.
What did I miss?
Switching between the geckos adapter and P2P adapter
I cannot really help if there are no error messages, as I cannot replicate this issue on my machine, so that is alll the advice I can give, I am afraid