Search Unity

Create a very large star-field like this

Discussion in 'World Building' started by Belcherman, Aug 12, 2018.

  1. Belcherman

    Belcherman

    Joined:
    Jun 7, 2017
    Posts:
    30
    What are the basics of creating a star-field / background like this for a game?


    I also like the top down ship movement as well; are there any tutorials on how to do that?

    I am thinking that the star-field is one big terrain with different layers and items in those layers? If the ship reaches one of the borders I can make it bounce back or wrap to the other side.

    Thanks for any help in advance:)

    SOCIAL MEDIA:
    FACEBOOK PAGE: https://www.facebook.com/BelchingToadClan/
    FACEBOOK GROUP: https://www.facebook.com/groups/614266642021792/
    TWITTER: https://twitter.com/btcToadClan
    TWITCH.TV : https://www.twitch.tv
    WEBSITE = http://www.BelchingToadClan.com
    Videos = http://www.youtube.com/user/belcherman
    Steam Group = http://steamcommunity.com/groups/BelchingToadClan
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    8,331
    Looks like just an image to me. In a 2D game, you'd probably make that as a big sprite (or a set of big sprite tiles, if you need it much bigger than the screen).

    For ship movement, just update the transform.position in the Update event of your ship-control script. That's a very general answer, I know, but then you didn't ask a specific question. ;)
     
    Belcherman likes this.
  3. Belcherman

    Belcherman

    Joined:
    Jun 7, 2017
    Posts:
    30

    Yeah oops, more details would help :)
    Basically similar ship movement as shown in that game. The playing area would be more than one screen, think of a big terrain or giant square playing area. In a way, the ship probably wouldn't be moving but the playing area would be as it is huge. I would spawn things all over this playing area but the only parts visible at anytime would be where the ship is and what is visible to it in the current playing area. I could fly fly all over this huge area and engage enemies or items as I encounter them. Sort of like if you were playing World Of Warcraft and in an area like Elwynn Forest, it is huge but you would only see the area your player is in at a given time but able to travel around to all parts of it.

    Does that makes sense?

    Thanks for the answers BTW:)
     
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    8,331
    OK, so in that case you definitely need the background to be tileable (and you could just repeat the tiles as needed to create an infinite plane). The world too, and all the stuff in it, will need to be divided into chunks, so you can load only the chunks near the player. Probably you'll want to keep all that data in a database, so you can quickly access what you need for any chunk.