Make a persistent game world

Get help using Construct 2

Post » Fri Oct 04, 2013 6:46 pm

SO I was considering doing a sort of sandbox environment with a game I am working on. I have no intentions of going to a mobile platform so that optimization is of no concern to me. I am not quite sure though on what would be the best method to go about it.

Right now I am thinking of making one big layout and filling it like a jigsaw puzzle. Reason for this is I have a bit of a game world that I would like to persistent.

I though of doing each "Puzzle piece" as a different layout for optimal memory usage but I am not sure how I could have that piece persist when the player is not active on it. I know I can save it's last state when the player leaves and reload it, but it doesn't really give a living world feel if you leave that section for ten minuets and on your return everything starts going from it's last spot ten minutes ago.

I am trying the first method right now and it's going pretty well, I am having a lot of unnecessary sort of static objects destroy or shrink when the player is off its screen. I just want to make sure I am not going down a bad path once I add more to it.

Has any one attempted a sort of living world before with construct, and if so what's the ideal method to go about it?
B
9
S
3
G
2
Posts: 51
Reputation: 1,522

Post » Fri Oct 04, 2013 7:12 pm

you can update the saved state if it is stored in a global variables. For example you could set up a system-tick function that every 10 seconds updates things. the trick is knowing how you want the layout to be changed when the user isn't there.

B
7
S
3
G
1
Posts: 184
Reputation: 1,352

Post » Fri Oct 04, 2013 7:32 pm

@rho Hey now I hadn't thought of that! That could be an option, just a bit tricky like you said :p.
I guess my big problem would be getting objects to move freely from one layout to the other, which would be possible with your method just a lot more work around.

Given me something to think about! I am just really curious if anyone has done something like this in construct and the general way they did it.
B
9
S
3
G
2
Posts: 51
Reputation: 1,522

Post » Fri Oct 04, 2013 8:53 pm

In my example I had to switch between locations very rapidly with more than one units under players control, so @rho 's advice it was not an option to me. So I did a very large layout, limiting the movement of camera according to where the player was. This cost me performance about pathfinding behavior, but other things went rather well. I have now reached an acceptable performance when I removed invisible sprites that had some movement cost.

Probably be able to show it of in a couple weeks...
B
18
S
4
G
1
Posts: 332
Reputation: 3,149


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests