Adding World Generation to My Game

Sdílet
Vložit
  • čas přidán 25. 07. 2024
  • 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...
  • Věda a technologie

Komentáře • 94

  • @markos9644
    @markos9644 Před 5 měsíci +30

    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  Před 5 měsíci +7

      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 Před 5 měsíci

      I think this code is quite similar to the code from b3agz's minecraft making tutorial videos. You can check it if you interested

  • @RafaelFleury_00
    @RafaelFleury_00 Před 5 měsíci +13

    the game is getting pretty nice visually

  • @AustinWeeks
    @AustinWeeks Před 5 měsíci +19

    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  Před 5 měsíci +4

      Thank you! And having it as a toggle is a great idea, I think I will experiment with that.

  • @mattwester9093
    @mattwester9093 Před 5 měsíci +4

    Always enjoy watching these updates. It's coming along great, keep up the good work!

    • @wheezyworks
      @wheezyworks  Před 5 měsíci

      I’m grateful to have you following along with the updates. Means a lot!

  • @Vercidium
    @Vercidium Před 5 měsíci +5

    That icy terrain at 2:50 looks siiiick

  • @Gwilo
    @Gwilo Před 5 měsíci

    such a cool idea, loving the progress! keep it up!

  • @benzinzo14
    @benzinzo14 Před 5 měsíci +4

    Keep Going the good works man! Curious to see the end result!

  • @Sty13
    @Sty13 Před 5 měsíci +3

    Oh man this looks beautiful, can't wait to see it released :)

  • @bachwaregames
    @bachwaregames Před 5 měsíci

    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  Před 5 měsíci +1

      Thanks man! It’s good to be back. Great to see you here as always.

  • @mkrichey1
    @mkrichey1 Před 5 měsíci +2

    Great effort, keep up the amazing work!

    • @wheezyworks
      @wheezyworks  Před 5 měsíci

      Thanks, I appreciate the support!

  • @rsdworker
    @rsdworker Před 5 měsíci

    looking great

  • @MrCrompz
    @MrCrompz Před 5 měsíci +2

    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  Před 5 měsíci +1

      Agreed, I like the climbing idea too!

    • @MrCrompz
      @MrCrompz Před 5 měsíci +1

      @@wheezyworks Yeah, I think it should also be automatic as well. It would be very satisfying

  • @AltamishM
    @AltamishM Před 5 měsíci

    This looks fantastic!
    Very pleasing - you could generate small environments and have them stand as little art pieces on their own.

    • @wheezyworks
      @wheezyworks  Před 5 měsíci

      Ah yes, I like this idea! Could be a cool concept

  • @appleseedgames6934
    @appleseedgames6934 Před 5 měsíci +1

    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  Před 5 měsíci

      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.

  • @stray1239
    @stray1239 Před 5 měsíci +4

    just do the minecraft horse thing where you can go up one block instantly

  • @joshloessb
    @joshloessb Před 5 měsíci

    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  Před 5 měsíci +1

      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!

  • @noise_dev
    @noise_dev Před 3 měsíci

    good content man, subbing to keep you motivated and to see more comming

    • @wheezyworks
      @wheezyworks  Před 3 měsíci

      Appreciate it! More is in the works.

  • @mz_eth
    @mz_eth Před 5 měsíci +3

    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  Před 5 měsíci +1

      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.

  • @Vercidium
    @Vercidium Před 5 měsíci +1

    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  Před 5 měsíci +1

      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 🙌

  • @kudarova
    @kudarova Před 5 měsíci

    Wonderful. Absolutely.

  • @ChosenSquirrel
    @ChosenSquirrel Před 5 měsíci +1

    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  Před 5 měsíci +1

      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.

  • @madrededios77
    @madrededios77 Před 5 měsíci +2

    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 Před 5 měsíci +1

      I really like this thought process. I would like to see how this game could develop without a main "character"

    • @wheezyworks
      @wheezyworks  Před 5 měsíci

      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!

  • @web_dev_cz
    @web_dev_cz Před 5 měsíci

    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  Před 5 měsíci +1

      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!

  • @BlackIndigenousPosse
    @BlackIndigenousPosse Před 5 měsíci

    At 6:09 it's suddenly beautiful. Looks like a world worth exploring.

  • @F0r3v3rT0m0rr0w
    @F0r3v3rT0m0rr0w Před 5 měsíci

    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  Před 5 měsíci +1

      Thank you. And yeah, quite a jump to make! Best of luck with your game!

  • @tinfoil_powers
    @tinfoil_powers Před 5 měsíci

    I can see how changing your game would be a game-changer

    • @wheezyworks
      @wheezyworks  Před 5 měsíci

      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.

  • @OccaSoftware
    @OccaSoftware Před 5 měsíci +3

    Looks good! Would love to see this mixed with our volumetric fog 😅

    • @wheezyworks
      @wheezyworks  Před 5 měsíci +1

      Interesting, I think adding volumetric fog could be really nice. I just need to optimise some things first!

    • @OccaSoftware
      @OccaSoftware Před 5 měsíci

      @@wheezyworks can't wait to see it!

  • @aptypp
    @aptypp Před 5 měsíci

    Any update of game is game changer (literally)

    • @wheezyworks
      @wheezyworks  Před 5 měsíci

      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.

  • @themrfj
    @themrfj Před 5 měsíci +1

    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  Před 5 měsíci

      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!

  • @FranelasD
    @FranelasD Před 5 měsíci +1

    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  Před 5 měsíci

      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.

  • @nangld
    @nangld Před 4 měsíci

    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  Před 4 měsíci

      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.

  • @moose6459
    @moose6459 Před 5 měsíci

    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

  • @danielnobre3936
    @danielnobre3936 Před 5 měsíci

    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  Před 4 měsíci

      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 Před 5 měsíci

    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  Před 5 měsíci +1

      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!

  • @Hasdf32gbve
    @Hasdf32gbve Před 2 měsíci

    Hi there, keep it up

  • @Sir.Azazello
    @Sir.Azazello Před 4 měsíci

    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  Před 4 měsíci

      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

  • @ThatOneUnityGamedev
    @ThatOneUnityGamedev Před 5 měsíci

    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  Před 5 měsíci

      I'm glad you like it! To create it I followed this tutorial: czcams.com/video/MHdDUqJHJxM/video.html&ab_channel=BinaryLunar (I made some slight adjustments but that should get you on your way)

    • @ThatOneUnityGamedev
      @ThatOneUnityGamedev Před 5 měsíci +1

      @@wheezyworks thanks! and keep up these devlogs they're really good

    • @wheezyworks
      @wheezyworks  Před 5 měsíci +1

      @@ThatOneUnityGamedev thank you, I appreciate it!

  • @ThomasStewartDev
    @ThomasStewartDev Před 5 měsíci

    Looks awesome! Are you doing anything to optimize rendering so many objects at once?

    • @wheezyworks
      @wheezyworks  Před 5 měsíci +1

      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 Před 5 měsíci +1

      @@wheezyworks Hey that's awesome! What a small world haha. Looking forward to more vids in this series!

  • @asagrien
    @asagrien Před 5 měsíci

    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  Před 5 měsíci

      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 Před 5 měsíci

      @@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 Před 5 měsíci +1

    9:23 cant you just make a occlusion culling cone that starts from the player that hides the voxels? Why hide lots?

    • @wheezyworks
      @wheezyworks  Před 5 měsíci

      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 Před 5 měsíci

    Hey! I love your project, can you play Elden Lands map for yourself?

  • @jordan-ci4xd
    @jordan-ci4xd Před 5 měsíci +1

    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  Před 5 měsíci

      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 Před 5 měsíci

    did i see 10 for loops nested??? please recurse

    • @wheezyworks
      @wheezyworks  Před 5 měsíci

      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 Před 5 měsíci

      @@wheezyworks Okay, I just got a glimpse. That puts me to rest... maybe.

  • @berkokgt
    @berkokgt Před 5 měsíci +2

    heyy

  • @xen4141
    @xen4141 Před 5 měsíci +1

    +++

  • @newpepvr
    @newpepvr Před 5 měsíci +1

    Minecraft?

  • @ironmaiden12369
    @ironmaiden12369 Před 5 měsíci

    This game looks visually not that great, big oops.

    • @ironmaiden12369
      @ironmaiden12369 Před 5 měsíci

      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 Před 5 měsíci +1

      I think those trees for example are very nice, especially for a tech demo :D