Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Rope saving and restore by Json
#4
(25-06-2024, 08:29 AM)josemendez Wrote: What's your use case? Why are you using JSON to serialize this data?
I've reflected on it, and there are probably two main reasons for using JSON to store and restore ropes:
  1. Before I was preparing to implement the function of restoring ropes with data, I saw the above two posts in this forum. They all used the method of particle positions to restore the original shape of the rope, and from the responses in the posts, they seem to have succeeded. In addition, after using the Obi Rope plugin, my understanding is that it only requires basic particles to draw a complete rope.

  2. This reason is more important. Because I am developing a game that can be social in the future. For example, I made some complex entangled ropes, and when I want to share them with friends for decryption, I only need to serialize the rope data into JSON. Essentially, what is shared is just a string of characters. Others only need to parse the string when they open the game to restore the rope level I designed before. Because I was in a hurry to develop the function, I didn't spend too much time researching whether the blueprint could also achieve the function I mentioned above. My first intuition was that JSON is the most convenient and feasible, and the blueprint is limited by the serialization of the file (although when opening the blueprint with Notepad, you can see that the data stored inside is similar to what I need). If the data is based on the blueprint, then must it be shared through the server when sharing, because this is a file?
Reply


Messages In This Thread
Rope saving and restore by Json - by tapLucas - 22-06-2024, 03:32 PM
RE: Rope saving and restore by Json - by tapLucas - 22-06-2024, 06:37 PM
RE: Rope saving and restore by Json - by tapLucas - 25-06-2024, 09:02 AM
RE: Rope saving and restore by Json - by tapLucas - 25-06-2024, 09:31 AM
RE: Rope saving and restore by Json - by tapLucas - 25-06-2024, 09:55 AM
RE: Rope saving and restore by Json - by tapLucas - 25-06-2024, 10:26 AM
RE: Rope saving and restore by Json - by tapLucas - 27-06-2024, 11:54 AM
RE: Rope saving and restore by Json - by tapLucas - 27-06-2024, 12:59 PM