Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Rope saving and restore by Json
#10
(25-06-2024, 09:58 AM)josemendez Wrote: That's predefined in the scene then, right? Like, your game has a set amount of levels that contain the amount of ropes and their start/end, you're only interested in storing/sending/loading the state of each rope?

You'll need to store blueprint control points as well anyway, so the start/end points of each rope will be stored in your JSON. At this point you can probably just have one scene in your game and store the entire level setup in JSON.


Sure! let me know if you need further help Sonrisa

Yes, because there are many ropes that need to be solved, I used an object pool to cache these ropes. But when creating ropes in advance, there is no need for specific shapes, so only the start and end points are given to temporarily fix the ropes. From a coding perspective, it is also to ensure that the blueprints created at runtime are successful, just like applying for space for positions, at least two points can represent a rope/line. Then, when facing data representing different shapes, reuse the entities of these ropes and set the positions in the blueprint. This is the final function I need.

I will try the solution you provided for me above, and if it is successful, I will come back to share the method and tell you the good news! Lengua  You've made my day, sir. Have a nice day!
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