I've been thinking about a sharding system for a while. By sharding, I mean breaking a server into smaller segments, while all the servers hold a small chunk of the world.
This may or may not be possible with BYOND, depending how far I take it.
I've seen many suggestions on how to do this, but people get confused as to which one anyone is talking about whenever this subject comes up, so... I'm going to try to outline which ones I've seen mentioned, and we'll refer to them by number here out.
Method #1.) A server has regions. Each server basically has the same essential "code" and the object trees are almost identical (Except for local NPCs, monsters, etc.), but the map is different, and there is a possibility of different icons on each server. Think of it like this: In a real life game simulation, you could split the united states into several servers, either by state, or by continental region, or by whatever method. Let's take the state method. The servers would contain all the neccessary objects of all the other servers, but the maps would be different. Kansas, has no beaches, thus would need no beach icon, or beach turfs, while Arizona would need desert icons for some regions of it. The server for Kansas would still contain the code to manage rapid dehydration due to being in a desert, but would not implement it. When travelling from state to state, you save the players' character, export the savefile to the server, and then dump them over to that server. They load up in that character, at the train station, or airport.
If this is a bad example, I have no other way of explaining it any better, so you are going to have to bear with me. The point is, each server has its own map, and the code and icons are almost identical between them, with a few differences.
Method #2.) The server is the same on all servers. Map, code, icons, everything, but it is split into several small "hub servers", which can support about 20 people. When more than 20 people join one, they dump the other players over to the other. The tricky part of this, is every so often, each server tells the other server what is going on. If a monster spawns in front of castle A, all the other servers make an identical monster in front of their respective castle A. Plus, players that are not actually on server 1 are represented by "dummies" on server 1. Every time the player moves, the server is given a message, and it moves that "dummy player" to where the player moved. This method would take a lot of work. This may not be possible with BYOND.
Method #3.) The server is again, the same on all servers, but this time, each player has their own server. they are hosting, but nobody can join their game. Each server sends messages to a "central server", which only records the locations of active objects and NPCs in the world. This server also functions to coordinate with the other servers and synchronize all actions. This method, also may not work with BYOND.
Method #4.) This is exactly the same as Method #3, but has something called "Peer to peer communication." You know Peer to Peer File sharing? It saves the server a lot of space and work, while allowing people to communicate and share things over the web. This is essentially the same idea. Rather than send a message to the central server so it can send messages to each player, who may not even really have to know where one specific player is at a specific time, We have players send messages to those nearby, and then the central server, so that when that information is requested, it can be supplied.
Let's say player A moves. He is in sight of player B and player C. Player A's server sends a message to Player B's server, and to player C's server. This tells it to move player A's "dummy mob" on each. After those two messages have been dispatched, player A's server sends a message to the central server. This records the position of player A for later use. Now, let's say player D logs in near where player A just moved. Player D downloads all the information from the central server, and is shown player A. Now, what if Player E, a friend of player D teleports to player D? Player E's server has no idea about player A's new location. The central server will also update him.
This method should be possible with BYOND, it is just a matter of finding an efficient way of doing it.
Any thoughts? I know that you can combine the approaches listed, such as you could make a Method 4 combined with a Method 1 easily. Oh, and by the way, for any of you who think none of this is possible, or just don't have any idea, look up "world.Topic(), world.Export(), world.Import(), client.Topic(), client.Export(), and client.Import()" in the reference... I just want to know if anyone has thought about doing this. I would very much like to do this, but my aim right now is to create a .dmp loading system, and a dynamic resources cache to reduce the size and lag of worlds...
I know this is a lofty goal, but I'm starting small. I'm trying to make a single player game that implements a netchat system. Basically, it connects to a central server, sends the messages they type to it, and it sends the message to all servers that aren't ignoring the user, and are connected. If this works, I might try to find a way to do some of the things listed above...
Just a thought... I think a lot, sorry...
~Ter
ID:153209
![]() Sep 23 2004, 9:20 am
|
|
You didn't read all of my post, Mech. I mentioned to look up "world.Export() and world.Topic()" That is how one server contacts another.
Actually, I think Method #2 is the hardest one to implement, simply because it also requires dummy players, and it also requires server communication about 20 times per second. I personally like the combination of Method #1 and #4. It is one of the harder methods, but it is still possible. I think you didn't read all of my post, or I just garbled it up pretty bad, as all of those methods involve server communication, and you claimed it wasn't possible, while agreeing that method #2 is possible... O_o Anyway, my point is, I think all of these methods are possible, they just require some badass server management, and a big, buff server machine or two... A Linux server machine... This isn't really what BYOND was meant for, though. BYOND was really meant for MUDs, and recently has been extremely useful for "minigames", (E.G. Chess, Una, Incursion) I don't think the system was meant for dynamic maps, and large, persistent worlds... Except in a MUD, that is. I do hope BYOND goes this direction, though. I'd like to see it much more professional, and capable of much, much more. ~Ter |
I don't have a clue why you would want to do it!
Here's my method, that seems to do all you want it to do and a lot better: Everyone plays on the SAME server, y'know, like every other Byond game. Isn't that what Byond was built for? Please explain if I'm missing the point. |
If all programmers had your attitude, we'd still be writing programs on audio cassette tapes. No offense, but the attitude of "We got what we got, we are going to do what it was meant to do, and nothing more." is not exactly a progressive attitude. How much do you enjoy playing a laggy game that the world is so spammed up it is hardly possible to play? This could quite possibly completely remove that problem.
~Ter |
I plan to go with option 5:
Multiple servers hold different instances of the world, similar to how MMORPGs do it now (yes, I know that each "server" is actually a server cluster). Players log in to a character server which has access to the character save files. From this point, a new character may choose a server to join. An existent character logs into whichever server they were made on. Each server has a "population cap" that once reached, closes that server from new players. An example might be 100 characters for a BYOND server. Based on the assumption that no more than about 20 people will be on a server at a given time (on average), this would facilitate about 5 time zones. I'm actually planning on using a system similar to FFXI to keep the server loads balanced: random world at chargen. The idea is that when you create a character it's assigned to a random world (usually the least populated at the time). There would be ways to assure your character of which server it will be created on, but it will be based within the world itself. Using this system, server loads would be fairly well balanced. Assuming that a popular BYOND game has about 100 people that play it with about 25-30 on at a given time, if you had 5 servers you shouldn't break 20 characters per world. Not exactly what you were looking for, but it's how I plan to deal with server clogging. |
[Moderator edit - Quote snipped. Please don't use "Reply with Quote" for quoting the entire post, if the post is a long one; it wastes forum storage space, and makes people scroll down further than necessary to view the contents of your post. Reply with Quote is provided so that you can reply individually to selected pieces of text. If you're not going to do that, please just use ordinary Reply. Thanks!]
I think Method #1 would be best the rest seem boaring. As for your single player game idea sounds like you kinda wanted that byond hub files thing. All though if Im not mistaken thats been taken down due to the byond bandwith problem. Uhh I thought up of a plan which took 2 days it is called InterCon! The Inter Connection between you and your friends :) *que happy music*. Yea right any way like the rock said to the branch "It basically would use a php and sql web server to be its main type of communication". As you said all you wanted to do is chat with the other people playing the game right? So all you would have too do is just have the webserver hold a file thats updated every time a person logs on or off the game. Thus changing that file. This file would hold the peoples uhh address or what ever the heck you use to communicate between servers I dont know. Any who just load the address onto some list and then just send the AHHH SOS message using world.export? Thus every one playing that single player game could hear you. INTERCON Lighting the path to better communication! |
Ter13 wrote:
If all programmers had your attitude, we'd still be writing programs on audio cassette tapes. No offense, but the attitude of "We got what we got, we are going to do what it was meant to do, and nothing more." is not exactly a progressive attitude. How much do you enjoy playing a laggy game that the world is so spammed up it is hardly possible to play? This could quite possibly completely remove that problem. The first Zelda was wrote on a tape. It ruled. And still does. Anyway, it's only laggy if the programmer in question was a bad, ineffienct coder. Your solution looks to me like it would be incredibly complicated, forcing, for example, three indentical worlds to keep up with eachother in real time? That would cause loads of lag. If you want something more, go for Java, or another language. Byond was built for one server with many clients! |
I'd suggest a slightly modified version of method #1. Every server has the same dmb and rsc, but has different configuration/map files that it loads up.
I doubt that the other methods would end up being feasible(network lag, etc). |
The first Zelda was wrote on a tape. His point stands. We wouldn't have the Doom series, the Quake series, the Half-Life series, the Elder Scrolls series, the Final Fantasy series, or any other number of highly successful (and most of the time fun) games that are on the market today. People wanted to push the boundaries of technology, and were disappointed with cassette tapes. So they moved on to magnetic removable discs, and then hardware stacks of magnetic discs... and kept on improving. Modern games, as I've seen, take up an average of 1.5GB of space (based on a limited sampling). The Commodore 64, on the other hand, had a whopping 64KB of space -- certainly a lot more than most of the games at the time could take up, but far too little for a great simulation. It's possible to say that games back then were distilled entertainment: no fluff, all gameplay. But while gameplay is very important, fluff is still good. I love Frontier: First Encounters now, for instance, but would I love it if it were at an even lower rez than 320x200? Probably not. Would I love it more if it were at a resolution as high as 640x480, or even (oh, the amazing possibility) 1024x768? You betcha. If you want something more, go for Java, or another language. Byond was built for one server with many clients! I wouldn't say that. Dantom wouldn't include server-to-server technology with BYOND if they hadn't intended to have people interconnecting between them. Heck, the Blue Book/DM Guide even has some fairly intimate explanations of the world connection procedures. |
By god, he's right! I'm beginning to think that this is a serious possibility! chapter 12.6 and chapter 8.2
|
I've given lots of thought to massive online gameplay in BYOND worlds, and all the methods you've listed are great in theory, but BYOND can not currently impliment them in a seemless interface. I've been pushing for better world to world communications, but it's not a high priority.
Transferring between worlds only has one problem that I don't like. A popup comes up on the client's Dream Seeker asking them to verify the transfer. I can see why Dantom choose to let people know when they are being ported to a new world, but I think it interferes with the immersion in the game. If you trust the game enough to play it, you should trust where it sends you. A game that sends me to another game I don't like is a game that I'll never play again. I like the dual world systems best, where clients each have their own world running that interacts with the other worlds. (Client/server is best. If you use peer to peer, cheating will be rampant. Sadly you can't trust clients with anything more than I/O, and you still have to be careful with that!) The current problem with this system is that BYOND doesn't support persitent world to world connections. That means that each time a world transmits new data to another world, it has to negotiate a new connection. Players behind firewalls who do not know how to properly configure them will not be able to recieve data from other worlds. With a persistent connection, the firewalled player can connect to the server and the server will be able to continuously relay information back to the client. I suppose you could set up your client program to poll the server for updates. |
i, too, have tinkered around with this idea in a previous thread some time ago- [link] "client/server, or server/server for space sim?" - feel free to read through that and see if anything gets the brain cells going in the right direction.
|
I'm not sure if the "Dummy Player" would work with BYOND, because how is a server supposed to contact another server?(If world.(worldvar) fails?) You'll need a very complex code for that.
My 2 cents would be: What if the game was placed across a few different servers? EX: World 1 Server A , World 2 Server B. Player beat World A, Player is sent to next World.
I've had thoughts of this too. ^_^ But with the little I understand in DM, Its just not possible for me at the moment.