ID:156983
 
Basically it will be a "game" that is more like a hub/lobby, it will list my games (that will be made later) and the servers available

I have found that Export and Topic will help with telling the hub/lobby what servers for each game are available but have not yet figured out how to display them, the plan is to only need to update the hub/lobby when I new game needs to be added to the hub/lobby

What I have so far in the communication:

world/New()
..()
Export("[GameHub]?RealmAero:[world.address]")


for the games and

world/Topic(T)
if(findtext(T,"RealmAero:") == 1)
//Something
else if(findtext(T,"Game2:") == 1)
//Something else


for the hub/lobby

How do I improve this? Can anybody help me code the hub/lobby?
To be honest, I used a MySQL database when I did this.
Every game would put an external IP address in a given table when it started and was ready to be accessible. Instead of having the game lobby query periodically to update the table, I would actually regenerate the list every time someone accesses the list (I have a separate window for servers, and it's shown at a button press), which isn't very often, so it just updates then. It's not the best solution, but it's my favored one.

In addition, I never actually let the games be visible on the hub, I made everyone route through the lobby, however, that was 'cause it was an RPG that requires character reaction.

-
However, to do it the way you're doing it, you're going to want to set up the topic data more like this:
"[gameName]?serverName=[myAwesomeName]&serverAddress=[myServerAddress]"


I feel like this would be better because anyone could name their server whatever, instead of you having the names be restricted and etc.
In response to DivineTraveller
I see where you are going with that, I agree with the server name and with the game visibility part also

How would I change the Topic() proc in the hub/lobby?