![]() When the client needs a new piece of the map, it tells the server, with details like how much it can see, and the server responds with data based on what it knows about that client. I believe it's something along the lines of the client asking the server for a specific set of data as it needs it, with some overflow outside of the visual range to give a bit of a buffer between moving from a known and visible part of the map to another. well previous method also does allow that but to much lesser extent). Last method is just to send all events to every client on the map level which is the easiest, but makes client to get a lot of unnecessary packets and also provides opportunity for making cheats (2d equivalents of wallhack. I wonder if BYOND does use this method and if so, what's the best size of chucks to create? I guess this is the correct approach, but it also gets more compliacated and less efficient if client's view can be changed (i.e from like 11x11 to 31x21 tiles). It makes client to get more info than needed but you only need to look for objects in few places. The next method is to divide map by multiple chunks (just like on the screenshot) and send to user info about all new objects and old objects updates (if they moved/ changed) from chucks overlapping client's view (red dotted area). The first thing that came to my mind is to just have double for loop and scan map for objects that are in client's view, but I guess it isn't very efficient method :( Lately I've been working on my network multiplayer game in Python (tile based) and wanted to make networking more efficient, so that player only gets positions of objects in his view (view, just like BYOND's client.view is changeable in my game). I don't create BYOND games anymore but I am still interested in how BYOND handles things internally. ![]() Hello, It's been long time since I've been here. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |