[Suggestion] Per-world entity pools and processing - Printable Version + open.mp forum (https://forum.open.mp) -- Forum: open.mp (https://forum.open.mp/forumdisplay.php?fid=40) --- Forum: Questions and Suggestions (https://forum.open.mp/forumdisplay.php?fid=42) --- Thread: [Suggestion] Per-world entity pools and processing (/showthread.php?tid=1071) |
Per-world entity pools and processing - IllidanS4 - 2020-04-29 I have suggested this before on Discord, but I feel this should be properly laid out and discussed here as well. This suggestion is motivated by the needs of my server, but I hope this will be useful to a wider range of servers as well. There is a limit of 1000 objects and 2000 vehicles. This limit is client-side and cannot be circumvented. A streamer can be used to give the illusion of having infinite entity slots to use, while still only showing a limited amount of them to players; however, this feels like an overkill to me when you actually don't need to be able to display seamlessly thousands of objects to players. I suggest a lightweight alternative to classic streaming using virtual worlds. This has the following specifics:
RE: Per-world entity pools and processing - EvilShadeZ - 2020-04-29 This sounds interesting, but I'm not a fan of this entirely replacing regular kind of streaming. It would work for servers that are based on regular SA terrain, but when mapping custom terrain, those maps can easily be over 10000 objects each causing objects not to be created anymore. Some interiors showcased on this forums are at least 500 objects each therefore I don't think you can rely on the default limit alone. If this was implemented (and forced) would outright ruin so many unique servers that require that kind of streaming. As an alternative to regular streaming it does seem interesting enough and I wouldn't mind it, but 1000 objects per world is nowhere near enough. As for exposing the ID's to the client, I don't think most (players) actually care about that. I've got people struggling reading Command syntax messages, let alone their ID's. RE: Per-world entity pools and processing - BigETI - 2020-04-29 I kinda disagree with arbitrary limits on entities. open.mp manages to split the concepts of how a client deals with entities and what the server actually contains. Right now the client that can be used to connect to open.mp servers (SA:MP client) has arbitrary entity limits and there is of right now no way around that except we would have to write an actual open.mp client (will be surely developed when the server part has been released). It is understandable that you do not want to render/stream a fuck ton of entities to a player at the same time, though there should be no argument to not have theoretically infinite data container elements, and only elements streamed that have the highest priorities. If you have a random set of entities in a container, there no one stopping you from using parallel operations to stream them. Parallel libraries are designed to deal with iterating through large random sets efficiently. RE: Per-world entity pools and processing - Freaksken - 2020-04-29 What about servers using virtual worlds for minigames aside from the main gamemode, in which each minigame is linked to a specific virtual world? A minigame can have more than 1000 objects, thus more than 1000 objects linked to that virtual world. Dividing this minigame into multiple virtual worlds would just complicate things unnecessarily ... RE: Per-world entity pools and processing - IllidanS4 - 2020-04-29 To provide more background: my server allows players to reside in custom virtual worlds where they can build their own maps. Manipulating IDs is quite common and simple, but for the reasons I've already mentioned, the IDs must be consistent. If a player sees an object with a specific ID, they must be able to use that ID for manipulating the object, and they also must be able to tell that ID to others who can see that object. You'd be surprised how many people can quickly grasp this concept. Without this feature, open.mp would be simply unusable for me. Now this is tied to the limit of 1000 objects, which also provides a convenient way to stop the server from being overloaded by user-made objects. I also use the streamer in cases where larger maps are created, but working with the standard static objects is more convenient. I have modified YSF to allow selectively showing "global" objects to players, so I can simulate objects being visible to specific virtual worlds. I don't know if there is a better solution to the same requirements, but this is what I have settled on. Now this system is fine, but there is this thing affecting all entities that their global pool is limited, while only a section of them is displayed to a particular group of players in a single virtual world. I could spend some time reimplementing the system based fully on player objects, but I thought this could be nifty to have as an option. RE: Per-world entity pools and processing - BigETI - 2020-04-30 You can still implement your own containers where code already exists for them and manage how entities are streamed to players where code exists for them as well. open.mp will allow to do that once it has been released, because then it will be open source. There is no need to implement arbitrary limits into the core, because that would literally limit the capabilities what your server could do. |