This probably could fit in with networking, but this more abstract design oriented than hard code.

Basically what I want to do is make a starcraft-ish type of PvP battle game, but I'm not sure how one would go about identifying other people online to engage with. I was thinking you could log on and arrive at a splash screen with a list of players online, then click on a player's name and they would get a challenge message. However, I would like to do this without a server so getting all the players into a list would be difficult. I know with RMI there is a registry, which is basically a phonebook with all the active machines, is there something like that in the regular networking api?

This probably could fit in with networking, but this more abstract design oriented than hard code.

Seems the best place is here .

Quote

However, I would like to do this without a server so getting all the

Um, you want a lobby-server system without a server? .

Seriously, why do you want to do that? e.g. this is impossible on the internet, since you will need to broadcast your **** (that's what the network owners will call it the first time you start ping-flooding their nets) over everywhere to find your servers - unless you use a global standard locator service, which itself probably uses servers, or have some kind of centralized locator - in other words, a server .

Obviously, if this is only for LAN play, then you can spam the network all you want (unless you don't actually own it, in which case you might still get into trouble...)

Quote

players into a list would be difficult. I know with RMI there is a registry, which is basically a phonebook with all the active machines, is there something like that in the regular networking api?

Arguably, RMI *is* the "regular networking". Unless you're using J2ME or similar. It is part of J2SE...

Certainly, there is nothing else in J2SE (it would be duplication of effort ). RMI is technically part of a DOA = distributed object architecture.

I doubt RMI's quite what you want though - unless you have other reasons for using RMI anyway. If you don't, then it's kind of like using a sledgehammer on a small nail; yes, it works fine - but it's way more than you need for the job .

If you wrote a game similar in quality to starcraft, you'd have little trouble finding someone capable of hosting a server for you, which you'd have have to have a server, even if it was provided by a third party service like gamespy or kali or one of those, you'd still have to build one.

A match making service is a pretty simple thing, basically as simple as chat, and that's if you want to be friendly about it. You could create one using a scripting langauge (servlets, php, perl, etc), basically anyone wanting to host a copy of your game, would request a page on your server that pointed to the script, and anyone wanting to join a game would create a connection to the same place, and get a list of server IP's. You'd need a server, but the server hardly does anything, the actual hosting of a game could be done by the people playing your game (peer to peer or server centric).

Using a setup like this, the match making server would do very little work, require only a small amount of bandwidth and next to no CPU power, as the person who chose to host a game would probably assume all the workload of the game they create.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org