Make a persistent game world

0 favourites
  • 4 posts
From the Asset Store
Like tourists, Travel around the world as fast as you can!
  • 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?

  • 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.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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...

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)