Coding a destructible terrain system

Hey there, I’m trying to make a destructible terrain system for a game i’m making. I’m wondering if anyone would have suggestions on how to acheive something like this. Since it’s going to be based off of roblox’s current terrain system, I need a way to have “draggable” terrain. I’m thinking of using parts, but they wouldn’t have the shape of the terrain, so I would have to use meshes. Since roblox’s terrain is 4 x 4 x 4 studs resolution, it would be based off that. meshes would be preferable, because they can be accurately positioned. It would be like lumber tycoon 2’s system, but with terrain instead. I’m assuming I would have all the variations of terrain “connected blocks” in blender, then convert them into meshes, so it would be seemless. Any ideas on how to do this would be appreciated. thanks!

So you’re trying to create your own terrain system?

No, I’ve got terrain, I just need some sort of way to interact with it, in my case moving the terrain, by dragging it like the wood in lumber tycoon 2.

I know what you mean (I played lumber tycoon 2). I think thats possible to create but that would be extremely laggy because of all the frequent terrain voxel updates. Maybe you should try to make it so that players can simply add/delete terrain with tools or some kind of keybinds? Im not sure what youre trying to create, but you could try making it so that the players can drag around like a selection box, mesh, or some part, and then when they click it creates new terrain at selection box’s current position and with the size of the box.

I would probably have to do the terrain updating system for the client only (that way it’s not laggy for the server). maybe it only updates the terrain every 1/10 of a second, so it wouldn’t be too bad, but maybe the player can have to option of dragging it if they have a powerful computer, or just “loading it in”, like a dump truck, so that it makes lodgical sense, but it’s not just “break”, then “place”.

Once I make the game, i’ll post it here for you to see :slight_smile:

1 Like