Need a little bit of advice. I want to layout a maze - type level. I don’t want to do anything complicated at the moment. I just want to use crates to act as the walls of the maze and force the player to follow a specific route.
Can I use the terrain editor in Unity to “paint” the maze with crates? Or do I need to write some sort of script that will generate the maze? Some suggestions please.
Do you want to manually create it (i.e. from a fixed diagram, image in your head, etc), or do you want the maze to be random?
If it’s a manual process, I highly recommend DeleD CE (http://www.delgine.com/). It’s free and awesome. I used it to lay out the dungeon levels in my RPG - similar to mazes right? - and it made life extremely easy for me.
If it’s random mazes you’re after, then you’ll need to build it from components via code.
Actually what I really want to do is something a little bit like minecraft. Have a scenario where the player starts in the middle of a space (say 1000 x 1000) and they are pretty much surrounded by cubes that they can ‘dig’ through.
I’m keeping it pretty simple because I have figured out how to allow the player to ‘destroy’ an object by hitting it. So I want the player to be able to dig tunnels through the cubes. Obviously using a crate texture is wrong but I haven’t found an earth texture yet and I just want to get the mechanics right first.
So going back to my original question - what’s the best way to create a space covered in cubes that the player can interact (i.e. destroy) with? Can I use the terrain editor to paint 1000 x 1000 of the same object quickly? Or do I have to write some code?
not the terrain editor, but you could put one of your cubes in the scene, select it, and duplicate, next you select both cubes, duplicate and select the resulting 4, select the 4, duplicate… etc. You can get a geometric expansion soon enough, say you got to 1024 cubes, next iteration is 2048… how fast this is to render without unityPro is another question altogether
Kanly - thanks for the advice. I will give this a go at the weekend. Maybe 1,000 cubes is a few too many for a prototype, just 100 x 100 would do to get me started.
JTown - do you have a link to the Minecraft starter kit? I did a quick Google search but turned up nothing.
Remind me to package up and post to the asset store my maze generator editor widget script; it randomly creates mazes up to 100x100 in size, and builds the polygon objects. I can speak from experience that you cannot use the terrain system to make a proper maze - too many limits on it.