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?
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:
I feel like this would be better because anyone could name their server whatever, instead of you having the names be restricted and etc.