Adding World Generation to My Game

  Рет қаралды 20,340

WheezyWorks

WheezyWorks

Күн бұрын

Welcome to the 4th instalment of my indie game devlog series, in which I'm documenting my progress of making an open world building/survival game in Unity.
In this devlog, I cover the work I've been doing recently on adding procedural generation to my game. I hope you enjoy!
== Music (sourced from Epidemic Sound) ==
- The Crossing of Time - Gavin Luke
- Whispers of the Wasteland - Victor Lundberg
- They Never Knew - Madison York
- Bonnie and Clyde (Instrumental Version) -- Roy Williams
- The Forest Grand - Trevor Kowalski
- Letter to a Friend - By Lotus
- Auld Lang Syne (Smooth Jazz Version) - One Man Quartet
== Free Assets Used (sourced from Unity Asset Store ==
- City People Lite: assetstore.unity.com/packages...
- Modular Medieval Lanterns: assetstore.unity.com/packages...
- Low Poly Tavern Interior: assetstore.unity.com/packages...
- Little Low Poly World - LITE SRP/URP: assetstore.unity.com/packages...

Пікірлер: 94
@markos9644
@markos9644 4 ай бұрын
I dont know if it is your intention, but personally i would love to see a bit more of the code. Great Video anyway!
@wheezyworks
@wheezyworks 4 ай бұрын
Noted! I’ve been gradually trying to add more, trying to find the right balance of technical content, but happy to add more!
@kudarova
@kudarova 4 ай бұрын
I think this code is quite similar to the code from b3agz's minecraft making tutorial videos. You can check it if you interested
@AustinWeeks
@AustinWeeks 4 ай бұрын
Generating a few hills while keeping part of the world flat is genius! The auto-jump idea would definitely be a useful feature, you could also make it so holding spacebar or another button acts as a toggle for the auto-jumping, that way the player has the option of wether or not to use it but also doesn't have to time each jump correctly for each 1 voxel height increase.
@wheezyworks
@wheezyworks 4 ай бұрын
Thank you! And having it as a toggle is a great idea, I think I will experiment with that.
@RafaelFleury_00
@RafaelFleury_00 4 ай бұрын
the game is getting pretty nice visually
@mattwester9093
@mattwester9093 4 ай бұрын
Always enjoy watching these updates. It's coming along great, keep up the good work!
@wheezyworks
@wheezyworks 4 ай бұрын
I’m grateful to have you following along with the updates. Means a lot!
@Vercidium
@Vercidium 4 ай бұрын
That icy terrain at 2:50 looks siiiick
@benzinzo14
@benzinzo14 4 ай бұрын
Keep Going the good works man! Curious to see the end result!
@wheezyworks
@wheezyworks 4 ай бұрын
Thank you!
@mz_eth
@mz_eth 4 ай бұрын
awesome update! I was really curious what you meant when you said the auto generated level could make things unfriendly visually to the player. You showed the changing of opacity to help alleviate issues, but I was wondering what some of those auto generated problems looked like
@wheezyworks
@wheezyworks 4 ай бұрын
Thank you! Yeah I agree. This actually crossed my mind when editing, but didn’t make it in (mostly due to time constraints in this case as I didn’t have any recordings and was editing with a tighter deadline than usual) so it’s interesting that you picked up on this also. I appreciate the feedback! Will improve any demonstrations in the next one.
@Sty13
@Sty13 4 ай бұрын
Oh man this looks beautiful, can't wait to see it released :)
@wheezyworks
@wheezyworks 4 ай бұрын
Thank you!
@Gwilo
@Gwilo 4 ай бұрын
such a cool idea, loving the progress! keep it up!
@wheezyworks
@wheezyworks 4 ай бұрын
Thank you!
@mkrichey1
@mkrichey1 4 ай бұрын
Great effort, keep up the amazing work!
@wheezyworks
@wheezyworks 4 ай бұрын
Thanks, I appreciate the support!
@stray1239
@stray1239 4 ай бұрын
just do the minecraft horse thing where you can go up one block instantly
@web_dev_cz
@web_dev_cz 4 ай бұрын
like in Origin Realms?
@bachwaregames
@bachwaregames 4 ай бұрын
Awesome devlog, and great seeing you back in action! :-D And I have to say, as soon as you introduced your hills together with more flatlands, it all seemed way more natural and better looking. Nice job. Looking forward to the next one!
@wheezyworks
@wheezyworks 4 ай бұрын
Thanks man! It’s good to be back. Great to see you here as always.
@MrCrompz
@MrCrompz 4 ай бұрын
I think you should definitely add an auto jump feature for 1-block high jumps, as well as maybe a climb for larger ledges.
@wheezyworks
@wheezyworks 4 ай бұрын
Agreed, I like the climbing idea too!
@MrCrompz
@MrCrompz 4 ай бұрын
@@wheezyworks Yeah, I think it should also be automatic as well. It would be very satisfying
@appleseedgames6934
@appleseedgames6934 4 ай бұрын
For the issue when voxels are blocking the camera, you should just use a see-through shader which draws a big radius around the player and doesn't render blocking that radius. You can also scale that radius how you want or for different scenarios. There's quite a few tutorials on shaders like that
@wheezyworks
@wheezyworks 4 ай бұрын
This is a nice idea, but the only problem is I need to the voxel visibility to be calculated on the CPU so I can do things with it, like building etc. Haven't figured a way around it yet that merges the ability to build through transparent meshes without doing heavy work on the CPU.
@ChosenSquirrel
@ChosenSquirrel 4 ай бұрын
This is interesting , I had a slightly similar idea for a concept of my own dream game which I have in my head. Which was if rim world and the sims combined basically. Still learning stuff , so I can't implement much yet. But I honestly thought it wasn't possible. BTW just an idea that is probably not useful. But I noticed you have small objects that are not the same size as regular voxels in your game . In a mincraft mod and games like vintage story there is the chisel which allows you to create objects that go beyond the usual appearance. What if the player could create these objects giving them functions . Like a chair for example , pretty simple, make a custom chair appearance and have it inherit the properties of the base chair... (kind of like platos concept of the world of forms only real because its in a video game) A table which I saw you have in game could be customized as well. Might go beyond the scope of what your doing or be practically impossible as I havn't But thanks for doing this I will be following your progress as I imagine if I try to make my dream game the struggles will be similar
@wheezyworks
@wheezyworks 4 ай бұрын
Thanks for the feedback. I'm not familiar with the mod/game mentioned but it sounds like an interesting idea (particularly around the inheritance and creating new things). I need to be careful with my scope though here! But we'll see.
@Vercidium
@Vercidium 4 ай бұрын
To solve the jumping issue, lift your character's collision box up by 1 voxel so it doesn't cover his feet. This will let you move into 1-voxel-tall ledges. Then slowly push up the player when they are inside a block.
@wheezyworks
@wheezyworks 4 ай бұрын
That’s a genius solution that hadn’t even crossed my mind at this point. I would expect nothing other than great solutions (and possibly burgers) from you though! Thank you and it’s great to see you here 🙌
@joshloessb
@joshloessb 4 ай бұрын
Very cool project! You probably already considered it, but adding an over the shoulder camera mode or even a first person mode (toggleable) could be a fun way to solve the terrain hiding issue. I think it would be cool to walk into a mountain valley/chasm, then pop into over-the-shoulder mode to get a real sense of the scale (and explore it properly).
@wheezyworks
@wheezyworks 4 ай бұрын
Thank you! Ah yes, I go back and forth on this quite a bit. I quite like the idea of having a 3rd person controller, and I may add it but I’m not sure yet, would completely change the game. I will have to prototype it once the gameplay elements are in and see. Thanks for the feedback!
@rsdworker
@rsdworker 4 ай бұрын
looking great
@AltamishM
@AltamishM 4 ай бұрын
This looks fantastic! Very pleasing - you could generate small environments and have them stand as little art pieces on their own.
@wheezyworks
@wheezyworks 4 ай бұрын
Ah yes, I like this idea! Could be a cool concept
@noise_dev
@noise_dev 2 ай бұрын
good content man, subbing to keep you motivated and to see more comming
@wheezyworks
@wheezyworks 2 ай бұрын
Appreciate it! More is in the works.
@kudarova
@kudarova 4 ай бұрын
Wonderful. Absolutely.
@wheezyworks
@wheezyworks 4 ай бұрын
Thank you 🙌
@madrededios77
@madrededios77 4 ай бұрын
I was not expecting there to be a character! As the game looks so amazing and unique from afar. Is there anyway your gameplay goal can fit with a non character based game? Can be a nice unique twist too. More management game style, but could still be open world and procedural. I guess that would fix a few of your problems too?
@sethhannah7191
@sethhannah7191 4 ай бұрын
I really like this thought process. I would like to see how this game could develop without a main "character"
@wheezyworks
@wheezyworks 4 ай бұрын
This was my original direction for the game, and I still think about it, so it’s interesting to read this. I wanted to originally add automated characters that would interact with what you built etc. There’s a few ideas I’d like to use the engine for but we will see. I will be prototyping the gameplay loop soon (all being well), so will see what that brings!
@themrfj
@themrfj 4 ай бұрын
My biggest issue with the project so far, is the jarring aestethic difference between the cubic terrain and the varied lool of the doodads and character. I realise non of the art is anywhere close to final, but I'm just wondering if the game would be better served with smoothing your terrain? Voxels behind the scene, but "realistic" terrain visually? This would also get rid of the "jump simulator" issue and could even improve building aestethics by adding tiny variance to placed blocks of the same type.
@wheezyworks
@wheezyworks 4 ай бұрын
This is good feedback. I agree! My intention is to add variance to the terrain voxels so they don’t have perfect edges and corners, but still retain their overall uniform sizing and roughly resemble cubes. I will also be modelling the assets myself so can try and work on blending the styles a little bit. But we will see. Thanks for the feedback!
@BlackIndigenousPosse
@BlackIndigenousPosse 4 ай бұрын
At 6:09 it's suddenly beautiful. Looks like a world worth exploring.
@web_dev_cz
@web_dev_cz 4 ай бұрын
Amazing solution to the terrain!! Love it. A few things I noticed: - no shallow waters in the newest generator. though the deep ones are also cool... what are your future plans? what about rivers? - hiding the whole hill you are behind. how about clipping the overlapping section relative to the camera? I think other games use it too, some for clipping the player rather than the terrain though (clipping when to switch to a silhouette) - foliage sprintes. I think your game could actually benefit from shelling (due to fixed camera angle). Acerola relently made a great video on this subject named "How Are Games Rendering Fur?" where he showcases its broad useability. Keep up the great work, always looking forward to the next vid 💪
@wheezyworks
@wheezyworks 4 ай бұрын
Thank you! And I appreciate the feedback. I wanted to add deep water for effect, I wanted the world to look nice but have an element of danger. But you raise a good point. Not sure yet on this. The problem with hiding the terrain is that I need the building and other controls to work through the hidden terrain, so one way or another, I will need to calculate and store which voxels are in this “hidden” group. But this is an ongoing thing I think about. Regarding the last point, I’m not familiar with shelling, I will check that out, thank you for the recommendation!
@F0r3v3rT0m0rr0w
@F0r3v3rT0m0rr0w 4 ай бұрын
it looks brilliant, i've been struggling a bit with my game since i moved to unreal i no longer trust unity so unreal engine it is for me ... glad you are making a tone of progress!
@wheezyworks
@wheezyworks 4 ай бұрын
Thank you. And yeah, quite a jump to make! Best of luck with your game!
@moose6459
@moose6459 4 ай бұрын
I think an auto jump for 1 tile is a must. Minecraft can be annoying enough in first person constantly jumping that they added an auto jump feature. With a game with this perspective it would be difficult to play without
@tinfoil_powers
@tinfoil_powers 4 ай бұрын
I can see how changing your game would be a game-changer
@wheezyworks
@wheezyworks 4 ай бұрын
Hah. I intended it as a bit of a joke/genuine play on words but I think it comes across a bit sarcastic so I've changed it for now.
@nangld
@nangld 3 ай бұрын
Your shadows have two issues: their are noisy making impression of ripples on the surface of deep dark water; they don't fade with the square of a distance, so when the sun hits horizon, a shadow from a tiny tree scales entire world! I suggest to just once calculate the occlusion map, and then update it as the cells get modified. Otherwise good solutions to non-trivial problems.
@wheezyworks
@wheezyworks 2 ай бұрын
Yeah good observation on the shadows, I’ve been trying to address this just recently, as until now, I’ve very much neglected the lighting. Thank you for the recommendation! I will look into this. Much appreciated.
@aptypp
@aptypp 4 ай бұрын
Any update of game is game changer (literally)
@wheezyworks
@wheezyworks 4 ай бұрын
Yeah I intended it as a bit of a play on words but I'm not sure it comes across great so I've changed it for now.
@FranelasD
@FranelasD 4 ай бұрын
You really need to add post procesing at this point. It will help a lot in the desition of the textures and style. Is looking amazing gj
@wheezyworks
@wheezyworks 4 ай бұрын
Thank you! And yeah I agree it would benefit greatly from some post processing effects. I may experiment with this in the near future. Would be nice to really try and get it looking nice.
@danielnobre3936
@danielnobre3936 4 ай бұрын
really cool project dude! hey, which method you're using to render voxels? are you using greedy mesh, marching cubes or something like that?
@wheezyworks
@wheezyworks 2 ай бұрын
Really late response here on my part (apologies) but at the moment I’m not doing anything too crazy other than removing/hiding faces. Because of the fixed isometric view, I can hide a lot. I am experimenting with shared vertices but it makes texturing a nightmare. I will probably go down the Geedy Meshing route. Right now I’m experimenting and focusing on performance. Next devlog should cover this more.
@mmarchiori
@mmarchiori 4 ай бұрын
May I suggest you raycast a cylinder from the camera to the player and hide (or make transluscent) any blocks that collides with said cylinder that are at player Z+1 or above (presuming Z = height). With that, you would have a field of view just and only around the player and you can control the cylinder's width making bigger (for the player's build) or smaller (say he's in a cave without a light source) Instead of sectioning the entire world.
@wheezyworks
@wheezyworks 4 ай бұрын
It’s a good idea. I’m torn on this though. It was partly a stylistic decision to hide the wider areas, so you could visualise the interiors of buildings etc. I can control the light as it doesn’t remove the object, it just hides it but still blocks light. Performance is a challenge though as I’m doing it on the CPU and not using shaders. I’m wondering about making it toggle-able or just prototyping it to see. But we will see!
@OccaSoftware
@OccaSoftware 4 ай бұрын
Looks good! Would love to see this mixed with our volumetric fog 😅
@wheezyworks
@wheezyworks 4 ай бұрын
Interesting, I think adding volumetric fog could be really nice. I just need to optimise some things first!
@OccaSoftware
@OccaSoftware 4 ай бұрын
@@wheezyworks can't wait to see it!
@Hasdf32gbve
@Hasdf32gbve Ай бұрын
Hi there, keep it up
@ThomasStewartDev
@ThomasStewartDev 4 ай бұрын
Looks awesome! Are you doing anything to optimize rendering so many objects at once?
@wheezyworks
@wheezyworks 4 ай бұрын
Thank you! I’m not doing anything special at the moment other than disabling shadows and a few other bits and pieces. Next iteration/devlog should cover that more extensively as I need to overhaul a few things relating to performance. Also, good to see you here! I’ve been watching a few of your videos recently also.
@ThomasStewartDev
@ThomasStewartDev 4 ай бұрын
@@wheezyworks Hey that's awesome! What a small world haha. Looking forward to more vids in this series!
@ThatOneUnityGamedev
@ThatOneUnityGamedev 4 ай бұрын
I LOVE that water shader, how did you make it and I think that would be a great tutorial. lots of games need water and I haven't seen tonnes of good tutorials.
@wheezyworks
@wheezyworks 4 ай бұрын
I'm glad you like it! To create it I followed this tutorial: kzbin.info/www/bejne/g3nHdYinf619rq8&ab_channel=BinaryLunar (I made some slight adjustments but that should get you on your way)
@ThatOneUnityGamedev
@ThatOneUnityGamedev 4 ай бұрын
@@wheezyworks thanks! and keep up these devlogs they're really good
@wheezyworks
@wheezyworks 4 ай бұрын
@@ThatOneUnityGamedev thank you, I appreciate it!
@Sir.Azazello
@Sir.Azazello 3 ай бұрын
Creating a shader that turns blocks alpha down sounds a lot more performant then reloading chunks. Also easier to animate or add any other pretty visuals. Because these jumps when blocks disappear don't look good
@wheezyworks
@wheezyworks 2 ай бұрын
Indeed, but unfortunately I need to calculate this anyway to factor in how it impacts build controls etc when walls aren’t shown. This made things challenging
@asagrien
@asagrien 4 ай бұрын
Instead of having to flatten out the terrain. What about generating an invisible copy which is more smoothed out? That way visually you get the blocky look but what the player is walking on is actually a smoother transition.
@wheezyworks
@wheezyworks 4 ай бұрын
This is an interesting idea. I actually am planning to do some work to remove the blocky look but not entirely, sort of a hybrid approach. So still having voxels, but have variance and not perfect cubes. Having fully smooth terrain is a good idea though, but there’s something simplistic about the world being made of blocks that I just like - I think it’s easier to visualise and measure when building etc
@asagrien
@asagrien 4 ай бұрын
@@wheezyworks Have you looked into Wave Function Collapse? Information is a bit sparse but I've seen people create a hybrid system that keeps the blocky look while still including "ramped" sections of the terrain.
@MiriadCalibrumAstar
@MiriadCalibrumAstar 4 ай бұрын
9:23 cant you just make a occlusion culling cone that starts from the player that hides the voxels? Why hide lots?
@wheezyworks
@wheezyworks 4 ай бұрын
Yeah it’s a good alternative - I did it this way as a stylistic choice, so you could visualise the interior of buildings etc (if you only had a small window in it could be annoying). It’s not final though, I will make some improvements to how this looks (such as fading and shadows).
@lgscteam
@lgscteam 4 ай бұрын
Hey! I love your project, can you play Elden Lands map for yourself?
@jordan-ci4xd
@jordan-ci4xd 4 ай бұрын
do you have a discord server? i saw one guy ask about seeing the code and i'd be interested in giving my opinion aswell
@wheezyworks
@wheezyworks 4 ай бұрын
No, not yet - but I’m planning on setting one up in the near future, will hopefully post about it soon. Would definitely be great to discuss the code!
@aerofight5994
@aerofight5994 4 ай бұрын
did i see 10 for loops nested??? please recurse
@wheezyworks
@wheezyworks 4 ай бұрын
Haha. Just the 3. Looping for each axis during the voxel generation. It looks a bit messy because of the old voxel code but it's cleaner now. I don't think recursion would make things any easier given the fact we're just looping each axis.
@aerofight5994
@aerofight5994 4 ай бұрын
@@wheezyworks Okay, I just got a glimpse. That puts me to rest... maybe.
@berkokgt
@berkokgt 4 ай бұрын
heyy
@xen4141
@xen4141 4 ай бұрын
+++
@newpepvr
@newpepvr 4 ай бұрын
Minecraft?
@ironmaiden12369
@ironmaiden12369 4 ай бұрын
This game looks visually not that great, big oops.
@ironmaiden12369
@ironmaiden12369 4 ай бұрын
Kinda like this was either rushed out of china or someone stole assets to make a mince craft clone
@web_dev_cz
@web_dev_cz 4 ай бұрын
I think those trees for example are very nice, especially for a tech demo :D
How to Code (almost) Any Feature
9:48
DaFluffyPotato
Рет қаралды 653 М.
How I learned Unity without following tutorials (Developing 1)
18:11
Game Maker's Toolkit
Рет қаралды 2 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:19
CRAZY GREAPA
Рет қаралды 16 МЛН
Balloon Stepping Challenge: Barry Policeman Vs  Herobrine and His Friends
00:28
Final muy inesperado 🥹
00:48
Juan De Dios Pantoja
Рет қаралды 17 МЛН
Is My Dream Game Possible to Make?
11:10
WheezyWorks
Рет қаралды 74 М.
Diving Into the World of Voxel Game Development | Devlog 0
16:07
WheezyWorks
Рет қаралды 41 М.
The Game That Hacks Your Brain
24:43
camwing
Рет қаралды 442 М.
Ray Traced Voxel Engine in Unity - Voxtopolis Devlog 1
8:31
Bodhi Donselaar
Рет қаралды 2,3 М.
The Hardest Game Jam I've Ever Done - Devlog
9:53
Helper Wesley
Рет қаралды 18 М.
Devlog | Adding a Crab Enemy to My Indie Game
8:03
Logic Leo
Рет қаралды 2,7 М.
Every Game I’ve Ever Made
9:37
WheezyWorks
Рет қаралды 8 М.
I Added RAYTRACING To My Voxel Engine ! ( From SCRATCH )
13:39
MaxMakesGames
Рет қаралды 7 М.
Will the battery emit smoke if it rotates rapidly?
0:11
Meaningful Cartoons 183
Рет қаралды 24 МЛН
Samsung S24 Ultra professional shooting kit #shorts
0:12
Photographer Army
Рет қаралды 26 МЛН
i like you subscriber ♥️♥️ #trending #iphone #apple #iphonefold
0:14
Как работает автопилот на Lixiang L9 Max
0:34
Семен Ефимов
Рет қаралды 17 М.