Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[RELEASED] HardHat - Modular Ingame Builder System

Discussion in 'Assets and Asset Store' started by metagrue, Mar 13, 2015.

  1. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    HardHat has been released!

    You can purchase it in the Unity Asset Store: http://u3d.as/cJy
    Playable Demo available here: http://rancid1.com/docs/hardhat_web/index.html
    Support is available via my website: http://rancid1.com

    You can also leave comments and questions directly in this thread.

    I've been working on a prototype for a game. The prototype has to be put on hold but I created a very neat little system to create buildings from inside a Unity Game. Am wondering if there is any interest for this sort of thing.

     
    Last edited: May 5, 2015
  2. vincentellis

    vincentellis

    Joined:
    Oct 21, 2013
    Posts:
    100
    Rust-style? Of course! Shut up and take my money. :D
     
  3. sicga123

    sicga123

    Joined:
    Jan 26, 2011
    Posts:
    782
    Definitely.
     
  4. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    I'd be lying if I said there wasn't any inspiration from Rust in said game prototype. It was a weird project and one that was going in too many directions. The builder however is a pretty sweet little system that I've been refactoring as a plugin.

    I'd of course be offering the same deal as my other tools. Full source code and support via my website.
     
  5. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    So with the basics assembled - I can't help but wonder what sort of features people would want me to extend this with. I think about things like persistence, procedural destruction, all sorts of places we could take it.
     
  6. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,114
    Support for Bolt networking would be a nice plus.
     
  7. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    I've added networking support to the roadmap. Might be a ways out - I'll first have to purchase and then learn Bolt. Probably wont make the initial release of MIBS (working name).
     
    John-G likes this.
  8. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    This would interest us as well. Thanks!
     
  9. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    Going to piece together a video tomorrow show off features as current.

    I don't know if I should submit now or wait until after I have finished the persistence system.
     
  10. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    Went ahead and set up a Trello to help us all communicate about the future of this plugin.

    Link here: https://trello.com/rancid1
     
  11. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    Never got the video today, obviously. Instead I worked on physics. Little sample:
    hh_05.PNG hh_06.PNG

    I'll be cutting a video tomorrow.
     
  12. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    Video is a little rough, but that's just my crappy recording software. The performance in-game is surprisingly good.

     
    John-G likes this.
  13. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    Guys, I am conflicted. I've been working on a flaw on the design of HardHat... I could release now, it's stable enough - and then patch in the new structure system later. Or I could just refactor now. But basically as it is the whole physicalization system isn't quite what I want.

    So what should I do? Fix it first or Release now?
     
  14. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,114
    Better to wait for a fix.
     
  15. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    This was my initial leaning as well. Planning on a big refactor this weekend. Updates to follow.
     
  16. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    Great news guys - finally solved the design issue I had found last night! Now I just need to implement and test the solution.
     
    John-G likes this.
  17. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    Wow. That was hard.

    Okay so first and foremost I refactored the entire system to make it a little less cumbersome. Then I went ahead and fixed it so that building structures could be stacked on one another without breaking. And then I added serialization using the UnitySerializer plugin. Finally things are starting to resemble a comfortable system.

    I will be submitting the first version of HardHat soon.
     
    John-G likes this.
  18. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,114
    Will be looking out for it :)
     
  19. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    As of today I have submitted beta rc2 to the Unity Asset Store. With any luck it should be available this time next week! :)
     
  20. yung

    yung

    Joined:
    Nov 22, 2010
    Posts:
    274
    Looking forward to it :D
     
  21. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    Beta rc2 was rejected because someone (that's me) was so excited he forgot documentation. Spent the last day or so documenting thoroughly.

    As of today, Beta rc3 has been submitted. It has documentation.
    I have also revised the HardHat Portal available at http://rancid1.com/hardhat
     
  22. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,291
    I hope you not only make multiplayer support it for bolt but for Unity´s own multiplayer solution wich is rakenet at the moment and or the new network system that will come soon too.
    Because not everyone use and have bolt.
     
  23. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    I will certainly be adding networking support for as many packages as I can. My first goal is to figure out a way to re-add the Serialization to the system. I had added it using a plugin and this was discouraged by the Unity Asset Store. As such is was removed in the vetting process.

    Oh and bonus, I got word yesterday that HardHat was accepted. Took a few tries but we did it!
    The shortlink is here: http://u3d.as/cJy
     
  24. yung

    yung

    Joined:
    Nov 22, 2010
    Posts:
    274
    Any ways to make it more context sensitive, so that the script can automatically know if to build a pillar or a wall for example? And also does this script allows building a scene in the editor (not realtime) and saving that so the script can thus interact with it?
     
  25. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,291
    Rakenet is not an extra package but unity´s own network implementation and so all of unity´s users have it!
     
  26. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    We have full control over the HardHat Builder Mode. In this we have full control over which sockets are receiving collisions at any given time. Is this what you mean?

    Not yet. But this is a good feature request and I will be adding it to the roadmap.
     
  27. yung

    yung

    Joined:
    Nov 22, 2010
    Posts:
    274
    I'll probably need to dive into the code more but from studying your code it does seems to be that the system knows about everything, and the user input is the one that controls wether to make a pillar or a floor.

    Right now the way your example works is that you need specifically select floor for example, before you can build it, then you need to select the pillars, then the walls,etc before you can build. What I mean is that the script should take care of that, by checking what the player is viewing and automatically select what the user is looking at.
     
  28. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    Oh, I see. This should definitely be possible... Hm. Another solid feature request.
     
  29. yung

    yung

    Joined:
    Nov 22, 2010
    Posts:
    274
    That's cool to hear! I can't be sure but from what I've seen, it it definitely doable.

    However, I think the building in editor mode then saving it should be more important.

    Another thing that comes to mind is that is there a way for the rules to be changed? Currently to build the ceiling, you need to have a floor, four pillars, walls (optional) four more beams or something, before you can build the ceiling. Is there away to tweak it so that as long as you have four pillars, yer good to go? What if I wanted to create multiple stories? Would it make more sense for the ceiling to be also a floor?

    One more is that right now the floor and ceiling is locked at the same size, would it be possible to support half the tile? Or twice the tile, etc?

    having lots of fun though right now though!
     
  30. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    Currently, all of the structural rules are specified in BuildStructure.cs, where inside we check the various parts of a modular structure and depending on if a given socket is full then the next sockets down the chain will be supported. So you'd want to go into BuildStructure, and modify it so once the pillars are built, the next floor is as well.

    The reason that the ceiling can't be the floor is 3D space. In short, they're will be texture aliasing issues on the outer extremities of the mod. This is why the floor piece is 4 x 4, and the ceiling piece is 3.5 x 3.5. Accounting for the 0.25*2 that the pillars will take and allowing the pieces to snap together cleanly.

    A great deal of effort went into the stack-ability of the modular structures. Once you have built a full post-lintel box (without wall or ceiling panels) the structure creates another stacked piece automatically. You can then switch back to Pillars and work on the next floor.

    At no point anywhere in the source code does a size get specified. Everything is powered by the building pieces which are stored as prefabs. If one were to change the sizes of the prefabs, one would change the structure's dimensions. Currently the modular structure is 4 units wide and long, and 3 units tall. This was to make it easily traversible for the Default Unity Avatar, allowing for the player to jump between floors.

    I'm glad to hear you're enjoying the plugin. I will be looking into both the editor-to-game serialization issue and that context switch over next week or so.
     
  31. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    Actually, it might help to think of the HardHat project as one giant example showcasing one specific usage of the system. The system itself (which is really what HardHat is) can easily be modified to allow for all sorts of different structural patterns. All one would need to do is modify the BuildStructure component.

    Currently, all that ships in the package though is a post/lintel structure very much in the vein of games like Rust.
     
  32. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,291
    Will you make this compatible with UFPS?
    If so and you can show us how to combine them i am your next customer :)
     
  33. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    A couple of questions/comments...

    I am assuming it is possible to put in your own modular pieces, right? We do not have to use only the ones you provide.

    Is there a mechanism to combine all the pieces into one mesh at run time?

    Will you be adding network support?

    Thanks.
     
  34. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    I will be adding support for other plugins as I can afford them and implement the strategies.

    It is. You would need to start by specifying a new building piece type. In fact most of the prefabs I provide are extremely basic, being little more than rescaled cubes.

    Because of the dynamic component, I'm not sure this would be possible. After combining them into one object it would no longer be possible to destabilize all components. One of my favorite features of HardHat is building demolition.

    That said, I'm sure if the demolition component was unwanted the rest could easily be patched.

    From the sounds of it, yes. Bolt, Photon, and the revised Unity netcode (whenever it comes out.) As I said earlier, I plan to add support for plugins as the requests come in. This is still a very new plugin, and I'm very interested in expanding it.
     
    Teila likes this.
  35. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    Looks cool. Is it hard to combime it with a third Person controller?
     
  36. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    Now that I haven't tried. But it should be pretty easy. It was built around the first person controller from Standard Unity Assets. Switching controllers from there should be a fairly simple thing.

    The only component from a character that HardHat uses is a camera to place objects and build with.
     
  37. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    Great, uhm. Is there a webplayer demo somehow? 50 bugs without testing is pretty hard ;)
     
  38. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    Hm, I'm afraid not. At least not yet.
    And because of some experimental changes I'm testing at the moment am not in a position at the moment to build one yet.
     
  39. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    I will see about a Web Player build tomorrow. I've done some work today to allow for this to happen. :)
     
  40. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
  41. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
    Looks cool man, I don't think it is worth the $50 yet but maybe one day.
    You should look at more systems to. Let the player pick their system they like, maybe make one like The Forest too!
     
  42. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Good start! Placement is still very awkward, which I am sure you know. Also, I really couldn't build anything, just what you wanted me to build, which is a square, four walls, four columns, etc. I imagine this will change in future updates.

    One issue I had...I build around my controller and ended up stuck in the four walls with no way to get out. :) Now this might just be me but it might be good to leave the colliders off until the entire house is done. Maybe have a button to push to add colliders or allow players to do that when they are done.

    The option to merge the mesh, even if that eliminates the destroy possibilities will be important, especially if the builds become more elaborate.

    Glad you are doing this though! It will be a great addition to our games in the future I am sure. :)
     
  43. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    I also played around with the webplayer demo a little bit and sadly I also think that 50$ is too much for it since everythink feels pretty clunky and more like an alpha Version. there are some basic features missing like a functional ui and all the above mentioned stuff. I would like to See the asset goes more into the direction of this :
    (at 7:50)

    But keep up the good work!
     
  44. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    Look, guys. I get it. $50 is a lot of money for new and untested code.

    But facts are facts. People are paying the current price. And as people are paying the current price, I cannot justify lowering it. (It sends a really bad message to anyone who HAS purchased the tool for $50 if I up and lower it a few days after release.)

    I dunno, you can always wait for a Sale? With the new feature set I am working on it's more likely the price point to increase over time than diminish.
     
  45. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    Yes, very much. I have a number of new pieces I am working on currently. Ramps for example, will change drastically how the player can move around the buildings.

    The DESTROY functionality didn't work? I've been in similar spots but you can destroy buildings as easily as creating them.

    I can look into it. But the whole premise of HardHat was dynamic building construction and demolition. Merging meshes is essentially a hammer in the clockwork.

    I was genuinely surprised that there wasn't anything like this on the store already.
     
  46. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,929
    Destroy did not work for me.

    I understand but you can increase the market for your asset if you also allow for merging of the meshes. I would like to use it during runtime (with modifications) so players can build houses. I don't care that much about the destroy function and I would use it if it had to stay in all those individual pieces. I suppose it might not be that difficult to write a script to merge all the pieces in runtime but having it all in one package would be nice. :)

    Of course, it is your project.
     
    Last edited: May 10, 2015
  47. metagrue

    metagrue

    Joined:
    Jan 28, 2013
    Posts:
    46
    Hm, I will have to try to reproduce the error.

    And no need to sell me on it; it's a good feature request. Probably wouldn't even take that long to implement. I'll look into it. :)
     
    Teila likes this.
  48. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,291
    Fact is that i and i think some others too do not pay the price at the moment and i do not until i will see some Unity ui, a good solution for rotating and such. Also i have seen another solution is near completnes on youtube that look way better then this so maybe i will never pay $50 for this even it will get better bot not good enough then the other one.
     
  49. NathanHale1776

    NathanHale1776

    Joined:
    Mar 22, 2014
    Posts:
    46
    Does it save/load?