I’m working on a tiny side project as a prototype for a future project I’d like to work on. It’s a game where you build skyships and explore different sky islands with friends, complete quests, etc.
I am wondering how to procedurally generate the sky islands. I want to have different monuments across each one and they should all be different shapes and size and in different positions in the world. Heres an example of one I built by hand:
This isn’t really the place to request entire scripts.
On a side note, I actually made something that does basically this:
The difficulty comes in making them all not look the same.
This isn’t really something that has an easy solution.
I would recommend instead creating a bunch of island models by hand and cframing a clone of them into their respective positions.
I don’t really think this is requesting a script. I think they’re looking for methods to generate something like this. You can’t CFrame terrain and that wasn’t really helpful to their question.
As for the OP, I would personally recommend looking at Roblox’s terrain plugin as it might contain some useful code for biome selection. Googling for terrain generation also isn’t too bad of an idea. There are some very detailed topics online.
Usually math.noise would be used for flat terrain but since you’re going for islands you’d probably only use it for the surface of the island. You can apply some smoothing around the edges, give bottoms to the islands, and generate small caves in the islands. Again, Roblox’s terrain plugin might be good to look into.
Starting basic doesn’t hurt either. Once you’ve got some island shapes you can move on to generating more complex features in the islands.
@dispeller your game is cool but it’s not really much like what I’m looking for. I’m not asking for an entire script, either. Just some pseudo code.
I want smooth terrain island generation that can spawn little monuments on islands, trees, rocks, overhangs, hills, holes like in the example in the OP, etc
@Hexcede I’ve already tried to Google but so far can’t find much that will help me. How would I even generate a basic island shape?
For object spawning RayCasting would most likely do what you want. Roblox’s Random object can also help.
Determining islands’ center points would probably done the same way. Then you can determine a basic shape for the island using math.noise (probably using some kind of threshold), give it some heights again with math.noise, and give it some rotation.
Then you can use some smoothing to smooth the edges of the terrain and give it some curves (or maybe spikes) on the bottom of the terrain. Again you can smooth this out so it matches up better with the island.
Well math.noise gives you smooth values between x, y, and z changes so your island can use a threshold value from math.noise to determine the island shape. That’ll give you a relatively roundish shape.
The X, Y, and Z of the island position can be your noise inputs according to the docs math.noise returns a value between -0.5 and 0.5. You can have a threshold to determine the shape of your island. For example, if the value is above 0.4, you could generate terrain there.
Most terrain generation uses perlin or simplex noise. These noise generators produce smooth values very much like hills or mountains.
No it would not give a cube. Try visualizing the values returned by math.noise. make some parts for a 2d range in a map and then set their height to the output of the noise function.
Noise is random, but it is basically smooth randomness.
You can use a threshold. If the value returned is high enough you could generate terrain there. You can adjust the threshold and the higher the number the smaller area will be generated. Too low, terrain will connect. Too high, terrain will be too small.
You would use a threshold value. The noise function when graphed looks like hills. That’s why it’s used in terrain generation. If you cut the top off of a hill it’ll look kind of circular.