Insight needed - Making a space game

In the absence of two-way data binding in the engine I think this comes under the category of 'Possible, but painful to write and will reduce performance'. Keeping the two sets of data in sync is not going to be simple and it's not going to be fast, and you would probably be better just to keep the data in the main Blueprint since it's how UE4 is intended to work.

The basics of what I'm thinking is to have a series of Blueprint-based objects each representing cubic regions of space, for now these should basically just be lists of static objects in that region of space, later you can replace these with BP'ed planets and so forth with orbital patterns and everything else you need.

Constrain the ship to the cubic region round the origin, and make it so that when it leaves this region it actually appears back at the opposite side- basically creating a wrap-around space for it. Link this into the cubic regions Blueprints so that when it wraps all of the regions are moved to follow the ship's wrapping- so if the ship left the left-hand side of the constraint and so appeared on the right then all cubic regions move one section to the right. With this you keep the ship in the cubic region but are moving space round them.

Create a manager which will handle the regions of space. This has two roles, which could be separated into two classes if you choose.

The first task is to check that dynamic objects inside the cubic regions are still in the right region of space for their position and move them (with updated positioning) into the correct region of space if they're outside. This allows NPC ships, asteroids etc. to move through regions of space while keeping the regions accurate.

The second is to load and save regions of space to a backing store. I've not looked into this yet but here I'd be looking at the SqlLite support, basically caching the space data into a database when it's not immediately needed. This will need some way to convert the cubic region to an entry in a database, which will be a challenge, but will allow the space to be as large as you want.

No matter which approach you use though I wish you luck in your project, UE4 is fun but like all complex (and worthwhile!) things can be tricksy to get your head round at times.

/r/unrealengine Thread