Person In this devlog I’m making a couple New Movement abilities and procedurally generating some floating islands to use them in there are a lot of procedural generation tutorials online so finding one specifically for floating island shouldn’t be that hard I already found this Unity answers question that has 168 People following it so surely it has the answer I’m looking for or not so that wasn’t done but this one looks promising 153 people following question was upvoted and code was included and the reply is have you considered not procedurally generating your procedurally generated floating island this question asked by please help me Has over 700 people following and an accepted answer maybe it will be of some help actually this answer isn’t half bad marching cubes are definitely a valid way to go but I prefer to take a different approach I’ll start by pretending I’m just making standard procedurally generated terrain this will Be used for the top of the island once that is done generating the bottom will be a breeze the island making process starts by generating a bunch of random points within a square if they are within the lines that Define the Island’s boundary they are kept otherwise they are tossed these points Are then turned into triangles using a free triangulation Library found finally I use another Free Library to generate noise that determines the vertical offset of the Island’s vertices that gives me the top of the island but I still have to make the bottom I could Do it by flipping the top of the island over the x-axis and stretching it vertically but that only works if the island is flat near the boundary since I want to generate islands that aren’t flat all around the sides I have to go with a different Solution by Blending between the top and bottom noise functions based on the distance from the island boundary the top and bottom parts of the island will line up with each other no matter what noise functions get used I also spent some time making various modifiers that I can add to make the Islands more interesting these modifiers do things like Terrace the island add height to the center of the island rotate the horizontal coordinates of the mesh around the center Etc after this I was happy with the variety of shapes that the island could take but it felt Like the coloring was a little Bland so to spice things up a little I randomly darkened and lightened some triangles my first few attempts left much to be desired but eventually I got it to a halfway decent place until now all the islands I’ve generated have been in the Shape of a circle so I wanted to test that mesh generation works on concave boundaries as well to generate the boundary I use the dreamtech splines asset to make a boundary in the shape of a boomerang to my surprise the master generation worked on the first try but As soon as I wanted to add some more points to the island to smooth the transition between the top and bottom the triangulation Library mysteriously failed after spending a few hours trying to debug the library I came to the conclusion that would be faster to just redo the triangulation completely using A simpler grid-based triangulation method that didn’t need a library my first Triad in either looks exactly like the islands I was generating before just make sure you close your eyes before looking at it my second attempt at least vaguely resembles the island I’m going for my third attempt is almost there but a Bug makes the bottom and the top of the island not line up my fourth attempt finally Works although I quickly realized I’m not done just yet when using random points in the triangulation the result mostly follows the shape of the boundary but when using a grid the Result looks blocky at the edges the blockiness of the island can be fixed by moving the points that are outside the boundary to rest exactly on the boundary one quick code change later and the island looks like a circle or not seems I flipped a sign somewhere let’s try that again And now there’s an inexplicable flat part on my circle hopefully this won’t take very long to fix [Laughter] [Applause] Now it’s time to tackle something that has been bothering me about the blending between the top and bottom of the island for a while my current method of blending ensures that there are no gaps in between the top and bottom but it also ensures that near the boundary the island will be Very thin to the point of flat I can remedy this by horizontally offsetting points near the boundary away from the island and I flipped a negative sign again I think that’s a little too much offset now my lined up edges are gone this next change will fix it Wow more gaps it’s done it’s still not done now it’s done after this I added some randomized studio to the vertices of the island to break up the uniform look of the terrain what the sides of the island completed it’s time to spruce up the top with some Vegetation and rocks for this I use the technique of poisson disc sampling which ensures that fandom points are at a minimum distance from each other so that they don’t overlap to test that the positioning is working right I summoned an army of Bob across the landscape or At least I tried to the Army cover is only about a quarter of the terrain my second attempt works a lot better and now my enemies must tremble before the might in my Army would be crushed anyways since I know the random Point placement is working properly I can Extend the spawning system by allowing different types of game objects to randomly spawn in proportion to their specified weights objects have spawned with randomized rotation and scale further improvements will be needed eventually but it’s a good start I can also use the spawning system on the bottom of the island to automatically Spawn grappling points now I can finally test the grappling hook I made in the last Dev lock properly some problems are immediately apparent Bob shouldn’t be able to Grapple through the top of the island while standing on it once on the bottom of an island it’s Impossible for him to get back up the grappling hook in its current form works great for traveling horizontally or downwards but not really upwards making matters worse having a camera that is angled above the player doesn’t work well when the player is hanging off the side of an island the top of the Island keeps getting in the way luckily these problems aren’t too difficult to solve I added a raycast from Bob to any nearby grapple targets ensuring that the player can only grapple targets that they have line of sight to the problem of being unable to get back on an island Is easily solved by giving Bob a dash ability when the dash button is pressed while grappling velocity is added to whatever Direction Bob is facing the dash can also be used when moving around on the ground to fix the camera issue I added a second camera that aims more from the bottom When the player grapples the Target that is above them the view blends to the bottom camera when they stop grappling The View slowly pans back to the top camera another movement ability that the current environment is screaming out for is paragliding luckily malber’s animal controller pack comes with a good set of Gliding animations as well as a glider model so soon enough I have Bob gliding between islands and style the glider works by applying a variety of modifiers to the character controller the most significant two are the reduction to maximum velocity and the reduction to gravity one unintended side effect of the Gravity modifier is that gravity is reduced even when the player is traveling upwards which means deploying the ladder right after boosted grapple shoots the player High into the sky this isn’t very physically realistic but it’s fun so I’m keeping it the two islands I currently have in the Scene are fairly close together but my end goal is having islands that are spread a lot further apart I want the majority of traversal between islands tap and using the movement abilities I’ve already implemented so I’m planning on using a series of very small floating islands scattered throughout the sky to Serve as grappling points between the main islands I used the island generator I already have to make the small island you see on the left but found I didn’t like the look of it very much the generator is better suited for large islands so from my initial test I used The islands you see on the right which is just a rock I turned upside down then I procedurally spawned a bunch of them around the other main islands eventually I got tired of staring at the default Unity Skybox all the time so to improve the visuals I imported the Cozy Weather pack into my project it immediately improved the look of the game there are a lot of different parameters to tweak to achieve different effects it also has a built-in day night cycle after all that work I took a much needed break by gliding around the scene unfortunately the scenery didn’t do a Very good job of distracting me from all the bugs I’ve been putting off fixing so in the next Vlog I’ll be fixing those as well as adding some new time abilities why is it coming out of his Video Information
This video, titled ‘Procedurally Generating Floating Islands | Devlog 1’, was uploaded by Bob’s Mud Hut on 2022-10-10 23:21:18. It has garnered 114373 views and 7411 likes. The duration of the video is 00:08:32 or 512 seconds.
In this devlog I procedurally generate some floating islands and give Bob a paraglider, as well as an awe-inspiring dash ability.
Join the game’s discord here: https://discord.gg/wNHCwBzZG8
#unity3d #devlog #gamedev #indiedev #proceduralgeneration #dreamgame
Assets I use: Note: The below links to the Unity asset store are affiliate, which means I might make money if you click on them and buy something. There is no additional cost to you.
Kinematic Character Controller (free): https://assetstore.unity.com/packages/tools/physics/kinematic-character-controller-99131?aid=1011lqTTS&pubref=ytdev1
For multiplayer I am using the very excellent (and free!) FishNet networking library: https://assetstore.unity.com/packages/tools/network/fish-net-networking-evolved-207815?aid=1011lqTTS&pubref=ytdev1
Everyday motion animation pack (paid): https://assetstore.unity.com/packages/3d/animations/everyday-motion-pack-116611?aid=1011lqTTS&pubref=ytdev1
Animancer Pro (paid, there is also a free version with less features): https://assetstore.unity.com/packages/tools/animation/animancer-pro-116514?aid=1011lqTTS&pubref=ytdev1
Cozy Weather (paid): https://assetstore.unity.com/packages/tools/utilities/cozy-weather-2-230502?aid=1011lqTTS&pubref=ytdev1
Dreamteck splines (paid, not as necessary now that Unity has a free package for splines but I think this package still has more features than Unity’s one): https://assetstore.unity.com/packages/tools/utilities/dreamteck-splines-61926?aid=1011lqTTS&pubref=ytdev1
Synty dungeon realms (paid): https://assetstore.unity.com/packages/3d/environments/dungeons/polygon-dungeon-realms-low-poly-3d-art-by-synty-189093?aid=1011lqTTS&pubref=ytdev1
Links to music I used so I don’t get a copyright strike: Music from Uppbeat (free for Creators!): https://uppbeat.io/t/kidcut/jazz-and-hop License code: AJJF8FII0XDYEWUV
Music from Uppbeat (free for Creators!): https://uppbeat.io/t/prigida/holding-you License code: XMZTFFACZGGPC5KS
Music from Uppbeat (free for Creators!): https://uppbeat.io/t/prigida/cozy License code: MZFLI4WQNRBFEYFB
Music from Uppbeat (free for Creators!): https://uppbeat.io/t/fe77a/vacation-collective License code: Q0TA1ZZSCVHHWWXP
Music from Uppbeat (free for Creators!): https://uppbeat.io/t/giulio-fazio/epic-choir-of-the-damned License code: 52SNX17EOYX4E9TI
Music from Uppbeat (free for Creators!): https://uppbeat.io/t/giulio-fazio/dance-of-gypsy-monkey License code: HTIWAQWOTKEVRQBG
Music Title: Fluffing a Duck Artist: Kevin MacLeod License: CC BY 3.0 (http://goo.gl/BlcHZR)