Jump to content

How was your heirarchy ?


BunnyViking

Recommended Posts

Here's some dumb fun. How clean was your hierarchy when you were finished ? Keeping a project organised really helps when you're doing a jam _especially- if you're collaborating with someone else.

My game heirarchy was fine someone else coming in who knows GC2 should be able to figure out most of the setup ... my project heirarchy, especially the 'art' folder got a bit messy, I wouldnt want someone else having to dig in there to find what they need.

 

heirarchy.PNG

folderH.PNG

  • Like 2
Link to comment
Share on other sites

This is actually a good one that doesn't get hit on but I think is very important in Game development. 

Sometimes it can be hard to organize your project the hierarchy seems to be a common topic when it comes to this along with the project files. 

Having a clear structure setup for your scenes is really important. 
It comes down to finding things but also optimization. 
When you group objects typically what I do is group them per terrain and then all of the major systems. 

Yours is super clean which is good but I would break it down a bit further as well. 
Mainly when it comes to objects (try to define global and local). 

Local objects keep in local groups for optimization when doing things like culling etc. 

Project files make sure to go through and reduce reduce reduce. 
Get rid of all the junk you don't need or you know you are not going to use. 

This includes Gaia and GeNa. 
If you are using low poly biomes and different assets remove the rest of the preset biomes in that project. 
Save on size and time later. 

Don't just add assets in without looking through them. 

I always suggest make a test project separate from your main project and dump the assets to. 
This will help make sure that the assets work well together, that its clean and you know what to keep and not to keep at import. 
 
Good stuff Bunny! 

  • Like 2
Link to comment
Share on other sites

Well there's a balance to be had between tidy scene hierarchies and performant scens. For items that are going to be moving having a deeper than necessary hierarchy is pad for performance as when a transform changes Unity has to traverse the entire tree to update all transforms. If an item is marked static then you don't have this problem.

I separate things out into individual scenes. I also have dev scenes that have a bear minimum in them. So if I am working on Animal AI, for example, I have a separate dev scene that has just enough to test the animal ai.

So, in my game I had 3 scenes for the game (main menu, Natures, Bloodbath stadium). plus four dev scenes - characters, animals, fighters and stadium.

As much as possible I load managed in on the menu screen and dontdestroyonload them. My main scene has nothing but menu UI. My nature scene has all the Gaia/GeNa folders (tons of them!!!!), a managers parent and 20 characters in the route. All the wildlife etc.  is spawned at runtime into the root.

My fighting scene has a camera a bunch of static models under a single parent for the stadium and a manager. Everything else is spawned at runtime into root.

 

Edited by Sorra the Orc
  • Like 3
Link to comment
Share on other sites

12 hours ago, Bryan said:

[snip]

 

Yup I agree with pretty much everything you said. One of the places my game heirarchy is bad (and you can't see it in the screenshot) is that I have a bunch of different objects holding local vars (which is the way GC does things but you can imagine it as being whichever script is holding that var) that could have been condensed into less (or a single) object. I did have issues later in development where I was trying to find the one var I wanted to refer to, for example grabbing a copy of my score variable, because I couldn't remember which object it was attached to.

Optimisation is definitely something I need to learn more about and game jams have been such a great learning experience for me in that regard. I have to admit i'm still to a large extent in the 'if it runs on my pc at an ok framerate its good enough' mindset... and I have a decent machine so that's not always the best call.

  • Like 2
Link to comment
Share on other sites

5 hours ago, Sorra the Orc said:

[snip]

 

I still havent made anything where stuff has to transition between scenes 😄 For BoN it was just a scene for the main menu and a scene for the game.

I totally agree with developing in multiple scenes I dod the same, especially if i'm worried about breaking things. I think for BoN I ended up with my main scene and 3 other dev scenes... I did the main game systems first in a scene... then I did the map in its own scene (which became the main scene where i moved everything else to) ... the titles were their own scene and I think I developed the slug AI in its own scene. I might have had a scene where I played with GUI too but I think I did most of that in-place as its non-destructive to other game objects.

I was given that advice about transform heirarchies once so I do try to minimise deep objects as well, and that's a great one to point out to people who don't know that unity has to calculate everything down the heirarchy even if it's not a visible object. I am not always good at remembering this in the heat of the moment 😄 I generally make parent objects and then only move the sub-object(s) that need to but sometimes (like in this jam) in silly, and forget, and my player was probably moving about 20 or 30 sub-objects instead of about 9.

 

  • Like 2
Link to comment
Share on other sites

I'm pretty anal when it comes to project and scene organization. A few things I do in almost every project:

1. My project code/assets/etc. always live in a folder named _Project off the root. I leave all 3rd party assets wherever they install to (some assets break horribly when they're moved). The "_Project" name pops my folder to the top (well, until some asset comes along and does the same thing).

2. Under my _Project folder things are organized with the usual suspects. Scenes, Prefabs, Resources, Art, etc. with subfolders under these if needed. I use an "Editor" folder for editor code and a "Runtime" folder for game code (rather than "Scripts"). My brain never liked "Scripts" when it comes to C# and nobody writes scripts anymore. I was using a "Code" folder but that didn't seem right then I found some examples where people were naming the code folder "Runtime" and this made sense since it's complimentary to "Editor" so that works for me.

3. Inside the heirachy I organize things as best as possible under empty game objects. I have a gist that styles empty game objects when they start with "//" so I use this to separate sections like you have (UI, player, camera, map, etc.). You can find it here (licensed under the MIT license): https://gist.github.com/bsimser/adab42840fa0f5f6dfc467361f3c3e5a

4. I usually have a typical setup creating a minimum of two cameras, one for the action and one for UI (using the layers to separate them) so anything I mess around with the game camera like filters, etc. keeps it out of my UI stuff. This also let's me position my UI where ever I want in my scene so it doesn't get in the way of the elements.

A couple of other things mentioned was a separate project for testing assets. That works. I have a rolling project called sandbox for that stuff. I also will make a *lot* of test scenes for things like building new UI, testing animations, etc. so anything that doesn't get put into a prefab (which is almost everything) I can just drag that scene into my main one, grab the stuff out of it I need, and unload the second scene in the editor.

  • Like 4
Link to comment
Share on other sites

On 12/30/2021 at 3:32 AM, Bil Simser said:

[snip]

I like the idea of making a _project (or whatever folder) ... when I collaborate with someone I usually make an 'Art' folder and keep most of my stuff in there (given i'm mostly an artist) and I usually put my art assets in their own subfolders or grouped into subfolders. I find the model/materials/textures/ etc breakdown is onerous when you're working with assets you'll update... it's easier to have the assets more self-contained so if you want to change a single texture for door21 you can go to doors/door21 and everything is there rather than trawling through 400 textures.

I really wish Unity had a better setup for 3rd party assets, it's nice when things go into packages but also sometimes harder to remember they exist 😄 Of course it'd also be nice if Unity could have the option to update code on the fly so you could move assets without breaking references. Where are mah symbolic links ????

You're definitely more organised than me, and I strive to be more like you as I work on more of my own projects.

  • Like 1
Link to comment
Share on other sites

One of the key reasons I use a single _Project folder is that I exclude everything else under Assets when checking into source control. So I'm only checking in my own code, art, assets, etc. rather than store bought ones. Should a project go open source I don't have to worry about the repo containing commercial assets. 

It would be nice if Unity has something like what Visual Studio has in it's solution explorer where you can focus on a node and exclude everything else then you don't have to sift through everything when working on your stuff, but having in a "_" prefixed folder at least pops it to the top.

  • Like 1
Link to comment
Share on other sites

10 hours ago, Bil Simser said:

One of the key reasons I use a single _Project folder is that I exclude everything else under Assets when checking into source control. So I'm only checking in my own code, art, assets, etc. rather than store bought ones. Should a project go open source I don't have to worry about the repo containing commercial assets. 

It would be nice if Unity has something like what Visual Studio has in it's solution explorer where you can focus on a node and exclude everything else then you don't have to sift through everything when working on your stuff, but having in a "_" prefixed folder at least pops it to the top.

Ah that's a good call. I've definitely run into issues where certain assets rely on huge .dlls and I haven't been able to push builds

Link to comment
Share on other sites

If you're using git as your source control then make sure you install and enable LFS to it handles the really big files. Github has a hard limit of 100MB for pushes but has a upper limit of 2GB with LFS so keep that in mind if you're using that service.

Link to comment
Share on other sites

I got an email yesterday from GitHub. Aparrently I am "over 150%" of the allowable LFS storage and I've had it suspended on my account and I have to pay now. OK, that's fine, but how much over 150% am I? The limit is 100Gb, I have 475Gb... that's quite a lot over!

Link to comment
Share on other sites

6 hours ago, Sorra the Orc said:

I got an email yesterday from GitHub. Aparrently I am "over 150%" of the allowable LFS storage and I've had it suspended on my account and I have to pay now. OK, that's fine, but how much over 150% am I? The limit is 100Gb, I have 475Gb... that's quite a lot over!

This is actually the reason I am using an on-premise server version of PlasticSCM. 

Regarding the hierarchy, mine always looks like a structured mess 😁. Need to definitely restructure when I start working on my live game project. 

Link to comment
Share on other sites

3 hours ago, MiTschMR said:

This is actually the reason I am using an on-premise server version of PlasticSCM. 

Regarding the hierarchy, mine always looks like a structured mess 😁. Need to definitely restructure when I start working on my live game project. 

I need to give plastic another try... I gave it a go once and couldn't figure out how to get unity to send files to it but I didn't try very hard. I'm more than happy to store my own source control... like, it's got to be better than backing up a whole unity project every major change.

Link to comment
Share on other sites

On 1/4/2022 at 6:43 AM, Bryan said:

I have used Tortoise SVN in the past which I liked. 
The only thing is that you have to use your own storage devices. 
 

Took a look at tortoise today and saw there's an asset integration for unity so I'll give that a serious look. Free is a good price 😄 cheers.

Link to comment
Share on other sites

7 minutes ago, BunnyViking said:

Took a look at tortoise today and saw there's an asset integration for unity so I'll give that a serious look. Free is a good price 😄 cheers.

Yeah I used it for an mmo. 
Sometimes it was a pain when working with a ton of people. 
Its easy to use and they can revert really easy as well. 
They can also comment on their commitment as well, which you can tell who messed up the project. 

You don't have to worry about anyone else other than your own hard drive failing (which is the downside), just save backups like you normally would not on the same drive. 

 

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...