fredi-68 / luswca

Remember to put full project title here
GNU General Public License v3.0
0 stars 0 forks source link

Properties/Building #30

Open fredi-68 opened 6 years ago

fredi-68 commented 6 years ago

haHAa

gud mem

fredi-68 commented 5 years ago

seriously though, aside from the technical implementation, how are we going to handle properties? They are handled as individual instances so we need to spawn world server instances each time a player wants to visit a certain property. Since we also need to initialize this instance with the data from the user generated content, the easiest way to store player properties would be as separate zones. All of them would share the same zone.json meta data, but have an additional folder for user generated objects. We could load those using a script, perhaps by attaching it to the zone controller. Alternatively we could just use the world script once that is implemented. This means we'd have to save both the original brick by brick model as well as a file containing information about the object (such as attached behaviors). For the model the most logical idea would be to use lxfml files as the original server did. We will probably need to both parse and write LDD data at some point during property building anyways so we'll have an implementation of the file format. This means, once a player requests access to a property, the server would have to look up the corresponding zone and load it, query all user objects, initialize them, parse the lxfml data and somehow send all of that to the client. Another issue occurs if we are managing multiple property servers. In this case, the zone has to be loaded from some sort of central data server, which means we'd have to make the zones use some easily downloadable format. Just using a ZIP archive should work well here. This however means that we will have to support loading a zone from a ZIP archive in the zone loader, so the respective code will have to be slightly changed.

fredi-68 commented 5 years ago

with the orchestrator service implemented, querying all UGC becomes as simple as adding another RPC endpoint which returns an archive containing a list of files describing the property, as well as meta information like the ownerID, which is required for the world script to function properly. In production, this would most likely be directly sent to some sort of database solution like S3

fredi-68 commented 5 years ago

zone preparation script is working, loading battle instance/boss battle/claimed on AG Block Yard is fully implemented. Building however does not work as the client does not recognize the property as claimed even if set as such. More research required.

fredi-68 commented 5 years ago

Figured out some more stuff related to property building. Apparently there is an item called a property deed. This item is a certificate of ownership over a property and is required to build on it (at least I have not been able to get the client to build without it). As this items objectID is used to determine the property, all messages referencing it must provide the same ID. Which brings us to the main problem: How do we determine the ID to use if our item IDs change with each login?