10 Steps I use to Design and Code Big Game Systems in Unity3D

Sdílet
Vložit
  • čas přidán 13. 09. 2024

Komentáře • 88

  • @beardordie5308
    @beardordie5308 Před 5 lety +249

    What I'm interested in seeing is a project folder structure, scene-hierarchy structure, prefab structure, and a brief description of each class in a real world game that was built with good architecture. This would be valuable to learn from to see realistically what a developer will need to implement in a complete game, even if it has to be obscured or somewhat genericized due to NDAs, etc.

    • @Robber7
      @Robber7 Před 5 lety +17

      Lol, this is why I came.

    • @philippschmitz1787
      @philippschmitz1787 Před 5 lety +29

      That depends heavily on your game you're developing... there is no one true way to do it. But me for my part do it like the following:
      1) LevelPrefabs... those are almost useless if they are not really intelligent. What does that mean? Well, LevelPrefabs can save you alot of time and makes LevelDesign hell a lot easier and more fun... and LevelDesign is kind of a tedious task which you want to be as much fun as possible, that your level designer keeps being motivated to try out and experiment. That's why LevelPrefabs should work like modules in a map editor. So they should come with a collider, animations (i case there are any moving parts), lighting and so on. All the leveldesigner should have to do is putting it in the scene.
      2) For the Hierarchy keep it simple and use clearly named (very important) empty GOs to sort your Hierarchy.
      3) Same counts for the Project Folder... Have a folder for the scenes, scripts, prefabs, sprites & models. Don't let them get crowded and use subfolders to sort 'em in a similar way you did it with the hierarchy. For Example: You have prefab folder with all your level modules and some are something else... so you create a new folder, call it level modules and put all your modules inside. Proparbly you have dozens of level modules with different biomes or themes, so you continue sorting by creating a folder for all desert modules, then one for grasland and so on... pretty logical, isn't it.
      4) There's really no rule for which script you need inside a game. The only rule is: Use your brain! There are certain scripts that are in almost every game tho (dunno if it's done in big game companies, but for me it worked out in the past):
      1) GameStateMachine 2) some kind of manager or overall controller, that talks to scene management and do all the utility stuff. It's often a MonoBehaviour to use the Start and Awake to be able to initialize your game. So it works like a dungeon master in DnD... that's why I call it (not really a naming convention, but it's my convention) Master (GameMaster, DungeonMaster, BattleMaster... pick one that fits). All other scripts are connected to the master, so if you look for something you just refer to your master to find it. I think GameManager is the actual convention for that. But I'm not really a coding expert... so be careful with my #4...
      I hope i didn't talk too much BS... but this is how I work before i can get some real programmers on board.

    • @philosophy-of-investing
      @philosophy-of-investing Před 4 lety +4

      Could someone link to a few example repositories which highlight the architecture used in large game projects? All the specific details can be removed. Just curious like everyone else here about the project structure and architecture.

    • @argosbrave6415
      @argosbrave6415 Před 4 lety

      As was said before, this depends heavily on the game you're making, and also on your studio. For instance, Unreal Tournament has source code readily available, but their folder structures night inexistent (I mean that, they have almost all classes sitting in 1 folder). Regardless, just search for projects that have made their source code available

    • @fuchsfarbe7660
      @fuchsfarbe7660 Před 3 lety

      @@philippschmitz1787 dude. You just saved my life.

  • @XtroTheArctic
    @XtroTheArctic Před 5 lety +34

    It's not easy to find a good teacher in CZcams jungle. You are one of them. Not for me but for the community. Thank you.

  • @caaldiga
    @caaldiga Před 4 lety +58

    Nice video on your process. It would be nice to have some detailed examples about your systems, controllers and processes.
    I went through my notes and made a list for future viewers:
    1 - Talk with the designers and gather detailed notes on what the system should achieve. (0:45)
    2 - Talk with the other programmers about the system and how it relates to other systems. (3:55)
    3 - Sketch the UI on paper to have a basic design and think of the needed data structures. (5:01)
    3.a - Get feedback about your ideas from the designers and programmers. (6:53)
    3.b - Think about data structures: what data to save, what data needs to show in the UI? (7:40)
    4 - Rough out the high-level code architecture: Systems, Controllers, Processors. (9:49)
    4.a - Systems (10:48)
    4.b - Controllers (11:47)
    4.c - Processors (14:12)
    5 - Set up the databases / data structures. (15:48)
    6 - Create some tooling to add data easily. (18:20)
    7 - Stub out the major classes, interfaces and methods. (20:24)
    8 - Write the unit tests. (22:43)
    9 - Start writing the code, working backwards from the unit tests. (24:12)
    10 - Get feedback from designers and programmers, and iterate. (26:03)
    11 - Use the system yourself, watch other people using it. (28:05)

  • @clwu3333
    @clwu3333 Před 5 lety +60

    I like this kind of topic because many tutorials are there about how to make a game already but most of them are at entry level or just implement the core gameplay.

  • @TheVagueIdeas
    @TheVagueIdeas Před 5 lety +18

    I’d love to hear more about this topic, specifically with regard to building a multiplayer system of some sort and building it so that cheating / hacking becomes hard or better yet impossible

  • @_ian_
    @_ian_ Před 5 lety +3

    Another great video, thanks Jason. This honestly applies to *any* large software project, not just games. Anything at all. You teach this material very well.

  • @SalmanKhan-dx1ch
    @SalmanKhan-dx1ch Před 4 lety +2

    I just discovered your channel
    i wish i had found you years ago
    Because you answer a lot of stuff other You-tubers usually don't touch
    Thanks

  • @indieprogress7170
    @indieprogress7170 Před 5 lety +4

    Really great advice! I continually find myself adding new features to existing systems or creating new systems without thinking it through fully first. I keep learning through my own failures and I'm improving on organizing my canvas game objects and scripts, but still a lot to improve on. Thanks, again!

  • @chrisbebek3192
    @chrisbebek3192 Před 5 lety +22

    Damn. Can't get started without the see through notebook

  • @piotrw3366
    @piotrw3366 Před 5 lety +1

    Great video Jason, thank you! I myself am doing a mediumish game and after 6 months when I finally started grasping solid I see all my mistakes. The advices you give are invaluable for me. I hope you can make more videos where you explain the topics relevant to bigger projects. Thanks again!

  • @vast634
    @vast634 Před 3 lety +2

    For UI: I find it helpful to separate the content from the style. As to first write down at wich point in the UI (ingame, menu, options, inventory, stats etc) what content must be visible, and how the player can manimulate it (enter values, click buttons, sliders etc)
    Once that content is defined, only then to think about a style (arrangement of those elements and artwork)

  • @Visigoth_
    @Visigoth_ Před 4 lety +9

    Notebooks... I use Google Docs (hyper text is super helpful, so are the collaboration features, and the change logging). Bonus is I also use Docs on my Samsung Note. (Not a programmer/coder - that's why I'm here; trying to lean how to speak my coder's language - to save us both time).
    -Edit
    I also use Adobe Draw (for drawing quick concepts).
    -------
    Game Design is *Hard!*

  • @sickre
    @sickre Před 5 lety +51

    For a long and complex topic like this, it would be good to have some on-screen text - at least for the title of each section. I watch at 1.5x speed and it can be hard to keep track. Dot points of major points would be even better.

    • @PDF4711
      @PDF4711 Před 5 lety +17

      then don't watch at 1.5 speed ;)

    • @killjoy999
      @killjoy999 Před 5 lety +5

      Create a green notebook object with a special transparency shader attached to it and take notes!

  • @HyagoPinheiro
    @HyagoPinheiro Před 5 lety

    Thank you for sharing those tips. They're great for juniors programmers who want to give the next step.

  • @glebpalchin6809
    @glebpalchin6809 Před 5 lety +7

    Finally a video

  • @bazzboyy976
    @bazzboyy976 Před 5 lety +2

    Hey Unity3D College, great video as usual. This is a topic that I feel like is hardly touched on but its so important. I've shipped 3 games at the company I work at. Each project I try hard to design good code which usually ends up sucking (inflexible usually) and then I become grouchy whenever someone asks me to implement a new feature or change something. I'm trying my best to improve by watching videos on design patterns and such, however they're always solutions to specific problems and not overall architecture. I also like the way you break things down using the fundamentals, like how you will prepare ur data structures and data manipulation processes and systems. I don't have trouble creating systems, but it's when the systems must interact with each other and entities need system specific data structures appended to them, that our projects begin to shit themselves. Anyway, would love to see in more detail how you do this, I like the easy-going attitude you have towards designing your code. You seem like you would be a great person to work with!
    Cheers for the vids

    • @jefbonkowski1074
      @jefbonkowski1074 Před 3 lety

      My limited experience is telling me to tell you to make sure your classes and interfaces are loose and abstract as opposed to strict and rigid. Avoid specificity and let the (neccessary) data flow steer your code structure.

  • @justinwhite2725
    @justinwhite2725 Před 5 lety +11

    I was making notes and I feel like you missed numbers 6 and 9. You didn’t number each point so maybe I thought two steps were one.
    1) talk to game designers.
    2) talk to other programmers.
    3) brainstorm the ui.
    4) think about the systems/controllers/classes and other architecture. USE INTERFACES and processors
    5) set up the data structures and design data tooling for designers to implement it.
    6) ????
    7) implement the top level hierarchy - controllers and interfaces. Use this to refine and flesh out the data structures.
    8). Write unit tests and work backwards to inform how the code is written.
    9) ???
    10) start showing it to designers and other programmers.
    11) put in some content yourself to see where bottlenecks are. Then watch designers put in content.

    • @3333218
      @3333218 Před 4 lety +1

      Kind sir, can you put the Timestamps? Thanks.

    • @caaldiga
      @caaldiga Před 4 lety +2

      I believe step 6 was "create tooling for designers" and step 9 "write the code", though I must have also missed something at the beginning because I thought your step 1 and 2 were a single step, info gathering. It would have been really nice if Jason had at least put the step list in the description.

    • @rikrishshrestha5421
      @rikrishshrestha5421 Před 4 lety

      One word 4 u , Hero

  • @dopplegangerdavid
    @dopplegangerdavid Před 5 lety +28

    Is your notebook using stealth camoflauge?

  • @Fallstudio
    @Fallstudio Před 5 lety

    Super useful tips! Thank you very much!

  • @o.429
    @o.429 Před 5 lety

    Hey Jason. Thank you very much for all those videos. You are an epic guy helping everyone. I looked at them but couldn't find any video about data safety of multiplayer games. I am trying to build a simple multiplayer mobile game. You know that major killer for these games are cheaters. I am not trying to say teach us everything about it but a video which highlights topics for us to go and learn would be great.

  • @PierryRiku
    @PierryRiku Před 4 lety

    Amazing video. Thanks for sharing your experience :)

  • @tientam779
    @tientam779 Před 4 lety

    Get a note pad, talk to the Game Designer or Game Designers! - BOOM - dude is a pro!

  • @jumanjgojag9428
    @jumanjgojag9428 Před 5 lety +5

    Next Ep Coding Big Games

  • @michaelros7817
    @michaelros7817 Před 5 lety +1

    Thank you soooo much for this!

  • @sagiziv927
    @sagiziv927 Před 5 lety +10

    Can you create a video about SQL in unity, I know how to access database but when I build my project I lose the reference to the db because it is local

    • @Unity3dCollege
      @Unity3dCollege  Před 5 lety +2

      Can you explain the game a bit more? What type of game is it, how many ppl are playing and what from? I can probably put something together but wanna make sure it's the right thing :)

    • @sagiziv927
      @sagiziv927 Před 5 lety

      @@Unity3dCollege It is not exactly a game, my project is more of an encyclopedia for out employees, but more interactive and fun to use. The idea is that users can see 3D models and rotate around them and read the data about them, that way they can learn everything they need (Instead of opening a 2D book with 2D pictures).
      Right now what I am doing, is using an AssetBundle to save the models and a binary file to save the data. That way I can easily change everything without opening the project in unity and rebuild. The problem is the binary file, as you probably know, it is easy to use but the main problem is versioning. I can't change the class that is written in the file, because then I won't be able to read the file and all data would be lost. Therefore I want to use a DB, I know how to access it but don't know how to export it with the project. Most users that would use it probably be offline because it is more for our company employees.

    • @ZoidbergForPresident
      @ZoidbergForPresident Před 5 lety

      @@sagiziv927 Write an external dll you use in Unity and a Webservice?

    • @sagiziv927
      @sagiziv927 Před 5 lety

      @@ZoidbergForPresident Currently I have a dll that contains the class written in the binary file, and I use it in the project and in another program in Visual Studio that lets me edit the data. but if I change the class itself (like removing/adding variables) I can't read the file anymore.
      That why I want to move to DB

    • @mattdonnelly3119
      @mattdonnelly3119 Před 3 lety

      There is an old wiki for sql in unity wiki.unity3d.com/index.php/Server_Side_Highscores basically have a look at it build an data base and change the script to how you want it

  • @midniteoilsoftware
    @midniteoilsoftware Před 3 lety

    I love your videos. Have your ever done TDD for a networked game? I'm starting a project using Mirror and am struggling with how to apply your principals where so much of the functionality is around callbacks, RPCs, etc.

  • @mohokhachai
    @mohokhachai Před rokem

    I love big games

  • @dan-mechanics2014
    @dan-mechanics2014 Před 4 lety

    Great tips

  • @mana20
    @mana20 Před 5 lety +2

    Are the processors you're talking about similar to the ECS systems set up ?

    • @Unity3dCollege
      @Unity3dCollege  Před 5 lety

      Very similar concept, but not quite as advanced/complicated (or performant, but still more than fast enough) :) Great question btw!

  • @mehmetakyuz5290
    @mehmetakyuz5290 Před 5 lety

    Would you use data-oriented design? How would you plan on software paradigms for different kind of projects?

  • @julianodbz
    @julianodbz Před 5 lety +1

    Hi Jason, From your experience, how much performance cost a bunch of UI elements in The game, by UI I mean images, canvas, text etc. Should be wise to use it freely or Will I get some terrible performance issues? Thank you.

    • @GrumpSkull
      @GrumpSkull Před 5 lety +1

      High FPS complex 3D graphics are usually the bottleneck, not a bunch of semi static buttons and the like.

  • @phobos2077_
    @phobos2077_ Před 5 lety +4

    Could you share some of the popular games you worked on?

    • @Unity3dCollege
      @Unity3dCollege  Před 5 lety +9

      Sure :) Staying on topic of mmos and big games I got the opportunity to work on VanguardSOH, Everquest II, and a tiny bit on EQ1. And the current mmo i'm working on is www.pantheonmmo.com. Also a bunch of other games, but those were the most popular by far :) (and probably the most fun to work on lol, mmos are a blast) :)

    • @phobos2077_
      @phobos2077_ Před 5 lety +1

      @@Unity3dCollege wow, those are some old games way before Unity's era. You're an industry veteran :)

    • @Unity3dCollege
      @Unity3dCollege  Před 5 lety +3

      ya it's amazing how much easier things are now w/ Unity though :) It feels like it's so much easier to build good scalable systems with today's engines (i'm sure part of it is just experience too, but the power of engines today is amazing imo :)

    • @Dunric2
      @Dunric2 Před 5 lety

      @@Unity3dCollege - I guess that explains why you were logged into VS as Brad McQuaid for some of your earlier videos! ;)

    • @nikunev
      @nikunev Před 5 lety

      ​@@Unity3dCollege Show us, please! Build a good scalable system, it is much easier now, right? For example make a round based 2D multiplayer with backend server logic, that would be a good start ;) Your one-video-tips are good, some nice insights from the "game dev kitchen", but it is easy to say make first this, and than that.. the result is not a "voila game is ready".

  • @reed9269
    @reed9269 Před 5 lety

    Hi , I Don't Know If You Take Suggestions or Ideas In General ,
    But I Have This Item.cs With Cliche Fields Like "description,name,cost" With Few SubClasses Like Weapon.cs With Some More Fields "Min Damage,Max Damage" You Get The Idea.
    The Item.cs Is Abstract So I Have To Get Item's .Clone() Function Which Returns Itself As A New Instance If I Want To Buy It Or Pick It Up Or Craft It.
    To The Point,.. How Would You Suggest Doing Enchantments,..Suppose Weapon "Sword " Should Be
    "Of Thrill" Suffix, So ... Should I Do A Class Called Enchants.cs Or Just a Field In Weapon.cs Pointing At Some (Insert good idea here) Somewhere? :) Kinda Lost Here . Thank You.

  • @crankyunicorn4423
    @crankyunicorn4423 Před 5 lety

    Hi I normally use a lot the sketch book and kind ask myself as a game dev to a programmer what i whant, what I need and the height of that option or trait in the final result. UI is my pain

  • @steveh4394
    @steveh4394 Před 3 lety

    As a visual learner, what I wouldn't give for some diagrams showing visually the interactions between the different pieces Jason is referring to. I struggle to follow everything he's says with no picture in my head of how everything fits together. Of course, creating visuals like that is way more time consuming than just talking through things.

    • @jefbonkowski1074
      @jefbonkowski1074 Před 3 lety

      The more you touch code the easier it is to visualize the structures

  • @teemuleppa3347
    @teemuleppa3347 Před 3 lety

    does the notebook have to be invisible? **badum tsshhh**
    ...i'll be on my way now

  • @abdoudjam6846
    @abdoudjam6846 Před 5 lety +1

    Thanks so much! wish u work more on editing to simplify the content !

  • @DJLKM1
    @DJLKM1 Před 5 lety

    I've been a Web programmer using databases for years, but how to code a unity project to connect and feed data to mysql I really don't know. Can anyone suggest any video tutorials on here that are good. Anyhow thanks for the development tips.

    • @GrumpSkull
      @GrumpSkull Před 5 lety

      Try Google: 'mysql and unity'.

    • @DJLKM1
      @DJLKM1 Před 5 lety

      @@GrumpSkull Found some, it seems using a php backend is the way to go, so ive been learning that.

  • @justaguy7532
    @justaguy7532 Před 5 lety +1

    Did you assume we had a team?::::D

    • @GrumpSkull
      @GrumpSkull Před 5 lety

      Who needs a committee? You set out to design a racehorse and end up with a camel.

  • @robosergTV
    @robosergTV Před 4 lety

    time stamps? 30 min....

  • @lorenfulghum2393
    @lorenfulghum2393 Před 4 lety

    make sure to use a green notebook

  • @SuperKantoon
    @SuperKantoon Před 5 lety +1

    Futurama much ?

  • @gaming4fun419
    @gaming4fun419 Před 5 lety

    Buy notebooks without lines. Always. Even for writing. No lines. 😜

  • @babudelhi9885
    @babudelhi9885 Před 5 lety +2

    Make it series bro

    • @Unity3dCollege
      @Unity3dCollege  Před 5 lety

      I'd considered it, but for this it's really just a set of steps I follow every time, and doing them out of order would ruin the entire process :)

  • @Injabsful
    @Injabsful Před 2 lety

    JASON, are u free for some work? If anyone here looks for a coding job or designing let me knowbi got smth rolling

  • @zbarba
    @zbarba Před 3 lety +1

    This feels like lots of useless speach

  • @ed_halley
    @ed_halley Před 5 lety +6

    The topic has promise, and there may be some useful stuff in all that talking, but you have nothing but a talking head with a blank chalkboard 99% of the video. Show examples, show bullet lists of topics, show different titles as you talk on different advice points... this is CZcams, a visual medium. This video was more like a podcast for the car radio!

    • @beardordie5308
      @beardordie5308 Před 5 lety +1

      Don't forget stock photos, pie charts, and WordArt. :P Sarcasm aside, I too wanted at least a time-marked list of the points being made. Thanks for this subject. Very valuable and rarely talked about.

  • @Hawkadium
    @Hawkadium Před 5 lety +1

    Finally, so god damn tired of, "Here's how you do it, but we wouldn't actually do it this way in RL" tutorials.

  • @sachinahuja3894
    @sachinahuja3894 Před 5 lety

    i dont understand

  • @babudelhi9885
    @babudelhi9885 Před 5 lety +3

    Cause large videos will make kinda bored