Search Unity

[RELEASED] uConstruct - Fully generic, socket based runtime construction system

Discussion in 'Assets and Asset Store' started by ElroyUnity, Oct 17, 2015.

  1. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    379
    Hiya, any chance of integrating input with Rewired in the future? :)
     
    ElroyUnity likes this.
  2. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey!,

    Rewired should work out of the box with just changing several lines, actually in the new version the process is even simpler :), i will make a video on how to integrate Rewired anyways :).

    The new version is coming along well, very busy lately so it takes more time than it should, but still working on it :).
     
    tapticc likes this.
  3. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Update progress : (DONE)

    Additional MultiThreading
    Snapping Points ( https://gyazo.com/7592da69aadc03dc6169f708abbd1dc2 ) - blue dots.
    Improved Serialization
    Improved BuildingPlacer
    RealTime Sockets preview ( https://gyazo.com/f5664820f4bd6ca58e07031999ba676a )
    Realtime Save preview
    Inventory Pro Integration

    Bug fixes

    SMARTER group managment
    New Demo Scene



    Unfortunately started to work on the update only 1 week ago as i've been extremely busy with school, hopefully this update will be ready very soon :).

    Changelog (so far, not complete) :

    -Created CheckForBuildingEditor
    -Fixed instance disposal when switching script type on the editor extensions.
    -Added LoadExternal (saving system)
    -Added ExportInternal (saving system)
    -Added GetSerialized (saving system)
    -Created ThreadManager
    -Moved all thread management from AOI
    -Added compatibility to WebGL
    -Created ThreadTask (4 generic types supported)
    -Fixed Unity 5.3.X warnings with the new SceneManager.
    -Added placing offset to the ray method on the buildingplacer.
    -Created a virtual ray property for generic ray modification.
    -Started to work on the level editor demo.
    -Fixed saving&loading events called before saving is done.
    -Fixed batching not initiating when a save is loaded.
    -Added offset to the raycasting system as a parameter.
    -Fixed offset not working as purposed.
    -Fixed error on building placer when demoUI isnt on the scene.
    -Made the ray on the building placer a virtual so can be modified on an inherited placer.
    -Made LockCursor public
    -Exposed "currentSlot" on BuildingPlacer.
    -Added null filtering on the batching system.
    -Added dynamic batching - change "batchBuilding" on runtime and it will process your changes dynamically.
    -Made renderings more generic on the base building.
    -Added real time asset preview
    -Added snapping points
    -Created "IPlacingModifier" interface to allow more generic approach for editors and instance creation in the future.
     
    Last edited: Mar 6, 2016
    BackwoodsGaming, julianr and tapticc like this.
  4. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    379
    Keep up the great work! Loving this asset :)
     
    ElroyUnity likes this.
  5. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Thank you :),

    So a feature i've been thinking about as MANY people have requested this, I've been thinking on making an extension for uConstruct which will use uConstruct mechanics in order to generate complete buildings(whether in editor/ runtime) and maybe even go further and generate cities using that mechanic. What do u guys think? will it be useful to some of you ?
     
    nixter, montyfi, judah4 and 1 other person like this.
  6. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Does this save and load up the group of buildings from a file or prefab, spawning them into the scene at their specified location? Does it save it to the scene itself? I'm curious as to how this works as ideally I'd like to be able to remove buildings from an admin point of view if needed.
     
    ElroyUnity likes this.
  7. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    It saves them as a file, but heres the cool thing, the new version (V1.2) will add you the ability to preview your save inside the scene (if you want to make some scene modifications etc) and you could probably edit your save from there as well,
    now for an admin approach, because i've exposed all of the saving system mechanics in V1.2, you could just search for a group on a position/ a building, remove it and resave it using the built-in mechanics.

    I will set up an example for you if you want :).
     
    julianr likes this.
  8. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Sounds good. Nothing like having someone on a multiplayer server totally muck up your entire game by going awol with building stuff and making a right mess of it.

    How does the Inventory Pro integration work? - parts of the building or prefabs in inventory pro can be dragged and dropped into the scene, which would then be saved, or are they just parsed to a uConstruct UI based on what you have in the inventory?
     
    ElroyUnity likes this.
  9. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Sorry another question before I purchase... does it work on Open worlds with multiple terrains, any floating point issues?
     
  10. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Currently didnt start to work on the Inventory Pro integration but my main purpose it to create a version that shows how to do it, allowing you to make any changes you like yourself instead of being limited to my own integration.

    And well it works on as many terrains as you like :), i havent encountered any floating percision issue, but if you encounter any make sure to email me at : eeproductionssupp@gmail.com and i will help you solve it :).
     
  11. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Excellent! Thanks Elroy - off to purchase :)
     
    tapticc and ElroyUnity like this.
  12. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    My pleasure !
    and thank you for your purchase,
    I hope you will find uConstruct to your liking :).

    Elroy.
     
    julianr likes this.
  13. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    I wonder how intensive it would be to replace some of my high-rises with uConstruct and blow them up. Making each part take damage with something like Exploder or DestroyIt in the asset store - guess I will have to try it! :) timeofday2.JPG
     
    ElroyUnity likes this.
  14. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Well tbh, if you figure out how to make the building to be made out of building parts you could easily do it, and there wont be any performance hit because of the batching & Area Of Interest mechanics that comes with the system :).
     
    julianr likes this.
  15. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    shouldn't be too difficult. I'll give it a go soon and show you the results.
     
    ElroyUnity likes this.
  16. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    379
    For me it's more important for players to build at runtime one piece at a time and I don't have a need for complete buildings, but others may find it useful. If I wanted whole buildings to be made I would probably model the building in its entirety :)
     
  17. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Great, cant wait to hear your progress!.

    Yes, thats why it would be an extension and not a part of the main asset :),
    To be honest i thought the same, but then think about the possibilites, a fully procedural generated building that can have different structore each time and can be then maybe generated into a city, who knows, it sounds like an interesting idea :p.
     
  18. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    To create procedurally generated buildings at run-time, or from saved blueprints would be beneficial. Best of both worlds.. allow players to create their own or generate towns/cities on the fly. You could also have an option to generate each floor randomly, and perhaps spawn in items within the interiors such as desks for an office, or an apartment procedurally when the player gets near each floor, then remove or cull/take away rendering and collisions afterwards so you do not have large amounts of not needed assets floating in the game.
     
    ElroyUnity likes this.
  19. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Yes :), pretty much what i had on mind hehe.

    I will get started on that concept the moment i finish V1.2.
     
    julianr likes this.
  20. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Thats kinda the way I do it at the moment, is each floor has a lift and a corridor, the exits of that floor are procedurally generated and populated with rooms and doors, inside each room you have items spawned in, when you leave each floor it's removed. Using uConstruct + Saving and the Item Spawning combined should be quite good.. look forward to seeing the results and trying it out as a viable replacement.
     
    ElroyUnity likes this.
  21. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Thats really cool!, will definitely try my best to make something very generic but extremely powerful :).
     
    julianr likes this.
  22. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    379
    It sounds a lot like other assets such as dungen, currently uConstruct is the best runtime building system I have used and there are loads of other procedural systems out there, not sure it's in uConstruct's best interest to be honest!
     
    julianr and ElroyUnity like this.
  23. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Yes absolutely, dont worry about it, it will be mainly a side project and the priority of completing it will be fairly low (uConstruct will come first obviously) but if i were to finish it i would put it up as an extension :).

    thanks for your feedback and kind words about uConstruct, really apperciating it :)
     
    tapticc and julianr like this.
  24. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Why just limit its potential ? If its an extension then it can be used if needed, if not don't use it. It makes more sense to have one solution that can do it all and interacts with all of the components, than use several solutions that will take time to work together.
     
    ElroyUnity likes this.
  25. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Just don't over saturate yourself with too many assets that you can't juggle to update. You have two good ones so far, take them as far as you can, making them stable and support the 3rd party integrations and you will have two solid products that will be around for a long time ;)
     
    Last edited: Feb 24, 2016
    ElroyUnity likes this.
  26. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hehe, dont worry trying my best :).
    Currently hoping to get the V1.2 update out as polished as possible, its going to be a really big one :).
     
    julianr likes this.
  27. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Definitely! Very nice idea. Is this the building placement that you talked about? While I like players building piece by piece, I also like the idea of allow players to place complete buildings, especially if the players are building cities and want a town hall or a tavern they can just place it rather than having to build it. It allows me to control the architecture of the game a bit, especially within cultures, making the game more attractive.

    An example is Star Wars Galaxies, although even housing was a complete building. But they used different cultural architectures to complete a theme.

    Anyway, I love the idea and can't wait! I know you can handle another asset. ;) Not at all worried that you won't suppor them to best of your abilities.
     
    julianr and ElroyUnity like this.
  28. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hehe, you can even place complete buildings now, and the coolest thing is that you can make interior props for example placeable inside. The feature i spoke about above is the ability to provide modular parts and the system will proceduraly generate a complete structure out of it :), possibly even complete cities.


    Hopefully that makes more sense now :)
     
    Teila and julianr like this.
  29. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I am so behind. Need to keep up with you, Elroy.
     
    ElroyUnity likes this.
  30. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hehe :D
     
  31. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Should be Good Elroy. I purchased another tool that creates buildings with different floors and roofs (not used it yet), but it doesn't support interiors. So using uConstruct for exterior/interiors using prefabs as such that you can mixup would be beneficial especially tower blocks or apartments with staircases. I used to have to create all these modules by hand then position them correctly which took a bit of time.. so yes a time saver!
     
    ElroyUnity likes this.
  32. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Happy you like the concept :),
    still working on the update, but i started to plan the extension :).
    Will post a cool snap-points gif today that will show the use case for it.
     
    julianr likes this.
  33. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    So, heres the demonstration for the new upcoming feature called "Snap points", this feature was suggested by @Carrotpie who helped me test this system and gave me feedback on what needs to changed and adjusted, he has also let me use his models for the demonstration gifs that i will be showing in this post :).

    So, what are the snap points? under any normal circumstances, using modular building shapes other than cubes will result in some weird side effects, some of them might look something like that : ( snap points arent enabled )

    https://i.gyazo.com/069221a7f0431a770dca7020c0474ec1.mp4
    https://i.gyazo.com/f68af7d7d211cf45b52acf72a2cf0aa2.mp4

    Now, after settng up the snap points, which took less than 5 minutes i was able to get something like that : ( snap points are enabled )

    https://i.gyazo.com/00062e053d4f0cdea114a7bdbf1e95f7.mp4
    https://i.gyazo.com/d1cdd917a52bdbe1a11810cff574ce94.mp4

    As you can see in both those videos, the is building using 1 of the snap points in his possesion, the chosen snap point will then calculate a correct anchor for the building.
    You can also see that the mouse effects the targeted snap point, allowing your players to decide what snapping point fits their needs better.

    This system will allow you to use basically any shape of building, whether its a triangle, a sphere or any kind of a shape that you have in mind, this system will be released with uConstruct V1.2 :).

    If you have any suggestions, thats the time! :)

    Elroy.
     
    Teila, julianr and judah4 like this.
  34. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    379
    Do snap points replace sockets, or do you use a combination of both?
     
    ElroyUnity likes this.
  35. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    its used as combination :)
     
    julianr likes this.
  36. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Before heading to sleep i wanted to show a little enchantment i've done to the building placement, before when trying to place a building on a place where he doesnt belong he just wouldnt show up, but now i've added a little mechanic that takes into account both sockets and world objects as "hover targets", each socket can be used for that purpose and if he isnt marked like that it wont take him into account, so for instance, in the demo scene, the "terrain" is marked as an hover target so you can freely place on it.

    Before :
    https://i.gyazo.com/d1e5589aa04275a15a858192dcd1a98a.mp4

    After :
    https://i.gyazo.com/3cfe3779ab2331cc9fd86a223a0706bd.mp4

    As you can see theres a big improvment in the feedback you get when placing a building :).

    Elroy.
     
    tapticc, Teila and julianr like this.
  37. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    so technically you could have specified building foundation plots, where you can build on, but nowhere else and see it visually going from one to the other - much improved on the first :)
     
    Last edited: Feb 27, 2016
    ElroyUnity likes this.
  38. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Yes it just gives a nicer feeling than before :)
     
    julianr likes this.
  39. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    379
    Nice one
     
  40. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    379
    Sometimes when placing pieces such as foundations, the red material shows so you know you can't place a piece but the piece still intersects with another foundation piece and they overlap. This results in the 2 pieces sharing the same space and the top faces for example glitch as they are the same height. Would it be possible to do something with this, maybe reduce the scale of piece being placed?
     
  41. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    This is supposed to be handled as part of the smart behaviour, the new version should tidy it up to be more accurate :).
     
    tapticc likes this.
  42. mensch-mueller

    mensch-mueller

    Joined:
    Nov 25, 2014
    Posts:
    156
    Hi Elroy
    Bought your asset just as it came out. Great development so far!
    I would really like to see example scenes of using this asset with:
    -Terrain formation condition, like
    https://embed.gyazo.com/6d26e50876c0f030c89a2f0b3d60b4bb.mp4
    And i would like to know if there are parameters, that we can tweak, like offset?
    -how to removing Detail & Restoring upon destruction, like
    https://embed.gyazo.com/b12375cc149ac6222b436e9af1b94591.mp4
    for noobs like me! :D

    And an simple example scene with the Bolt scripts you´ve already wrote!(i´ve bought Bolt long time ago in a sale, hoping to support an independent developer :confused:).

    Also i would ask, if there is a possibility to replace a part, I've already created in game-play.
    So, for example if just swapping out a simple wall (type wall) to a wall with window(also type wall).
    That would be a great addition, my opinion.

    Onother question: isn´t it already possible to place whole buildings, just define them as sockets?

    Keep up your great work on your asset, it´s always a pleasure to look here what´s coming next! :)

    Cheers Michael
     
    ElroyUnity likes this.
  43. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey Michael,
    Thank you for your kind words :),

    - Yes, i will create a video that will include a tutorial on using all of the conditions. This condition was a default condition before but i removed it from default as its really heavy on big terrains (heights changes), and yes there are :), hopefully if i wont forget V1.2 should include more parameters to edit :).

    - Of course!, this condition actually stayed as default and it will be explained as well on the tutorial i will create, there is an option to trigger "Revert on destroy", which basically decided if it will revert the changes or not when the object is destroyed.

    - The new networking tutorial which i am hoping to release very soon will show how to get the most efficent way with networked buildings, i will also make sure to include the files this time (obviously not the assets it self, but just the one i created on the video hehe :D).

    - Not sure i understood your question :).

    - And yes, exactly :), just make that complete structore as a normal building, there shouldnt be any custom code or anything like that, it should just work out of the box :).


    And thanks!, i will do!.
    V1.2 should bring a lot of changes, just like V1.1 did :)

    Hopefully i answered your question :),
    Elroy.
     
    julianr likes this.
  44. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
  45. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Awesome! How does it work? Does it take the QTYs from Inventory Pro, or do you have a GUI inventory that links to the Inventory Pro one and uses up the values from there?
     
    Last edited: Feb 29, 2016
  46. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Its actually REALLY simple, i hope to make a tut today :)
     
    julianr and Teila like this.
  47. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    379
    Hiya, I'm having trouble figuring out how to connect different size pieces. I have a foundation which is 5x5 size, placed some of those and connected them no problem. I then want to attach a 10x5 to one of the 5x5 foundations but they always overlap.




    I did try snap points but they seem to snap to the corner rather than the middle.



    How should I set the connectors up to handle different length pieces please?
     
    ElroyUnity likes this.
  48. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Hey the snap points are snapping exactly to the point so middle means exactly in the middle hehe you might want to put it in the corner instead :)
     
  49. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    379
    I tried the corner and the 5x5 pieces overlap then



    It may be I am using proper modelled FBX files with centre pivot, I will email the models over :)

    One query though, I thought a snap point on one piece would snap to a snap point on another piece, rather than the centre of the new piece attaching to the already placed snap point?
     
    ElroyUnity likes this.
  50. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    I have used this with World Steamer , so I can Steam my terrain and make sure each tile is disabled, which includes buildings built as well, which is nice.

    Elroy do you have a Skype by chance?