A question about Ports
-
So, I've been an active MU*er since the 90's, but not very active in the community before. Like most of us, I've been toying with the idea of creating a game for a while now, and several ideas are starting to come closer to the startup phase.
The question I have regards Ports on a game. Some hosts offer lots of extra ports for connection and I was wondering what can be done with those extra ports. Specifically, can the extra ports be used to run game grids that are parallel or alternate realities of the main grid? So, if you had a range of 10 ports, could port 1001 be Modern Earth, port 1002 be an Earth where the Axis won WW2, port 1003 be an Earth where the British empire never fell, etc. Also, does each port automatically use the same grid structure (same room descriptions and layout), or can there be different grids on different ports? I know it sounds like a very complex way to go about things, but I'm thinking about the idea of growing a larger game centered around alternate realities where there can be multiple versions of the same character without the problem of conflicting object names on a grid.
-
@Runescryer
MUXes listen on a single port per instance. So you could have a Modern Earth on 1001 and a Alt-History earth on 1002, but they'd be different games. Different grids, different code, etc. People would have to log in to each one separately as though they were separate games. -
That's what I was thinking of and planning around. Thanks.
-
I hear some people even run a clone game on a different port for development/experimental purposes! Of course such practices are just crazy.
-
You can also use iptables to make the same game available on multiple ports. This is useful to allow people to get on the game if your main port is blocked by corporate firewalls.
In the realm of total weirdness, with a combination of iptables and softcode you could actually have the same game vary depending on which port the player connected on. Roughly, when the player logs in, code could set reality levels or other things based on how they connected. This probably would be nothing more than a novelty and might cause more trouble than it's worth.
-
Could characters connected on different ports interact that way? Because that would be boss.
-
/sbin/iptables -t nat -A PREROUTING -p tcp --dport 8000 -j DNAT --to-destination :7777
This is what I have in my startup scripts. If the connection is destined for port 8000, change the destination port to 7777. The game only runs on 7777 and everything is happening within that one game,. You can map as many inbound ports to the game port as you like.
Being able to differentiate between connecting on one port versus another requires extra trickery and it's probably better just to do only soft-code things to have multiple realities within the same game.
-
@Sponge said:
/sbin/iptables -t nat -A PREROUTING -p tcp --dport 8000 -j DNAT --to-destination :7777
This is what I have in my startup scripts. If the connection is destined for port 8000, change the destination port to 7777. The game only runs on 7777 and everything is happening within that one game,. You can map as many inbound ports to the game port as you like.
Being able to differentiate between connecting on one port versus another requires extra trickery and it's probably better just to do only soft-code things to have multiple realities within the same game.
The problem I'm trying to avoid is conflicting object (including character) names. It would be easier to just have everything on one port, but how do you avoid conflicts that happen with 4 or 5 versions of the same character on at the same time? Especially with logins?
-
@Runescryer it would require a lot of softcode.
On the other hand Evennia does this out of the box.
https://github.com/evennia/evennia/wiki/Sessions#multisession-mode
-
@Runescryer said:
@Sponge said:
/sbin/iptables -t nat -A PREROUTING -p tcp --dport 8000 -j DNAT --to-destination :7777
This is what I have in my startup scripts. If the connection is destined for port 8000, change the destination port to 7777. The game only runs on 7777 and everything is happening within that one game,. You can map as many inbound ports to the game port as you like.
Being able to differentiate between connecting on one port versus another requires extra trickery and it's probably better just to do only soft-code things to have multiple realities within the same game.
The problem I'm trying to avoid is conflicting object (including character) names. It would be easier to just have everything on one port, but how do you avoid conflicts that happen with 4 or 5 versions of the same character on at the same time? Especially with logins?
I can't speak about other platforms but for MU, the name and alias being unique within the database is a fundamental assumption of the software. You could do trickery to make unique names look non-unique in softcode (Sara-smith and Sara-jones could both show up in +who in as just Sara) but hard-code like page and mail won't work as desired.
You could tie multiple, separate games together by using either a bot to relay/synchronize data across or pointing multiple games at the same MySQL database. I've never used MySQL with MU. In the past, having one game at MySQL was a recipe for game-crashing hilarity. Now it's more sane for a single game. For multiple games, any code accessing the DB would have to be written with assumptions of concurrent changes in the DB and changes in the DB that the game didn't cause (because a different game did).
There used to be the concept of disparate games forming portions of a larger universe. BAMF used to be a thing: http://www.catb.org/jargon/html/B/bamf.html
-
Sara-smith and Sara-jones
Unrelated, but a weird question. Does MUX not have player_name_spaces as an option?
-
CoolMud is distributed and allows you to walk across different servers, and carry objects and execute code across servers. The softcode is similar to MOO.
-