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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Generating tiles/blocks around player

Discussion in 'Scripting' started by TempexX, May 28, 2020.

  1. TempexX

    TempexX

    Joined:
    Jul 28, 2017
    Posts:
    2
    Hey Developers

    I am currenly working a project which involves some sort of cube generation. My issue comes when generating these cubes. As help, I've linked to a "Roblox gamemode" which has the system/feautre I'm looking for. As the following video shows the system have several features

    • Starting of by generating cube surface (so that only the surface is generated)

    • Then by mining down, the system knows where the missing block should go and creates a random block in that current spot, but doesn't overlap the excisting ones.

    • Third, the system then makes 5 blocks/cubes around the player when the player is mining down, so that their mining path is there, but the cubes always surround the player by 5 blocks.

    I've tried looking into different solutions, but cannot figure out a way, that isn't laggy...

    Thanks in advance!!
     
    Last edited: May 29, 2020
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,971
    Check out any one of the hundreds of "how to make minecraft in Unity" types of Youtube videos... I imagine they would contain enough discussion to make this game as well, which as far as I can tell from the video above is just a simple single mechanic of minecraft.
     
  3. TempexX

    TempexX

    Joined:
    Jul 28, 2017
    Posts:
    2
    Hey Man, thx for the fast reply!

    Sadly Minecraft doesn't do as same as the video shown above. Minecraft load certains chunks, where we want to make the blocks generating as you go (as shown above)