Ground collapsing where you walk.

Hello I’m planning to create a small game were you can walk around in a small arena.
While walking the ground should collapse under your feet.
I’m wondering what would be the best approach to do this.
I don’t really have a lot experience with Unity I made like 2 small games with it.
But I’m fine with programming I’m just looking for something that I can do some more research on so I can get started.
I’m not really asking for a fully working example I just need some inspiration to get started.

Some ideas I had are:

  • Modifying the Terrain in unity I saw some things in the asset store that were able to create holes and things in terrain.
    But I have like no clue how to do this myself.

  • Using small blocks and generating the arena in a loop and just place a lot small blocks.
    The only thing with this would be the texturing.
    Like is there a way I can create like one big texture and that each block only uses xx part of the texture. So let’s say I have a texture from 1014 pixels and I put a field of 256256 small blocks that each block gets 44 pixels from the main texture.
    So basically just some sort of sprite system.

  • And then the last idea was to use something with voxels and just use 1 big block and use voxels to create holes in the box.
    But same for this one I don’t really have a idea how to start with this.

Once I can modify the terrain I will be fine with doing everything else.
I need to get started on this project in 1.5 week and then I only have 2 weeks to create the entire game including modelling. So I hope someone can help me out here.

If there are any questions please let me know.

You could have platforms made of boxes that are about the width of the players, or half the width of players, and each one of those boxes could hold a texture. Sure, it wouldn’t look perfect, but it’ll work.

Then you could use OnCollisionExit to detect when a player has stepped off of one of the boxes, and then have it add a rigidbody to the box, with “Use Gravity” checked, and it’ll fall down. (This is just for cool effect…)

if you want the player to fall with collapsed floor if he don’t move away after few seconds instead of using “OnCollisionExit” you can start coroutine timer that will add the rigid body after say 2sec. if the player still stand on the same spot he will fall with the collapsed floor…