Search Unity

Best practices to build a world for a Top-Down aircraft shooter

Discussion in 'World Building' started by devatc, Sep 23, 2021.

  1. devatc

    devatc

    Joined:
    Mar 30, 2019
    Posts:
    4
    Hello,

    I am designing a Top-Down aircraft shooter I want some help from the community on what are the best ways to solve the design problem of building Terrains for this type of game?

    First the requirements:
    1. The game is a Fighter Jet flying at a Max Speed of 1500 Km\h.
    2. The levels are supposed to be 8 minutes long.
    As long as the fighter jet has a Max Speed of 1500 Km/h I can asume that:
    • 1500 Km/h = 25 Km/m = 0.416 Km/s
    This means the jet is crossing the terrain at a speed of 416 m/s that is 416 unity units per second, the terrain size is calculated in unity units. (1 unity unit = 1 meter).

    That means I need a terrain of at least 25 * 8 = 200 Km long.

    How to solve this riddle in unity terrrain system? I created 2 large terrains each with a size of 100K Square Kilometers. Created a game object representing a plane coded the speed at 416m/s
    with
    Code (CSharp):
    1. transform.Translate(new Vector3(0, 0, 416) * Time.deltaTime);
    I crossed the whole 2 terrain patches at 8 min.

    Is this the right way to do it?
     
    Last edited: Sep 23, 2021
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    Anytime you get more than a few thousand units away from the origin you probably need to consider a floating origin approach. It's always easier to consider this from the start rather than trying to hack it in later.
     
  3. devatc

    devatc

    Joined:
    Mar 30, 2019
    Posts:
    4
    Thank you for the tip however I didn't get what you mean,

    I have strcutured the Camera movement likewise:

    Unity.JPG

    Doing this I move CameraParent and the Main Camera moves with it, the Cube represent the Jet aircraft as for now, my calculations above were right.

    Now I am going to the next challenge clamp the movement of the airplane based on screen resolution.