generating worlds and saving it

  • I have a top view game project. I have space and there are a lot of planets in space, and space and the position of the planets are generated

    I want when I visit the world of the planets, then this cosmos itself retains its appearance and when I return to space, the planets also stand and in the very planet where I was still in the same place so that after I run to another the planet and explore it and then returning to the first planet again to continue there and the second planet also retained its content and did not make new ones.

    I do not know how to do it. using arrays is hard. Is there any other way or is there some kind of plugin for this?

    really need your help please help me

  • If the planets are in different layouts you can use the persist behaviour on objects so they are retained when you return to the layout. If you save the game using system save I think it remembers all persist objects as well because it just saves the current state of the game.

  • If the planets are in different layouts you can use the persist behaviour on objects so they are retained when you return to the layout. If you save the game using system save I think it remembers all persist objects as well because it just saves the current state of the game.

    I also want peace on the planet itself to be preserved but I do not know how to do all this

    help me please

  • please post examples

  • You're talking about a No Man's Sky type depth of game right with unique planetary systems and then you go to the planets and they contain unique objects. It's quite complex so you're going to have to get used to the fact that it won't be too easy to make.

    Whatever method you used to generate the planets, I'm saying if you give the object 'Persist' behaviour then it will retain its values when you return to it in a layout. Somewhere along the way I guess you would have to use arrays though.

  • You're talking about a No Man's Sky type depth of game right with unique planetary systems and then you go to the planets and they contain unique objects. It's quite complex so you're going to have to get used to the fact that it won't be too easy to make.

    Whatever method you used to generate the planets, I'm saying if you give the object 'Persist' behaviour then it will retain its values when you return to it in a layout. Somewhere along the way I guess you would have to use arrays though.

    can you throw me an example?

  • editor.construct.net

    he example is good, but how can I have in a single layout many worlds with their own features and positions of the Objects?

    I need just such an example

  • So you don't have a game yet? I thought you were just asking how to retain data that you already made. Sorry, I don't have time to make such an example as creating many worlds in a single layout with random generation. That's not really a simple thing to ask for.

  • So you don't have a game yet? I thought you were just asking how to retain data that you already made. Sorry, I don't have time to make such an example as creating many worlds in a single layout with random generation. That's not really a simple thing to ask for.

    I have already done a little differently.

    github.com/Roguelike2018/myprojectx/files/2872447/generator_test.3.zip

    How do you like that

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well this looks like something different, it is loading a save slot each time so it would be a different game and you couldn't share data across it. Looks like you will need arrays for this to store generated data, I would start learning from the manual and tutorials.

  • Well this looks like something different, it is loading a save slot each time so it would be a different game and you couldn't share data across it. Looks like you will need arrays for this to store generated data, I would start learning from the manual and tutorials.

    Firstly, to whom I have to transfer data, and secondly, I can’t definitely with the arrays, even if I read the textbook

  • Well the method doesn't really work for a game. If you load slot 1, then you have some planets. If you load slot 2 then you have some other random planets. But if you load slot 1 and play it and you have things like player health or items, then you load slot 2, you don't have this health or items it's a different game so it won't be continuous.

    It is a complex game, especially if you want it in one layout. Even if you store planet co-ords in an array and spawn the planets again based on these, you also need to store what happens when you enter one of these planets and then load that data too.

  • Well the method doesn't really work for a game. If you load slot 1, then you have some planets. If you load slot 2 then you have some other random planets. But if you load slot 1 and play it and you have things like player health or items, then you load slot 2, you don't have this health or items it's a different game so it won't be continuous.

    It is a complex game, especially if you want it in one layout. Even if you store planet co-ords in an array and spawn the planets again based on these, you also need to store what happens when you enter one of these planets and then load that data too.

    what do you suggest i do?

  • Try a simpler game idea ^^. You can store the position of planets in an array. As for the on planet gameplay, it depends what type of game it is but everything I see about procedural generation includes the use of arrays so you'll most likely have to use them eventually.

    Maybe you should chat with this guy: construct.net/en/forum/construct-2/your-construct-2-creations-23/dark-ages-spatial-roguelike-rt-141827

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