Revamping Procedural Island Generation & New Player Controller | Unity Multiplayer Game Devlog #30

  Рет қаралды 13,098

Tom Weiland

Tom Weiland

4 жыл бұрын

In this Unity multiplayer game devlog, I revamp the procedural island generation system, put together a new rigidbody player controller and do tons of cleanup work.
Next devlog: • Implementing Client Pr...
Pirate game playlist: • Multiplayer Pirate Gam...
⎯⎯⎯⎯⎯⎯
Discord server: tomweiland.net/discord
Support me on GitHub Sponsors: github.com/sponsors/tom-weiland
Support me on Ko-fi: tomweiland.net/kofi
GitHub: tomweiland.net/github
Project's Trello board: trello.com/b/vJwk0iwS/pirate-...
Website: tomweiland.net/
⎯⎯⎯⎯⎯⎯
In this devlog, I revamp the procedural island generation system. I've been thinking about ways of making my terrain generation produce nicer islands, and in this devlog I finally implemented a much better version. The new system produces way nicer-looking procedural islands in Unity, and I'm super happy with the upgrade!
I also built out a new rigidbody player controller and I did tons of cleanup work, so the server transfer from console app to Unity project is pretty much complete now.
#Devlog #GameDev #IndieDev #Multiplayer #Unity3D
"Interplanetary Forest" by Meydän is licensed under a Creative Commons Attribution license (creativecommons.org/licenses/...)
Artist: / meydansound

Пікірлер: 117
@tomweiland
@tomweiland 4 жыл бұрын
What do you think of the new island generation? Do you prefer the sharp changes in color or the blended version (7:44)?
@dtbrown01
@dtbrown01 4 жыл бұрын
I prefer the blended version for sure. Great devlog as always :D
@muhseng9838
@muhseng9838 4 жыл бұрын
I prefer the blended (after) it look some realistic
@tomweiland
@tomweiland 4 жыл бұрын
@@dtbrown01 thank you :)
@tomweiland
@tomweiland 4 жыл бұрын
@@muhseng9838 well it's a relief to know that everyone (so far) prefers the blended version!
@xxzippyzachxx
@xxzippyzachxx 4 жыл бұрын
My vote is blended! :) xzippyzachx btw lol
@RugbugRedfern
@RugbugRedfern 4 жыл бұрын
That was a great choice for the first clip!
@tomweiland
@tomweiland 4 жыл бұрын
Haha did it get you hooked :P
@RugbugRedfern
@RugbugRedfern 4 жыл бұрын
@@tomweiland yep!
@TonsOfHunStudios
@TonsOfHunStudios 4 жыл бұрын
The island generation looks sick! I love that there are a bunch of options so that the island are truly unique. I also prefer the new system for fading together the terrain colors. Making the waves different in shallow waters seems like a nice touch too, and I'm excited to see that later. Great work Tom!
@tomweiland
@tomweiland 4 жыл бұрын
Thank you! Having smaller waves in the shallows will make a huge visible difference. Right now it just looks wrong with the them going right through the island :P
@DanielLochner
@DanielLochner 4 жыл бұрын
Great video Tom! Loved all the problem solving, and the island generation looks incredible! Keep it up! :D
@tomweiland
@tomweiland 4 жыл бұрын
Thank you, I'm glad you like it :D
@5headgames377
@5headgames377 4 жыл бұрын
Love your devlog, and your networking series was really useful. Implemented my version of networking in my projects using your videos, keep it up!
@tomweiland
@tomweiland 4 жыл бұрын
Thank you, that means a lot to hear :D
@kenorta56
@kenorta56 4 жыл бұрын
WOW welldone on the progress so far its looking amazing
@tomweiland
@tomweiland 4 жыл бұрын
Thank you, that means a lot!
@NeatGames
@NeatGames 4 жыл бұрын
Wow that looks so cool! Great job on the lowpoly design and the generation of islands! Keep it up and great Devlog series, I just started one too~ *subscribed!*
@tomweiland
@tomweiland 4 жыл бұрын
That's awesome to hear! Thanks for subscribing, and good luck with your channel :)
@reallocal
@reallocal 4 жыл бұрын
Nice, looking forward to the next one!
@tomweiland
@tomweiland 4 жыл бұрын
I'm glad you liked it-definitely going to take on the beast that is client prediction next week :P
@spherolly2374
@spherolly2374 4 жыл бұрын
excellent devlog! and we definitely need more pirate games!
@tomweiland
@tomweiland 4 жыл бұрын
Thank you, I agree :D
@casualdutchman
@casualdutchman 4 жыл бұрын
The islands look great! The only thing that makes it a little weird is the water. Maybe the height of the terrain can be used with the water. When the depth is low, meaning shallow water. The waves will get multiplied by a number lower than 1. When the terrain is above sea-level, the waves are multiplied by 0.1, meaning very low water. This would make the sea look a little better with the islands.
@tomweiland
@tomweiland 4 жыл бұрын
Yep, I talked about this in the video and was going to implement it, but then I realized that at this point incorporating that calculation in the wave equation would be very expensive, so I'm going to wait until I have an area of interest system in place which will help reduce how intense those calculations will be.
@arin_faraj
@arin_faraj 4 жыл бұрын
Awesome devlog
@tomweiland
@tomweiland 4 жыл бұрын
Thank you :)
@applespears569
@applespears569 3 жыл бұрын
Great video!
@tomweiland
@tomweiland 3 жыл бұрын
Thanks :D
@ncoll36
@ncoll36 4 жыл бұрын
Loving the new terrain, and yeah definitely blended all the way.
@tomweiland
@tomweiland 4 жыл бұрын
Team Blended 🙌
@mindjinx622
@mindjinx622 4 жыл бұрын
The idea for the moving platform was great, never seen that before!
@tomweiland
@tomweiland 4 жыл бұрын
Yeah there's so many questions about moving platforms online, and most of the answers recommend things like making the player a child of the platform, which is super inconvenient to say the least. What I've done with my ships is super clean and simple, and it works beautifully :P
@tylercode2905
@tylercode2905 4 жыл бұрын
At the end, I felt it when you talked about URP limitations.
@tomweiland
@tomweiland 4 жыл бұрын
Yeah, most things seem to be there, but there's a few specific things that are missing which you really only notice once you get into it :/
@tylercode2905
@tylercode2905 4 жыл бұрын
@@tomweiland Yep and by that point you feel committed to it so you just deal. I re-realized again yesterday that "oh yeah, no point light shadows" Ah well.
@codingcaderikor
@codingcaderikor 4 жыл бұрын
Danm l love how cute those triangles look fits perfectly with style! For the idle areas use chunk based system where players inside chunk see an island and can collide with them. But also lazy chunks those chunks will update fewer ticks then active normal chunks. This way if a player is far in the water you can still see them but they won't update as much. And all the other islands that are empty unload to reduce overall load.
@tomweiland
@tomweiland 4 жыл бұрын
"Lazy chunks" is something I haven't heard of before, I'll have to keep that idea in mind-thanks!
@leobracken2316
@leobracken2316 4 жыл бұрын
I just discovered this from your comment on Rob Lang's latest video and it looks good!
@tomweiland
@tomweiland 4 жыл бұрын
Thank you :)
@JenoDevo
@JenoDevo 4 жыл бұрын
Very cool stuff
@tomweiland
@tomweiland 4 жыл бұрын
Thank you :)
@KittyInABoxGames
@KittyInABoxGames 4 жыл бұрын
I like the new Island generation! :)
@tomweiland
@tomweiland 4 жыл бұрын
Thank you, I appreciate it!
@jacobttipper
@jacobttipper 4 жыл бұрын
Hey Tom, Great video! I was wondering how you make the boat float on the water, and how you make the character to stay on the platform. I've tried this, but my character just slides around as the boat moves up and down. Anyway, great video, and I love the game! I can't wait to see this move forward!
@tomweiland
@tomweiland 4 жыл бұрын
Thank you :) Over the past few days I've actually been trying to decide whether or not to make a video about how my ship flotation works, as several others have asked about that in the past. I was a bit hesitant as I don't think it'll be a very long video, but since I don't feel like making a networking tutorial this week and you've asked as well now, I guess I might as well do it. When you say "how you make the character to stay on the platform," do you mean how the player stays on the ship? Rigidbodies automatically move with whatever they're standing on-problems only arise once you try to move around, which I solved by incorporating the ship's velocity into the player movement calculations.
@kirilivanov2520
@kirilivanov2520 4 жыл бұрын
Im working on a platformer game and I have a script on my platform that consist of ONcollision start stay and exit. on Start i make the player a child to the colliding platform on exit i make the player independent and on stay i make a function that detects if the player is moving and makes it independent for the time of moving and when it stops it collides again it is like a cycle. I see the problem in this inplementation because if you have many of these objects it can become very damanding to keep all of them running but in my my game i already have scripts to give them their gameplay functions. All depends but this is a fine solution in my opinion
@tomweiland
@tomweiland 4 жыл бұрын
@@kirilivanov2520 that seems to be the most commonly recommended solution to the moving platforms problem, but personally I find that unnecessarily complicated and potentially very restrictive.
@WoahBaydan
@WoahBaydan 4 жыл бұрын
great
@tomweiland
@tomweiland 4 жыл бұрын
Thanks :)
@RobLang
@RobLang 4 жыл бұрын
Like the new Island generation. Are you using colour fading anywhere else? The ship seems to have solid colours with defined lines. I'd only use it if it were an art style that you will use consistently. Great video as always Tom!
@tomweiland
@tomweiland 4 жыл бұрын
The water has some color fading (between the crests and troughs of the waves), but other than that I don't use it anywhere. However, I think that still works because both the terrain and the water are "natural", whereas the ship is technically man-made.
@RobLang
@RobLang 4 жыл бұрын
@@tomweiland that makes good sense. I think the shading is cool as long as you keep consistency. 👍
@tomweiland
@tomweiland 4 жыл бұрын
I'm glad you think so :P
@sxsignal
@sxsignal 2 ай бұрын
interested in how you did they island shading as I like how you have green/dark patches on some aspects that turn flat
@tomweiland
@tomweiland 16 күн бұрын
I just take the grass and stone colors and blend them based on the angle of triangle. The steeper the slope, the more stone colored the triangle will be.
@Starbladek
@Starbladek 4 жыл бұрын
Were slopes something you had to manually address with the rigidbody character controller implementation, or does your character being capsule shaped kinda make that a non-issue? I've been wanting to switch off of the unity character controller implementation in my project, but I've been hesitant to do so explicitly because it handles slopes/step-climbing really well.
@tomweiland
@tomweiland 4 жыл бұрын
It kind of just works because of the shape-that being said it doesn't work super well with steps, depending on the height. I actually swapped all the stairs on the ship out for ramps (just the colliders obviously), and that seems to work quite well, especially since I don't like the choppiness of stair climbing with the Unity's controller. The only real "down-side" so far is that deceleration isn't instant, so you glide a bit after letting go of movement keys. Adding friction (none of my colliders have physics materials right now, but I tried it in my test project) helps with that, but I might need to look into applying some sort of counter-force to cancel out momentum. I just don't want to override other external forces if I do something like that.
@christopherwalka6338
@christopherwalka6338 4 жыл бұрын
Not 100% sure how your wave generation works but perhaps you could use a masking method similar to your method for terrain generation to calm waters in shallow areas? Perhaps you could even use the same texture you're using for the terrain but just flatten it beyond a certain darkness/depth to allow for the larger waves?
@tomweiland
@tomweiland 4 жыл бұрын
That would still require me to check how close each vertex is to the nearest island in order to calculate said mask. It'll probably be part of the solution, but I'm going to hold off on that until I have an area of interest system so I don't need to perform a distance check for each island in the entire world. Thanks for the suggestion :)
@Nervniyak
@Nervniyak 4 жыл бұрын
Are you sure that attachedRigidbody isn't similar to GetComponent in terms of performance? From description it seems like it is also a getter that will dynamically find something? I'm not yet deep into performance, if you can explain why is it much greater, please do
@tomweiland
@tomweiland 4 жыл бұрын
I'm not sure. I did have the same thought, but I figured that it's quite unlikely that it's using GetComponent internally. It just wouldn't make sense to have that kind of shortcut only for it to use a method that developers could call themselves, especially considering that it's something I could see being used quite commonly. My guess is that it runs a GetComponent call on startup and caches it, but I should probably do some in-depth testing and confirm that.
@greenfigure3941
@greenfigure3941 4 жыл бұрын
The player moving towards the back wouldn't be so bad if it was just slightly. It'd actually be quite realistic^^
@tomweiland
@tomweiland 4 жыл бұрын
I assure you it was not "just slightly" :P Even if it was, it'd only be realistic when the boat is accelerating, but even once it had reached top speed players kept getting forced into the back wall.
@greenfigure3941
@greenfigure3941 4 жыл бұрын
that is only slightly true. With enough speed the wind will be so strong making that force possible again ;)
@tomweiland
@tomweiland 4 жыл бұрын
@@greenfigure3941 well that's assuming you're standing on deck, and going _very_ fast. This was happening regardless of where you were on the ship :P
@greenfigure3941
@greenfigure3941 4 жыл бұрын
dont underestimate the wind. With enough wind it will tear your boat apart, too.
@tomweiland
@tomweiland 4 жыл бұрын
Mmhmm I'm sure.
@benzenatizineeddine7816
@benzenatizineeddine7816 Жыл бұрын
The are way too many ennemies , let's go back to the ship! *the ship :* 2:20
@tomweiland
@tomweiland Жыл бұрын
😅
@sloopernine
@sloopernine Жыл бұрын
If you have the time, could you explain the solution more detailed that you talk about at 2:43 and forward? The solution you came up with about standing on ship and player follow its velocity. I have been trying to solve this myself for some days now without success. And as you said in video, most suggested solutions about moving platforms doesn't really work well.
@tomweiland
@tomweiland Жыл бұрын
Well if you just put one rigidbody on another one, and then move the one that's on the bottom (not too abruptly), the one on top will stick to it because of the built in friction. All you have to do from there is account for the supporting rigidbody's velocity in the player's movement calculations, particularly if you have some kind of maximum movement velocity-you want that maximum to be relative to whatever the player is standing on, not relative to the entire world.
@sloopernine
@sloopernine Жыл бұрын
@@tomweiland that makes sense, thanks a lot!
@sloopernine
@sloopernine Жыл бұрын
@@tomweiland Sadly I am still struggling to get this to work properly, are you sure you didn't use some kind of black magic?
@jayslex
@jayslex 4 жыл бұрын
First! now let me watch the video!
@tomweiland
@tomweiland 4 жыл бұрын
Hahaha, I can confirm that you were in fact first, so congrats :P
@jayslex
@jayslex 4 жыл бұрын
@@tomweiland Now, I finished watching the video, so I can say: Nice video!
@tomweiland
@tomweiland 4 жыл бұрын
Thank you very much!
@Speiger
@Speiger 4 жыл бұрын
Suggestion for your wave simulation. Why calculate this every frame based on who is where? What about having a modifier for every possible position that says how high it can be. Do you need fully 4 bytes for it (a float) or are 256 values enough? That way your wave calculation just accesses the array and whenever the islands are added/removed they change that exact array. That way it does not even have to be synced. Even with a 4096x4096 vertex map thats 16MB of ram if you use the full 256 values. 8MB if you use a BitArray that allows you to merge data and only use 4 bits (16) Assuming its that big.
@tomweiland
@tomweiland 4 жыл бұрын
The problem is that I then need to adjust that array every tick as the waves move, which would probably be more expensive than just calculating the height for the few points I need. Thanks for the suggestion though :)
@Speiger
@Speiger 4 жыл бұрын
@@tomweiland You missunderstood me here. The array should be only a modifer to the "max wave strenght" so the waves should only "read" it not write to it. The terrain only writes to it whenever it changes.The only thing what you would need to improve would be how the array is stored so if the camera moves it does not need to change everything.
@tomweiland
@tomweiland 4 жыл бұрын
I see. So basically the array would act like a heightmap for the water depth? It wouldn't make much sense to store heights/height modifiers for vertices that are part of the "open ocean," so I'd probably still end up having to determine which island is closest.
@Speiger
@Speiger 4 жыл бұрын
@@tomweiland That would work too. But it would be less frequent then doing it every frame. That is the main issue that you othetwise would have to do it every frame. I assume you can optimize the island lookup quite a bit. (Assuming the game is aware of where they are)
@jgoglescu
@jgoglescu 3 жыл бұрын
are you using forces?
@tomweiland
@tomweiland 3 жыл бұрын
Yep.
@thedude4039
@thedude4039 3 жыл бұрын
@@tomweiland Vague questions require vague answers.
@fireart7128
@fireart7128 3 жыл бұрын
I need to know how much speed you need to run a server..
@tomweiland
@tomweiland 3 жыл бұрын
That depends entirely on the game.
@fireart7128
@fireart7128 3 жыл бұрын
@@tomweiland ..How about yours..
@mrcryptographic4803
@mrcryptographic4803 4 жыл бұрын
Can you do a tutorial how to program a game launcher pls?
@tomweiland
@tomweiland 4 жыл бұрын
That is on the list, although I'm not sure how soon I'll get around to it.
@mrcryptographic4803
@mrcryptographic4803 4 жыл бұрын
@@tomweiland ok
@ParkerGameDev
@ParkerGameDev 4 жыл бұрын
more more more more more more comment!
@tomweiland
@tomweiland 4 жыл бұрын
🙏
@xsticcyds5459
@xsticcyds5459 4 жыл бұрын
Sea of Thieves. But its an Indie game
@tomweiland
@tomweiland 4 жыл бұрын
That's probably my main concern with this project-I don't want to build _Sea of Thieves: Indie Edition_ :/
@slob5041
@slob5041 7 ай бұрын
i like it but it's really chunky
@tomweiland
@tomweiland 7 ай бұрын
If I remember correctly, I think I made it a little less chunky since this video :)
@marysheridan352
@marysheridan352 4 жыл бұрын
100th
@tomweiland
@tomweiland 4 жыл бұрын
👌
@marysheridan352
@marysheridan352 4 жыл бұрын
Ty
@PinkeySuavo
@PinkeySuavo 4 жыл бұрын
so you are basically stealing sea of thieves idea and creating it in minecraft world?
@tomweiland
@tomweiland 4 жыл бұрын
So you are basically saying that every game involving sailing is now Sea of Thieves? I've had this idea for a _long_ time, even before I heard of SoT. Honestly though, the last thing I want is for this to turn into some sort of clone. No idea where you got the Minecraft vibe from-unless you consider every game involving procedural generation to be Minecraft...
@PinkeySuavo
@PinkeySuavo 4 жыл бұрын
@@tomweiland Like minecraft but instead of cubes you use triangles (yeah I know all 3D games are actually made of triangles). It just was first association, no offence. In SoT there's no procedural generation so maybe such thing would be even nicer because you could travel for infinite time (distance actually). Good luck with the project!
@tomweiland
@tomweiland 4 жыл бұрын
Saying "so you are basically _stealing"_ comes across as a very troll-y comment, so hopefully you can see why I reacted the way I did. If it was in fact just a first association, then I'm sorry if my reply came across as (for lack of a better term) "anti-troll". I honestly still don't understand how triangles = Minecraft though 🤔
@PinkeySuavo
@PinkeySuavo 4 жыл бұрын
@@tomweiland Yeah I like to troll sometimes! Well the minecraft is built of cubes, this one from triangles. I see similarity in terms of "simplicity" of construction. Like everything is built of basic shapes, is sharp etc. It's not a bad thing though, it looks nice.
@tomweiland
@tomweiland 4 жыл бұрын
The point about simplicity makes a lot more sense :P
Adding Player Movement | How to Make a Multiplayer Game - Part 2
14:37
2017 adopt me trailer 😂 #adoptme #roblox #shorts
0:30
AdoptMe_HW
Рет қаралды 3,1 МЛН
I CAN’T BELIEVE I LOST 😱
00:46
Topper Guild
Рет қаралды 67 МЛН
I wish I could change THIS fast! 🤣
00:33
America's Got Talent
Рет қаралды 86 МЛН
Children deceived dad #comedy
00:19
yuzvikii_family
Рет қаралды 7 МЛН
Generating a procedural island in Unity
1:34
Burny
Рет қаралды 4,3 М.
I Made a 1D Game 🎮
11:18
Mashpoe
Рет қаралды 1,7 МЛН
Godot FINALLY Got Better Softbody
2:00
PiCode
Рет қаралды 12 М.
How I Fixed the Ocean in My Pirate Game
6:04
Tom Weiland
Рет қаралды 80 М.
I Played My Pirate Game With Friends | Devlog #44 (Plus Gameplay!)
10:21
How To Generate a Voronoi Diagram in Unity - Tutorial
4:58
Alex K. Dev
Рет қаралды 4,1 М.
When Your Game Is Bad But Your Optimisation Is Genius
8:52
Vercidium
Рет қаралды 1,4 МЛН
Why Making Multiplayer Games SUCKS
6:46
Tom Weiland
Рет қаралды 407 М.
WHO LAUGHS LAST LAUGHS BEST 😎 #comedy
0:18
HaHaWhat
Рет қаралды 1,6 МЛН
Бросила дочку и мужа 🤯
0:35
Фильмы I Сериалы
Рет қаралды 2,2 МЛН
NEW VAMPIRE EPISODE INCOMING 😈
0:27
Alan Chikin Chow
Рет қаралды 4,3 МЛН
ПРЕДСКАЗАТЕЛЬ БУДУЮЩЕГО
1:00
КиноХост
Рет қаралды 7 МЛН