Best way to transfer physical objects between worlds?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Jugbot
Prole
Posts: 14
Joined: Mon Jun 24, 2019 9:54 pm

Best way to transfer physical objects between worlds?

Post by Jugbot »

So my game will have at least two gamestates: the game and editor. The problem is that each requires physics and therefore I need the main player character (the thing the user will be editing) to transfer between each gamestate's world.

Since the MPC consists of bodies and joints I can't think of doing anything except storing the structure of the character as some abstract data structure and recreating it when switching gamestates and updating it when physical parts change. Or possily I can just store all bodies/joints and use them as reference to rebuild the character (hence not having to worry about keeping a data structure up-to-date).

Is this the best I can do?
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Best way to transfer physical objects between worlds?

Post by raidho36 »

I would suggest simply using the same physics world. But otherwise yes, you must copy over the data.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 4 guests