Sims like building system in Unity 2022

Поділитися
Вставка
  • Опубліковано 28 вер 2024

КОМЕНТАРІ • 43

  • @luiscc2884
    @luiscc2884 Рік тому +15

    No way, I was studying how to do something like this last month. This will help a lot. Thanks 👍

  • @kylestan5874
    @kylestan5874 Рік тому +2

    Great video! I have 2 questions
    1. About valid placement part how would you go about making the tile under the object turn red for invalid and green for valid as well?
    2. Is creating an arrow to show which direction the object is facing easy to add? Like to show intractability for a fridge would just be the front while a chair would have 2 sides left and right or is this correlated with the valid/invalid placement as well like if the chair's left side is on the wall that side's grid color would be red while the right would be green?
    Thank you so much for your time and effort you put into the tutorials! I'll most likely fiddle around with the code

    • @SunnyValleyStudio
      @SunnyValleyStudio  Рік тому +1

      Hey!
      I would add another quad / cube under the prefab of the object that I want to place and make its materials transparent (just like with the current preview objects). I am sure you can have a shader based solution that shows the material of your object over the object that it is "inside" but I am all for a simple solution that is why putting it a bit higher than the floor level would show it on top of the floor and beneath the placed prefab (unless it too is transparent)
      For the second question I would again add either world based UI or some quads with arrows on them. You can also use "depth test" value in the graph settings to make the arrows always show on top of everything else. Since each object stores a rotation the arrows would rotate together with the object. From the validation standpoint since ex the fridge is 1x1 + 1x1 area to interact I would just set its size to be 2x1 and the validation system would automatically work.
      I hope it helps!

    • @kylestan5874
      @kylestan5874 Рік тому

      Thanks a lot for the solutions! I'll try out the shader approaches

  • @kaizen9451
    @kaizen9451 Рік тому +1

    Peter are you able to go into the programming pattern you've used + a high level overview of the project maybe using uml diagram?

    • @SunnyValleyStudio
      @SunnyValleyStudio  Рік тому +1

      I might add a UML diagram to the project. I have used a state pattern to create different selection modes (box selection, placing or removing mode) and the command pattern for the undo system. There is a bit of MVC going on between how UI and the Placement system is set up.
      Just remember that at the end of the day it isn't really what patterns you use in the project but does it work or no and if you can easily extend the code. As always in this project you can easily change some things while other changes (like adding a move object system) were more difficult to implement. On the other hand chances are that you will want to add ex "Ceiling placement for the lights" but there is a small chance that you would want a "Move walls mode" that would pose a challenge to add.
      I hope it answers our question :)

    • @kaizen9451
      @kaizen9451 Рік тому

      @@SunnyValleyStudio Thank you yes it does! I have been researching a lot about design patterns recently and your methods come as no suprise which is good. I didn't think MVC would come into it but that's my limited experience.

  • @CoreyFarr
    @CoreyFarr Рік тому +1

    I see you posted this project but then also a 3 part series on a grid placement system more recently. Are the videos connected? Are they dependent on each other? Should I follow the 3 part series first and then watch this?

    • @SunnyValleyStudio
      @SunnyValleyStudio  Рік тому +1

      Hey!
      This video is just an overview of the House building system that I have created so that you have an idea of how to implement it on your own.
      Since I use it to promote my paid project template I have also promised to show how I implant the grid system in a free tutorial. The series is just a simpler implementation of the House Building System. Also the Grid implementation is universal so you can use it for a Tower Defense game or whatever.
      I hope this explains it a bit.

    • @CoreyFarr
      @CoreyFarr Рік тому

      @@SunnyValleyStudio thanks!!

  • @danimpaeir689
    @danimpaeir689 Рік тому +1

    This is just qhat I wanted thank you !!

  • @Shadowthevampire
    @Shadowthevampire 5 місяців тому +1

    EXATEKY what I was looking for.

  • @quadriproduction
    @quadriproduction Рік тому

    source is just for patreons? I checked your website and nothing is there

    • @SunnyValleyStudio
      @SunnyValleyStudio  Рік тому

      Hey!
      I have updated the links (since for some reasons they weren't links at all). If you grab the project template from my website / patreon you get a full project (zi[p / unitypackage) that includes all the scripts and a video documentation explaining how it all works. I will be releasing a simpler version of this - grid placement where I will be explaining step by step how to set it up. Sorry that it isn't available right away.

    • @SunnyValleyStudio
      @SunnyValleyStudio  Рік тому +1

      ​ @Quadri Production Sorry about that. You are right. I misunderstood the expression "Open source". I have removed it from the side description.

  • @BlackJar72
    @BlackJar72 11 місяців тому +2

    I think it would be better to use procedural meshes instead of prefabs for floors and walls. Also, there are much better ways to place walls than with A* Manhattan; it would be better to have walls only placed on straight lines, especially if you might possibly want to allow diagonal walls at some point -- while having an option to place whole rectangular rooms (walls on both sides) separately, which does not require path finding at all since you can derive all for corners and simply create axis aligned walls between them. No way to assign materials to the sides of walls or floors, or to store the identity of rooms? I guess its a neat starter tutorial though, and it would be foolish to expect a commercial quality game to be developed in a UA-cam tutorial, so I suppose this is actually good.

    • @SunnyValleyStudio
      @SunnyValleyStudio  11 місяців тому

      Thanks for the feedback! Yeah all it is is a starter project 🙂 I would certainly go for a procedural mesh generation to improve the project 👍 Changing materials per each side would be cool! We could add a custom shader but I'm not sure we could swap only one side with the UVs of the current 3d model that I am using.

    • @thesishive
      @thesishive 9 місяців тому +3

      Why not create your own tutorial?

  • @mrjey2417
    @mrjey2417 4 місяці тому +1

    great channel man !

  • @kaizen9451
    @kaizen9451 Рік тому +1

    I have bought the series, what are your goals for the project?

    • @SunnyValleyStudio
      @SunnyValleyStudio  Рік тому +1

      Hey!
      Thanks so much. I don't promise anything beyond what it is already - a Sims like house building project template. I do have an idea for adding a character that can walk around and interact with objects but this will just be free update - again this is just an idea.

    • @alir8zana635
      @alir8zana635 Рік тому

      @@SunnyValleyStudio this would be really great

    • @aimeeharper5130
      @aimeeharper5130 Рік тому

      @@SunnyValleyStudio This would be awesome

  • @ragerungames
    @ragerungames Рік тому

    Any course available for this project? Would love take it and get deep understanding to this system

    • @SunnyValleyStudio
      @SunnyValleyStudio  Рік тому

      Hey!
      On my website with the project template you will get ~17 videos explaining how this works under the hood (video documentation). It will not be my standard course since - well it is a Project Template after all 🙂

  • @santozard
    @santozard Рік тому +1

    So good.

  • @danielcrandall2033
    @danielcrandall2033 Рік тому +2

    I recently got the sims like course. I am trying to instaniate floor tiles by default on the grid from the start, but I am having difficulty achieving this. Also having trouble doing multiple floors. I've tried moving the gridOjbect Y, but everytime I place an object it defaults to Y= 0. In addition Objects with a non uniform size ex. 2x1 can only rotate to face to directions instead of the expected 4 directions. Suggestions/Help?

    • @SunnyValleyStudio
      @SunnyValleyStudio  Рік тому

      Hey! You should have access to discord channel where I can provide more help than here.
      To instantiate floor tiles from the start you can manually call the floorData and at specific positions the floor. You would first need to add them to ObjectPlacer to get theire indices.
      Multiple floors would require a new grid data to be created. In the sims you would manual jump "up" or "down" the level by clinking an arrow button. This could inform our system to "swap" the data. You would probably add an extra method to select the correct data based on the level ex an int value.
      2x1 rotates this way by design. The idea being that you can easily add "mirror" logic. The rotation logic would be the same as for the uniform ex 2x2 objects but we would have to return the size 2x1 or 1x2 depending on the rotation direction.

  • @RaymondWadeWade
    @RaymondWadeWade Рік тому

    Clicking the Confirm payment button does not respond?????

    • @SunnyValleyStudio
      @SunnyValleyStudio  Рік тому

      Sorry! Maybe it was temporary. It works on my end right now.

    • @RaymondWadeWade
      @RaymondWadeWade Рік тому

      Still no response. I'm a Chinese bank card@@SunnyValleyStudio

  • @That-guy-there1
    @That-guy-there1 Місяць тому +2

    please come back to this one day!

    • @SunnyValleyStudio
      @SunnyValleyStudio  Місяць тому +1

      Thanks for the feedback! I will try to plan some more content around it🙂

  • @friendlyfox2189
    @friendlyfox2189 2 місяці тому +1

    i bought your course, but how do you handle the corners for the walls?

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 місяці тому +1

      The assets that I am using do not have corners so I have 2 walls overlap each other. We could have a system that swaps those for a corner prefab that is rotated and assigned in place of those 2 walls. When we delete one wall we could again swap it to 1 wall remaining on the side that wasn't removed. It complicates things so unless you really need it I would stick with overlapping walls where there is a corner

  • @Mireysa
    @Mireysa Рік тому +1

    Yooo, I never hit that subscribe button so fast. Thank you for this!!!