Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

100 levels and continued...

Discussion in 'Game Design' started by Job_MTalha, Jan 24, 2021.

  1. Job_MTalha

    Job_MTalha

    Joined:
    Jan 14, 2021
    Posts:
    61
    Hi, I have seen this question alot on the web but couldnt find the appropriate answer relative to my situation.

    I am making 100 levels of a 3D game using probuilder and poly brush, I am using probuilder to make different Race-tracks for a racing/shooter(third person) game.

    In each level there is a different Race-track's (pattern) that I have to navigate, In the Starting levels there are no enemies, But as the player goes to the next level, the difficulty increases and now there are enemies spawned that you have to shoot, now there are potholes, boxes, old man walking etc, ppl shooting at you etc.

    Now there are two approaches, using prefabs to load levels, XML stuff (which I have no idea how to do as i am just starting out) and make a different scene for each level.

    In all the levels, The race-track changes in pattern, there are different race-tracks environments (desert, snow, mountain, etc) there is a day and a night mode. The track meshes materials change in some levels, i.e formula 1 track, Simple Road, muddy track etc...

    Kindly Point Me in the right direction, how do i go about designing the game.
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,541
    The easiest and probably fastest approach is using jsonUtility. Please search keyword. There is plenty discussion and Unity documentation.
     
  3. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,840
    Well, he's going to have a hard time storing his probuilder/polybrush racetracks in JSON.

    I think, especially for a beginner, the easiest approach will be a separate scene for each track. Prefabs would also work. These are basically equivalent; use whichever one makes most sense to you.
     
    Ryiah, angrypenguin, Martin_H and 2 others like this.
  4. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,494
    This isn't a particularly detailed description, but it sounds like exactly the type of thing that Unity scenes are meant to handle. If you make your own data system that can handle all of this you're just re-inventing a scene system. Use the one that's already there. :)

    There are a couple of things there I'd bundle into a single shared scene:
    - The same track in day/night mode is probably lighting and material swaps. I'd do that in a script, not by hand-maintaining two different levels.
    - If you have tracks which are variations of each other with different paths blocked off I'd do the same thing. Have a script which says which obstructions to disable when the scene loads based on the selected track variant.
     
    Ryiah and Job_MTalha like this.