Sunny Valley Studio
Sunny Valley Studio
  • 477
  • 3 524 426
Island Map Generation in Unity 2D (Procedural) - FREE project
Learn how you can randomly generate a Procedural 2D Island Map in your own Unity 2022 game!
Download the project FREE:
svstudio.itch.io/2d-procedural-island-unity-project
---------------
You can support me through Patreon:
www.patreon.com/sunnyvalleystudio
Join the discord:
discord.gg/RQEtYHz
---------------
Code Crafters:
app.codecrafters.io/join?via=SunnyValley
---------------
Assets used:
Tileset: merchant-shade.itch.io/16x16-puny-world
Music: opengameart.org/content/sandy-seaside-2 and github.com/sparklinlabs/superpowers-asset-packs
Sounds: opengameart.org/content/beach-ocean-waves and opengameart.org/content/different-steps-on-wood-stone-leaves-gravel-and-mud
---------------
00:00 Procedurally generate Island using Perlin Noise
00:41 Generating Island Shape - Circular mask
01:32 Adding Sea Water using Flood Fill algorithm
02:45 Adding Hills
03:32 Sponsor - CodeCrafters
04:11 Separating Generation into layers
04:32 Adding Sand around Edges
05:03 Customizing Rule Tile Script
05:35 Placing Trees
06:07 Detecting Hill Edges
07:29 Adding Seed for generation
09:02 Adding Colliders to Trees and Hills
11:10 Spawning Players (how to spawn prefabs)
12:30 Adding Stairs to go up the hills
13:11 Fixing and polishing
#unity2d #procedural #gamedev
Переглядів: 4 247

Відео

Create Custom Character Animations in Minutes with Animotive VR and Unity
Переглядів 2,3 тис.3 місяці тому
Want to add life to your game but overwhelmed by complex animation software? Animotive makes creating custom game animations incredibly EASY! This tool uses your VR headset to track your movements, letting you record animations directly inside VR. You can also use it for Free for your noncommercial projects! You can find Animotive at: www.animotive.com/?UA-camDescription&Awareness Learn more ab...
Events, AND + OR operators - C# Basics for Unity Beginners: #10
Переглядів 8033 місяці тому
In this last part we will explore the concept of Events, operators like AND && and OR || for an if statement and we will finish our game. C# Basics for unity series: ua-cam.com/play/PLcRSafycjWFeHojgzbkNUXt9S6-Q7BGQE.html Welcome to this C# Fundamentals for Unity Beginners series of 10 videos. We will first explore what are the basics of C# syntax and next we will create a small Vampire Survivo...
Switch statement and Enums - C# Basics for Unity Beginners: #9
Переглядів 4883 місяці тому
Switch statement and Enums - C# Basics for Unity Beginners: #9
if conditional statement - C# Basics for Unity Beginners: #8
Переглядів 3673 місяці тому
if conditional statement - C# Basics for Unity Beginners: #8
For Loop and Arrays - C# Basics for Unity Beginners: #7
Переглядів 5713 місяці тому
For Loop and Arrays - C# Basics for Unity Beginners: #7
Understanding Reference and Value types- C# Basics for Unity Beginners: #6
Переглядів 6573 місяці тому
Understanding Reference and Value types- C# Basics for Unity Beginners: #6
Referencing Rigidbody2d in our script - C# Basics for Unity Beginners: #5
Переглядів 6713 місяці тому
Referencing Rigidbody2d in our script - C# Basics for Unity Beginners: #5
Methods and MonoBehaviour Inheritance - C# Basics for Unity Beginners: #4
Переглядів 7043 місяці тому
Methods and MonoBehaviour Inheritance - C# Basics for Unity Beginners: #4
Data Types, Scope & Controlling Objects - C# Basics for Unity Beginners: #3
Переглядів 7553 місяці тому
Data Types, Scope & Controlling Objects - C# Basics for Unity Beginners: #3
Understanding Syntax, Objects and Classes - C# Basics for Unity Beginners #2
Переглядів 1 тис.3 місяці тому
Understanding Syntax, Objects and Classes - C# Basics for Unity Beginners #2
Learn C# Programming Basics for Unity Game Development - Part 1
Переглядів 6 тис.3 місяці тому
Learn C# Programming Basics for Unity Game Development - Part 1
Unity VR Stop Head Clipping with Fade-to-Black Effect
Переглядів 1,1 тис.6 місяців тому
Unity VR Stop Head Clipping with Fade-to-Black Effect
Unity VR Tutorial: Prevent Head Clipping by adding Push-Back effect
Переглядів 1,1 тис.6 місяців тому
Unity VR Tutorial: Prevent Head Clipping by adding Push-Back effect
Add Jumping to Your Unity 3D NavMesh Movement - Top Down Controller Tutorial P2
Переглядів 3,6 тис.9 місяців тому
Add Jumping to Your Unity 3D NavMesh Movement - Top Down Controller Tutorial P2
Build Your Diablo-Like Top Down Controller in Unity 3D with NavMesh
Переглядів 6 тис.9 місяців тому
Build Your Diablo-Like Top Down Controller in Unity 3D with NavMesh
Can you make a VR Shooter Game in JUST 30 Hours?
Переглядів 2,9 тис.10 місяців тому
Can you make a VR Shooter Game in JUST 30 Hours?
Building an Idle Clicker Game in Unity - Full Project Example
Переглядів 26 тис.Рік тому
Building an Idle Clicker Game in Unity - Full Project Example
RPG Maker Unite review - Is Unity version any good?
Переглядів 9 тис.Рік тому
RPG Maker Unite review - Is Unity version any good?
Increasing Corridor Width - Unity Procedural Generation of a 2D Dungeon Extra P12.5
Переглядів 6 тис.Рік тому
Increasing Corridor Width - Unity Procedural Generation of a 2D Dungeon Extra P12.5
Removing Objects - Grid Placement System P7
Переглядів 9 тис.Рік тому
Removing Objects - Grid Placement System P7
Refactoring To state Pattern - Grid Placement System P6
Переглядів 8 тис.Рік тому
Refactoring To state Pattern - Grid Placement System P6
Placement Preview - Grid Placement System in Unity P5
Переглядів 11 тис.Рік тому
Placement Preview - Grid Placement System in Unity P5
Placement Collision Detection - Grid Placement System in Unity P4
Переглядів 14 тис.Рік тому
Placement Collision Detection - Grid Placement System in Unity P4
Unity Placing Objects - Grid Placement System P3
Переглядів 23 тис.Рік тому
Unity Placing Objects - Grid Placement System P3
Showing grid using Shader in Unity - Grid Placement System P2
Переглядів 31 тис.Рік тому
Showing grid using Shader in Unity - Grid Placement System P2
Master Grid Placement in Unity 2022 P1 - Calculating Cell Position
Переглядів 84 тис.Рік тому
Master Grid Placement in Unity 2022 P1 - Calculating Cell Position
Sims like building system in Unity 2022
Переглядів 25 тис.Рік тому
Sims like building system in Unity 2022
How to STOP NPC pushing Player in Unity
Переглядів 13 тис.Рік тому
How to STOP NPC pushing Player in Unity
Dialogue system is ready! - Farm Game In Unity Devlog #3
Переглядів 2,7 тис.Рік тому
Dialogue system is ready! - Farm Game In Unity Devlog #3

КОМЕНТАРІ

  • @Subicia
    @Subicia 4 години тому

    After folIowing with you,I did it in my first time!Thank you!

  • @starbuck3980
    @starbuck3980 14 годин тому

    You explain everything very well

  • @starbuck3980
    @starbuck3980 15 годин тому

    Dont know why ppl use SOLID, is a pain to write a single script for each different utility. Just learn it for interviews.

    • @SunnyValleyStudio
      @SunnyValleyStudio 10 годин тому

      Unfortunately that is how oop works. You start seeing the value in OOP when you are already creating a project for 6 months and everything starts breaking. There is nothing wrong with writing if-else statement at the prototype level. But when this one condition grows to 100 or more lines of code 2 things happen: 1) it will become hard to work with (and there is where errors come from) 2) you can be sure that it will grow even more. But I agree - initially its very hard to find the value in SOLID and learning OOP takes very long. Data Oriented programming seems like a much better approach (so unity DOTS for example)

  • @hypercritical6712
    @hypercritical6712 День тому

    my material just shows pink//// i HAD TO USE BUILT-IN SHADER GRAPH... oh ok

    • @SunnyValleyStudio
      @SunnyValleyStudio 10 годин тому

      I believe that we use URP in the project. Still this is definitely a shared problem where you fix it by swapping the shader of your material to a compatible one.

  • @jonathankressbach5503
    @jonathankressbach5503 День тому

    Has anyone else been getting an error doing this? I can’t find anything about it online

  • @ZiKsor
    @ZiKsor 2 дні тому

    Hi, your guide is very useful, but can you tell me how to create a Coursorindicator prefab?

  • @noodle-eater
    @noodle-eater 2 дні тому

    Wow I love it

  • @jonathanwennerlund9252
    @jonathanwennerlund9252 2 дні тому

    Amazing tutorial! Thank you so much :)

  • @ilike_zw4
    @ilike_zw4 2 дні тому

    For those who use the new Input System: Make sure that you also add the "Input System UI Input Module" Component to the Gameobject containing your Event System. If not, the UI wont register any clicks. I tried fixing it for 4h and i finally got to this solution

    • @SunnyValleyStudio
      @SunnyValleyStudio 2 дні тому

      I'm really sorry to hear that! I will need to create a new version of this tutorial that uses the new input and ui toolkit

  • @BruninDev
    @BruninDev 2 дні тому

    does aseprite importer works to libresprite?

    • @8BitsPerPlay
      @8BitsPerPlay 2 дні тому

      Since Libre Sprite is a fork of Aseprite it depends on what commit it's file exporter is based off of. Aseprite has meta data inside of the file that keeps track of layers, animation settings, and so forth. As long as Libre Sprite has not edited any of the data that is exported from the animation section it most likely will work unless there is some hidden checking for what program the file came from on Unity's side, but I think it is just checking the file extension type.

    • @SunnyValleyStudio
      @SunnyValleyStudio 2 дні тому

      Thanks for answering this question 👍

    • @8BitsPerPlay
      @8BitsPerPlay 2 дні тому

      @@SunnyValleyStudio No problem. I should mention I don't know the last time Libre Sprite did a branch merge from Aseprite, so not sure how many commits the main Aseprite repo is ahead of it.

  • @Focto
    @Focto 3 дні тому

    Excellent tutorial i've ever seen before, doesn't like other channels who explain with many syntax that i don't know about it. But this such a perfection 👍🙏

    • @SunnyValleyStudio
      @SunnyValleyStudio 3 дні тому

      Glad it helped! 🙂 It isn't an easy topic to explain but I did my best to explain it as I understand it.

  • @aaronhinklin3175
    @aaronhinklin3175 4 дні тому

    I can't get the functions to show up in the function assign in the inspector under Event Trigger(s). The functions without arguments show up.

    • @SunnyValleyStudio
      @SunnyValleyStudio 3 дні тому

      I think it displays only the 'public' methods. It also will not show methods with an argument that can't be passed through the inspector. It might the case that you are missing UnityEvent<..> (triangular brackets) in your UnityEvent definition? I try to always pass the correct argument there or not pass one at all.

  • @piratemom82
    @piratemom82 4 дні тому

    only tutorial ive followed that worked correctly in a while without a lot of scrutiny

  • @denisgavr199
    @denisgavr199 4 дні тому

    Hi, I have a big problem with the coordinate system because when I grab an object it detaches from its parent and starts being independent(and use world coordinate ) until I release it. I would be grateful if you have any advice on how to prevent this.

    • @SunnyValleyStudio
      @SunnyValleyStudio 4 дні тому

      There are 2 ways to make child object follow some 'Target' object. 1 - you convert the Target object position to child local space using child.transform.InverseTransformPoint(target.transform.position) or 2 - detach the child from parent, make it follow the global position and at the end attach it pack to parent using public void transform.SetParent(Transform parent, bool worldPositionStays); (there 2nd argument is set to true)

    • @denisgavr199
      @denisgavr199 4 дні тому

      @@SunnyValleyStudio thank you very much, the second method was able to solve my problem👍

  • @rens652
    @rens652 4 дні тому

    Hiya! Thanks a bunch for this tutorial it's really helping me realize my game project! I know it's been a while since you've uploaded this, but I have a few questions that I hope you could answer. I'm just getting familiar with state pattern in C# (I come from a frontend background so my intuition about how state is handled is a bit different from what I'm used to), and I was wondering if there was a reason for why the list of placedGameObjects is located in the ObjectPlacer script. My intuition is that because it relates to the state of objects it makes more sense to place it in the GridData component. Why did you choose to place it there? Also I'm a bit confused about the naming convention here. Looking at the PlacementState script, when I think of a component called xState, my assumtion here is that state is stored here, but it seems that you are using it in the sense of ''a script that contains functions related to the state of an action'. What is your thought on this matter? Thanks again for the video's, It's a great way to start thinking about state in unity and I really enjoyed your style of presenting!

    • @SunnyValleyStudio
      @SunnyValleyStudio 4 дні тому

      Hey! It is placed in ObjectPlacer only because I try to separate "code data" from "visual data". Why? Because when you do any kind of save / load functionality you save what is in PlacedData and load it. Next you can call the ObjectPlacer to again place those objects like we would do when placing an object when just playing a game. It is not something that we need to ever save because we can always recreate it from important data - PlacedData. But that is what I like to do. You do what works for you I am using it State pattern. refactoring.guru/design-patterns/state . Its not the same as "Data State". Yeah come to think of it it can be confusing. But I always think of it in terms of State pattern so I didn't think that it might be confused with anything else.

    • @rens652
      @rens652 День тому

      @@SunnyValleyStudio Thanks for your quick response! Makes sense, I'll definitely go over the recourse you linked. I stuck with your architecture and I'm retrieving the data from PlacedData as you suggest here. Cool stuff ✌️🙏

  • @hadiseylani2265
    @hadiseylani2265 4 дні тому

    awsome tutorial... thanks for your clear explanations

  • @nicoli3143
    @nicoli3143 6 днів тому

    amazing

  • @dahvini7339
    @dahvini7339 6 днів тому

    When I press generate the Tilemap generates correctly in my scene but in my game view I can't see anything. I've double checked and it should be displaying correctly since the camera is ontop of it and the Canvas is set to ScreenSpace(camera) but it's not displaying.

    • @SunnyValleyStudio
      @SunnyValleyStudio 4 дні тому

      In the game view you can select camera that you are viewing at the top - so this might be the issue. Or just delete "main camera" or maybe you don't have it in the hierarchy? Definitely something to do with the camera. If you have one in your scene and select it in the hierarchy you should see the preview that shows the same thin as the game view.

  • @DominikHoffendahl
    @DominikHoffendahl 7 днів тому

    Is the project of this video the same as the output of Season3 - Voxel Terrain Generation?

  • @DominikHoffendahl
    @DominikHoffendahl 7 днів тому

    It's almost sad when you reach the end. This was an amazing series! I'd really love to see one more video which just again summarizes noise & domain warping again and shows different results for different parameters. Seeing a grid of 4x4 terrains with different noise settings for example. In the end, the procedural terrain is all about creating interesting terrains. Also: How do I attach game logic to the project? How do I place and persist gameobjects (non-voxel objects) in the world? We had the trees, for sure, but I just can figure out a nice way to do it for any kind of object. Thank you very much for the series! I will keep my patreon membership active for some time :)

    • @SunnyValleyStudio
      @SunnyValleyStudio 4 дні тому

      I would place "interactive" objects like chests or work bench as GameObjects that we spawn. Now do mind that I haven't touched lighting system so I am not sure how light would affect such objects. Still that way we can add any logic we want and we can just spawn and remove them when we travel around the map. If you have some special types of blocks you could add the logic in our "raycast" logic for breaking stuff. Sorry for not covering those things. But the amount of time it took me to create vs the the support I got for it from community makes it look like a waste of time 😅 That is why I didn't continue it.

  • @kunyuzhao1290
    @kunyuzhao1290 8 днів тому

    I really like it~! thank you for your sharing.~

  • @nanidevv
    @nanidevv 9 днів тому

    Which headset you've got? 😢

  • @developmastery-if6si
    @developmastery-if6si 9 днів тому

    thanks you for good project

  • @lunli9983
    @lunli9983 9 днів тому

    Hey I think the saving system has a bug: when checking duplicates it only checks the origin, but one origin can have two edges - vertically and horizontally. The solution maybe using gameObj ID to dedupe

  • @user-iy9or3uk4h
    @user-iy9or3uk4h 10 днів тому

    Hello I know I late, But I don't really understand how it finding dead ends because it always will found direction at the tile behind. So how it really works?

    • @SunnyValleyStudio
      @SunnyValleyStudio 10 днів тому

      I can't recall the code but the idea was that if you find a tile with only 1 neighbor it means that it is a dead end. For bigger corridors it would not work so we would have to remove dead ends before we make the corridors larger.

    • @user-iy9or3uk4h
      @user-iy9or3uk4h 10 днів тому

      Oh I got it thanks, I think for larger corridors you just need to increase the neighbor limit to 2 for example (if the corridor width is 2) and that would work no?

  • @etistyle96
    @etistyle96 13 днів тому

    this videos are far away the best ones on the solid principles for unity. The github is a real plus. Thx a lot dude.

    • @SunnyValleyStudio
      @SunnyValleyStudio 11 днів тому

      I'm really glad that those videos are still useful 🙂

  • @Lazzarus7
    @Lazzarus7 13 днів тому

    Great tutorial serie, very enjoyable and great explanation

  • @mohit_yt_user
    @mohit_yt_user 13 днів тому

    Wow,, this is incredible Idea 😍😍😍 And also looks very cute 🥹

  • @ggnouhiiam
    @ggnouhiiam 13 днів тому

    the delay is not really working, i can still spam my attacks even though it's running through the coroutine

    • @SunnyValleyStudio
      @SunnyValleyStudio 11 днів тому

      Interesting. Well maybe I have messed something up in the explanation. I have used this a few times and usually it works out great. Especially when you use something like State pattern to separate states. Maybe its just that despite the delay some other code that triggers attack again runs? Like some "bool" flag check is missing?

    • @ggnouhiiam
      @ggnouhiiam 11 днів тому

      if im correct then you can set the delay to any amount and you can still spam it

    • @SunnyValleyStudio
      @SunnyValleyStudio 11 днів тому

      @@ggnouhiiam The idea is that you connect input with logic that triggers the attack. Next you block the trigger and use a delay to unblock it. The only way to spam it would be if the trigger is not blocked. In that case the delay indeed doesn't matter. That is why I think it might be a simple bug in the code where the bool flag is not set if is not blocking the trigger.

    • @ggnouhiiam
      @ggnouhiiam 11 днів тому

      yeah i figured it out when i saw the block attack

  • @mmar5896
    @mmar5896 14 днів тому

    Going good. I am following this tutorial and loves it.

  • @Magma-uw7yo
    @Magma-uw7yo 14 днів тому

    it doesn't work for me with a 2d Sprite

    • @SunnyValleyStudio
      @SunnyValleyStudio 11 днів тому

      Sorry to hear that! The problem with 2D sprites are drawn on Quads and use transparency to show only part of the image that has colors. We usually use have to stretch the pixels in 4 or 8 directions to create an outline. Something like here ua-cam.com/video/MqpyXhBIRSw/v-deo.htmlsi=c5eTPqeQPzDhs417

    • @Magma-uw7yo
      @Magma-uw7yo 11 днів тому

      @@SunnyValleyStudio Thank you :)

  • @teledevgames
    @teledevgames 14 днів тому

    LEGEND

  • @DominikHoffendahl
    @DominikHoffendahl 14 днів тому

    I am amazed by this series and everything just works fine, except this particular lesson. In Unity 2022+, the cinemachine's virtual camera fields you're using are deprecated. It would be nice to have an updated video to this.

    • @SunnyValleyStudio
      @SunnyValleyStudio 14 днів тому

      Thanks for letting me know! I am planning an updated version that uses Jobs system + Burst or maybe even ECS. Might not be a step by step but an overview of a premade, downloadable project this time though 🙂

  • @ThatFrostMourne
    @ThatFrostMourne 14 днів тому

    hello sir, im a little late for the party, but I would like to ask you sir a question that i can't find it documented anywhere, if I have a procedural generation world with ruletiles, with chunks of 16x16 tiles each, will i be able to connect neighboring chunks edges as if was on the same tilemap? thanks for this awesome video tho, keep up the good work!

    • @SunnyValleyStudio
      @SunnyValleyStudio 14 днів тому

      If you use the default Rule tile you can define there the rules of what tile to put in on the edges where the rule tile connects with some other tile. This is problematic in case where we have an outer "water" layer to which sand needs to connect and "inner" grass layer that sand again needs to connect to. In my setup I have created a "custom" rule tile (you can copy the rules from your default one to the new one using copy / paste). The point of the new Rule tile is to assume that "Grass: knows how to connect to sand. If it is so "Sand" should treat "Grass" tiles as "Sand". So in my custom Rule Tile you give the "Sand" a "Grass" rule tile - preventing the "Sand" tile for creating the 'water edge' where it meets the sand. I know that it sounds pretty tricky when you would have 3 different tiles meeting up but that is when you can create a more advanced custom Rule tile or do as I did with water - create a "FixTilemap" and manually fix the places where the RuleTile has placed an incorrect tile. I hope it helps!

    • @ThatFrostMourne
      @ThatFrostMourne 11 днів тому

      @@SunnyValleyStudio thank you for the reply, I'm currently working on it, and your system is helping me a lot, another question would be if tilemaps is optimal for handling a very large world, pretty much like terraria, would that be viable somehow? or i am better off just instatiating sprites in a grid?

  • @worldkho
    @worldkho 15 днів тому

    Thanks for the guide. One thing I notice thats missing though is that you've only demonstrated one agent, how would I make it consider other agents as obstacles without detecting itself?

    • @SunnyValleyStudio
      @SunnyValleyStudio 14 днів тому

      You can make the detector on the AI Agent detect other agents as Obstacles (I think we have separated the detector and have it some "LayerMask" - so you would just add "Enemy" layer to it). That being said it can be tricky and might require adding some "weights" to the different layers so that you don't end up with Enemies that stands idly because they can't squeeze between obstacle and another Enemy.

  • @_Rasec
    @_Rasec 16 днів тому

    I dont know why but in my project there are gaps, like the whole tiles are not allways fully connected and might have an empty space between them.

    • @SunnyValleyStudio
      @SunnyValleyStudio 15 днів тому

      It might be that the tile placement system doesn't returns a TileBase so "null" tile is painted (but the tile position was calculated correctly). In a worse case it might be a code issue where one of the methods has a bug and skips some positions creating gaps. I think I link to a github repo where you can download a unitypackage per each vid if you want to duplicate the project / create new one and just import my package to compare the setup 🙂

    • @_Rasec
      @_Rasec 15 днів тому

      @@SunnyValleyStudio thanks I will try some stuff out when i get home

  • @Paaskedrengen
    @Paaskedrengen 16 днів тому

    Any idea why me item object can go through walls when im holding it?

    • @SunnyValleyStudio
      @SunnyValleyStudio 14 днів тому

      Because we are using Kinematic RB for the item if I am not mistaken. If you make the item to have a Dynamic RB the movement will be jagged but any collision between it and wall will be detected. It is the same problem as you can see in VR games. There is no one simple solution for it. The easiest one is using a dynamic Rigidbody to prevent collision. The most "precise" one is using kinematic RB and coding your own collision reaction - so for example if player tries to push object too far into the wall the Player drops the object (the object stays on the correct side of the wall). Again there are many others so you would have to do a bit of testing / research to find out what works best for you.

    • @Paaskedrengen
      @Paaskedrengen 14 днів тому

      @@SunnyValleyStudio Thanks for the answer. Yea i would have hoped that this mechanic was the same as we see in example Portal. Not having any success implementing is so far sadly.

  • @rcarrascc
    @rcarrascc 16 днів тому

    Damn this looks nice 😮

  • @bobli8760
    @bobli8760 16 днів тому

    very informative, thx

  • @luxe1098
    @luxe1098 17 днів тому

    after i attack the weapon stops following my mouse movement, why is that?

    • @SunnyValleyStudio
      @SunnyValleyStudio 16 днів тому

      It can be animation related. I recall that we had set the Animator on the weapon ? If so if the animation doesn't loop and stays in the "swing" animation (I don't remember how we have called it exactly) the animator directs the position of the weapon - overriding your input. So my best guess is that the animation never transitions back to "idle" state in the weapon animator / player animator. I hope it helps!

  • @truth8483
    @truth8483 18 днів тому

    Oooo im excited for this!! Thank you!!

  • @Anemone45
    @Anemone45 18 днів тому

    I have a issue where the houses and special buildings are massive when they are placed and take up the whole screen, any idea what causes this issue? Great tutorial btw!

    • @SunnyValleyStudio
      @SunnyValleyStudio 17 днів тому

      Must be an issue with the scale. When we import the models we can specify what scale they are in docs.unity3d.com/Manual/class-FBXImporter.html If you don't do it correctly you can see that the prefab / model in the hierarchy when placed has a parent object with scale (1,1,1) but the child model object has some weird values like (100,100,100). I hope this helps!

    • @Anemone45
      @Anemone45 17 днів тому

      @@SunnyValleyStudio It works now thanks for the help!

  • @captain6374
    @captain6374 18 днів тому

    I'm already hooked with your explanation, thanks for this playlist

  • @nguyentranaiduong1486
    @nguyentranaiduong1486 18 днів тому

    Where can i get the sound effect of pulling, shooting, hiting arrow?

    • @SunnyValleyStudio
      @SunnyValleyStudio 18 днів тому

      I have used cc0 sounds from freesound.org/ + Audacity to extract part that works for me

  • @GrzegorzKiernozek
    @GrzegorzKiernozek 18 днів тому

    How is the performance? Does it have a chance to run on mobile?

    • @SunnyValleyStudio
      @SunnyValleyStudio 18 днів тому

      I have run it in WebGL and the generation took 2-3 sec. It is by no means optimized. I am planning a paid (5-10 $) version that uses Jobs + burst since those can work on mobile (but not in webgl). The layered approach works well for testing but many steps could be combined into a single for loop. Again I would prefer to use jobs system but in PCG usually optimization comes after you know that the generation works. Another thing that I don't plan to tackle is map streaming. If you want to have multiple islands you would be wise to separate the map into chunks and only render the visible part. Unless you are cratering an infinite word you can generate all the data at once and just integrate map streaming into the rendering process (which is separate anyhow). Just don't forget about the collider generation step since those 2 overlap. Sorry for making those tightly coupled!

  • @Lazzarus7
    @Lazzarus7 19 днів тому

    Nice tutorial, very well explained!

  • @Blue_Grego
    @Blue_Grego 19 днів тому

    How do you get the character to flip with the mouse?

    • @SunnyValleyStudio
      @SunnyValleyStudio 18 днів тому

      You can use DOT product using the up direction and the direction from player to mouse position. Just flip the X (I think) axis of rotation (transform component) of the character gameobjects.

  • @Magma-uw7yo
    @Magma-uw7yo 19 днів тому

    I was trying to make the same thing, Is it possible to visualize the island before playing ? Because I don't see the modifications on live and it's not practical. Otherwise thank you a lot.

    • @Magma-uw7yo
      @Magma-uw7yo 18 днів тому

      it's too complex for me, I try to implement that in my game but I can't change what I want. I want to use Tilmap instead of Tilebase for the ocean because I've got a material attached but I've got a lot of errors, so I will do it my-self. It's just for my project, otherwise Thank you for sharing,

    • @SunnyValleyStudio
      @SunnyValleyStudio 18 днів тому

      Sorry about that. Yes Procedural generation can be a bit daunting. You could set the ocean tile to "None" in the renderer so that it does not render the ocean / shallow sea tiles (at least I think this would work in your case)

    • @SunnyValleyStudio
      @SunnyValleyStudio 18 днів тому

      I think that you could use docs.unity3d.com/ScriptReference/ExecuteInEditMode.html on the Update() of the MapGenerator.cs (or MapGeneration.cs) and add there code like "if R key is pressed call GenerateMap() method". But a simple approach would be to just run the game and sizable / enable steps and regenerate the map at runtime. I will try to make it so that steps can be "disabled" from the inspector rather than that you need to click each separate checkbox for each step.

  • @cheapgamer6909
    @cheapgamer6909 19 днів тому

    You have link another vdo for pick item for Mobile game like granny if you have then share me i am still waiting

  • @lee1davis1
    @lee1davis1 19 днів тому

    Very impressive Peter. How long did it take to finish polishing the code?

    • @SunnyValleyStudio
      @SunnyValleyStudio 19 днів тому

      Thanks! Making it work took about a week (about 20-30 h). Coding this is pretty simple. Tweaking the values and adding sprites to handle edge RuleTile cases took the longest 🙂 For example I still have to add a step to remove island of size 1x1 that sometimes appear after using circular mask in the base step. Finding and fixing those kind of things takes the longest.