It's 2:30 in the morning on a Sunday, usually the time I get my best ideas. I read some notes on the Uplink bonus disc a few weeks ago. They mentioned an idea about having every player also act as a server so they only needed to have a DNS server to list online players and their IP's.
Who needs that? We already do fine without that! Think about it. What's the one thing we've all used (probably for stupid reasons) at some point in our lives? Torrents! What do torrents use? DHT! Why don't we use that same concept to replace a DNS server? All we'd need are a few people with a lot of players and everything would be running just fine.
Now for the actual operation. Obviously merging worlds would be a problem, and having a single base template would be utterly boring. A few years ago I tried to create a new style of roleplaying, which ultimately failed since only two people tried to do it. The idea was to create private rooms for every person playing, have a "baseline template" set to describe the room, then "modifications" set, to explain how it was changed. Upon first joining a roleplay, you'd read the baseline template for the room, then the mods. Later, you'd just have to read the mods to catch up on what's going on in the room. This would create a real-time persistent world without having to have someone hang around and constantly brief everyone or re-post everything. Reading a log could take ages, plus you'd know exactly what happened. The idea is to be able to walk into a room like you really walked into a room, so only being able to see what's happening right that second and react within a minute is important.
The same concept can be applied to Onlink. The game creates worlds the same way as it does in single player mode today. When it goes online and connects with someone, it downloads their world file and stores it somewhere. As you play with them live, changes are immediately sent over to a "modifications" file on the client side. This saves a lot of bandwidth, since only the changes need to be sent, not the entire state of the world. This would be repeated everywhere across all clients, each using a small list of pre-defined IP's to send it to, in order to keep from accidentally DDoSing every player.
The list would be created by having every client communicate with everyone in the swarm once a week and updating known static IP's. Those essentially become DNS servers. All the clients echo new IP's to the DNS servers, along with a "OAC" (Onlink access key, think MAC but for use with Onlink). Each OAC would be different in every swarm, so people with dynamic IP's can be properly identified. OAC's are generated upon installation and can be freely changed, provided they are accompanied by proper usernames and passwords.
The DNS servers would store the IP's and send all the dynamic ones out instantly, while syncing the static ones every week or so. They would also send additional data, such as when a Mod file is updated.
Upon first starting MMOnlink (I had to <.<), the client would prompt for another player to connect to. The client would ask them for the list of IP's and OAC's. Upon receiving the information, the client would attempt to connect to any DNS servers specified. Upon finding the first online one, it would download all Mod files (Just mod files) and store them locally. Once that's done, it's officially part of the swarm. Anyone connecting to the client would download the full world file and the required Mod file, and gameplay would resume normally (however any developers plan it, I'm just suggesting how connectivity works, not how the game is actually played).
Upon connecting with an offline player, the client would ask the DNS servers for the newest mod file. It would check in with all of them and keep looking for the newest timestamp. Upon finding the most recent, it would download it and resume gameplay as if the other person were online.
When the game autosaves, it would upload any modified Mod files to the DNS servers. They'd check in with each other and attempt to merge the worlds, using the timestamps of each activity within the Mod file (deleting logs, destroying computers, etc) and produce a Mod digest. This would be published to all DNS servers, and a signal would be sent to the client that had just saved saying it needs to redownload the files. The entire procedure would take about five to twenty seconds, so the autosave feature would have to happen somewhat infrequently. Finding a balance between live gameplay and actual gameplayability will be tricky, but I think it's doable.
The only downfall I see is a possible lack of active players. This could fail the same way my roleplaying idea failed. There has to be a substantial amount of players playing at the same time for the system to work. About fifty players or so should work best, though it can probably work with as low as ten, provided all players are on 24/7 in that scenario.
In summary, the client connects to a DNS server, gets a listing of all available IP's that it can play with and updates that list every ten minutes. Upon receiving a connection, it sends the person their Base World File if they don't have it. It's named with a unique identifier, the OAC. The requesting player then connects to the DNS servers to download the appropriate Mod file. If it can't reach any, it asks the client (you) for a list of IP's. If they're all still unreachable, it just takes the Mod file that you have stored locally.
Every time an autosave mark is reached, the client uploads any modified Mod files to the DNS servers. The servers immediately check with each other for Mod files with the same OAC and merge them. The Mod files are then sent back to the person who just requested to save, and gameplay resumes. Chances are the changes will be small enough that gameplay can continue without interrupting any longer than it would take to compress to XML, but there's a large probability that I'm missing something and gameplay would need to be paused until the operation finishes. I am writing this in the wee hours of the morning, after all. Perhaps if a service was installed along-side of MMOnlink so something like a fork() could be called in Windows...
There's two final things I'd like to throw out there. Firstly, I have absolutely no idea how this would be coded. I know it's possible, but I don't know how to actually do it. I'm not looking to become a developer or have my name listed anywhere in the game, I just want to throw an idea out there.
Secondly, I know I'm forgetting something important. I know I left a huge hole in this post somewhere, but I can't find it. I'm sure somebody will and that it'll probably get me a few flames. I'd appreciate it if anyone could point it out to me, preferably when I'm not drooling on my keyboard.
Wow. I just typed that in forty five minutes, without taking a single brake to stop and think about things. There's probably a mountain of errors here.. -previews, posts, faceplants in his puddle of drool-
|