How do I save and load maps without arrays?

0 favourites
  • 7 posts
From the Asset Store
Template for a generic save / load system, fully documented in comments and video
  • I'm making a game where every universe is generated randomly. For example, lets say player is in universe A (universe layout), and the player lands on one of the planets in Universe A that the player has never been to. How would I randomly generate objects to the (Planet Layout) and save all the planets objects, positions, variables, in case the player decides to visit this planet again?

  • Have you tried the save and load action?

  • arcab072081 Yes I did, but it layout overwrites the existing objects in the layout.

  • why you don't wan't to use array?

    if you generate terrain in tilemap (or not) or other stuff, the array will help you to save all data... for example, if a player visit a new planet, when the terrain is generated, you can save it and reaload when the user go again in that planet with a if condition:

    if the savegame of that planet exist, load it, if not generate a new one.

    arrays are very poweful especially to save data...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is what I did:

    At the end of every layout it SAVES via the "System:Save" action. And on the "Start of Layout" for the menu I use the "System:Load" action. Where am I going with this.. well. I found out a great way to make the Save and Load work perfectly with ONLY the variables in the Game. Make groups with the objects you don't want to save. In my case this was everything. In the group behavior just make them "No Save". This wont save any of the other stuff you don't want.

    That was just to sort your save errors out. I don't know about the rest. I hope that helped anyhow.

  • Ribis

    I don't want to use arrays because arrays are confusing. I tried learning arrays from tutorials and youtube, but every single time I can't get them to work properly or I get different results.

    For example, I watched this video on youtube:

    https:// (addyoutubehere).com/watch?v=TolEm2EXWPE

    On 6:50 notice how the array was printing catdog together and then catdoghouse, etc. Well my array was printing one word at a time e.g cat dog house instead of cat catdog catdoghouse.

    Here is a capx of my array example:

    https:// (adddropboxhere).com/s/qblc3au0k7a55vy/arrayexample.capx?dl=0

    Please Note remove the spaces in the links! Sorry I'm not allowed to post links until I get 500 Rep!

  • SkyLionGames

    Well, now I don't have so much time to see the videos... but I make a easy example for you..

    with this, you can save a tilemap (you can draw, select the colors...etc) save, and load.... you can also save a file to see how is saved that file..

    this is not an array, but the array works similar....

    I will make another example with array when I have time

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