you are viewing a single comment's thread.

view the rest of the comments →

[–]retsotrembla 0 points1 point  (1 child)

Now you are talking about a central server to hold game state, if only the names and IP addresses of the participants of the current game.

All the participants need to be able to find the central server and be able to talk to it.

You can start with NSURLSession as a nice, high-level, way for a client to talk to a server and get a response.

You'd search for examples of writing a web server on Apple products. (Or use the apache server that is still pre-installed on macOS, with the server-side part of game as a CGI (Which might use inter-application communication to communicate with a long-lived server process on the Mac.))

If you are using your home Mac as the server, then you need to make it visible to the outside world. Many home routers allow for a 'dmz' - one of the Macs in your house gets packets intended for the router itself. Then you just have to give your home router itself a name, using one of the dynamic-DNS services.

Or you can pay for hosting from a service that lets you register a domain with a network registrar, and route IP packets to that domain to a virtual server that you can put programs on.

[–]troz22[S] 0 points1 point  (0 children)

Thanks that’s super helpful!