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

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

КОМЕНТАРІ • 87

  • @beardordie5308
    @beardordie5308 5 років тому +250

    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 5 років тому +17

      Lol, this is why I came.

    • @philippschmitz1787
      @philippschmitz1787 5 років тому +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 4 роки тому +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 4 роки тому

      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 4 роки тому

      @@philippschmitz1787 dude. You just saved my life.

  • @caaldiga
    @caaldiga 5 років тому +57

    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 5 років тому +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.

  • @XtroTheArctic
    @XtroTheArctic 5 років тому +34

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

  • @TheVagueIdeas
    @TheVagueIdeas 5 років тому +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_ 5 років тому +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.

  • @indieprogress7170
    @indieprogress7170 5 років тому +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!

  • @piotrw3366
    @piotrw3366 5 років тому +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 3 роки тому +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)

  • @SalmanKhan-dx1ch
    @SalmanKhan-dx1ch 4 роки тому +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

  • @chrisbebek3192
    @chrisbebek3192 5 років тому +22

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

  • @sickre
    @sickre 5 років тому +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 5 років тому +17

      then don't watch at 1.5 speed ;)

    • @killjoy999
      @killjoy999 5 років тому +5

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

  • @Visigoth_
    @Visigoth_ 5 років тому +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!*

  • @HyagoPinheiro
    @HyagoPinheiro 5 років тому

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

  • @bazzboyy976
    @bazzboyy976 5 років тому +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 3 роки тому

      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.

  • @glebpalchin6809
    @glebpalchin6809 5 років тому +7

    Finally a video

  • @dopplegangerdavid
    @dopplegangerdavid 5 років тому +28

    Is your notebook using stealth camoflauge?

  • @o.429
    @o.429 5 років тому

    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.

  • @tientam779
    @tientam779 4 роки тому

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

  • @justinwhite2725
    @justinwhite2725 5 років тому +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 5 років тому +1

      Kind sir, can you put the Timestamps? Thanks.

    • @caaldiga
      @caaldiga 5 років тому +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 4 роки тому

      One word 4 u , Hero

  • @sagiziv927
    @sagiziv927 5 років тому +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  5 років тому +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 5 років тому

      @@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 5 років тому

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

    • @sagiziv927
      @sagiziv927 5 років тому

      @@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 3 роки тому

      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

  • @Fallstudio
    @Fallstudio 5 років тому

    Super useful tips! Thank you very much!

  • @PierryRiku
    @PierryRiku 4 роки тому

    Amazing video. Thanks for sharing your experience :)

  • @mehmetakyuz5290
    @mehmetakyuz5290 5 років тому

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

  • @jumanjgojag9428
    @jumanjgojag9428 5 років тому +5

    Next Ep Coding Big Games

  • @dan-mechanics2014
    @dan-mechanics2014 4 роки тому

    Great tips

  • @midniteoilsoftware
    @midniteoilsoftware 4 роки тому

    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.

  • @michaelros7817
    @michaelros7817 5 років тому +1

    Thank you soooo much for this!

  • @mana20
    @mana20 5 років тому +2

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

    • @Unity3dCollege
      @Unity3dCollege  5 років тому

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

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

    I love big games

  • @julianodbz
    @julianodbz 5 років тому +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 5 років тому +1

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

  • @phobos2077_
    @phobos2077_ 5 років тому +4

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

    • @Unity3dCollege
      @Unity3dCollege  5 років тому +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_ 5 років тому +1

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

    • @Unity3dCollege
      @Unity3dCollege  5 років тому +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 5 років тому

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

    • @leonidus101
      @leonidus101 5 років тому

      ​@@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".

  • @steveh4394
    @steveh4394 3 роки тому

    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 3 роки тому

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

  • @reed9269
    @reed9269 5 років тому

    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.

  • @abdoudjam6846
    @abdoudjam6846 5 років тому +1

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

  • @teemuleppa3347
    @teemuleppa3347 3 роки тому

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

  • @DJLKM1
    @DJLKM1 5 років тому

    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 5 років тому

      Try Google: 'mysql and unity'.

    • @DJLKM1
      @DJLKM1 5 років тому

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

  • @justaguy7532
    @justaguy7532 5 років тому +1

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

    • @GrumpSkull
      @GrumpSkull 5 років тому

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

  • @lorenfulghum2393
    @lorenfulghum2393 4 роки тому

    make sure to use a green notebook

  • @robosergTV
    @robosergTV 4 роки тому

    time stamps? 30 min....

  • @SuperKantoon
    @SuperKantoon 5 років тому +1

    Futurama much ?

  • @gaming4fun419
    @gaming4fun419 5 років тому

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

  • @Injabsful
    @Injabsful 2 роки тому

    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 3 роки тому +1

    This feels like lots of useless speach

  • @babudelhi9885
    @babudelhi9885 5 років тому +2

    Make it series bro

    • @Unity3dCollege
      @Unity3dCollege  5 років тому

      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 :)

  • @ed_halley
    @ed_halley 5 років тому +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 UA-cam, a visual medium. This video was more like a podcast for the car radio!

    • @beardordie5308
      @beardordie5308 5 років тому +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 5 років тому +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 5 років тому

    i dont understand

  • @babudelhi9885
    @babudelhi9885 5 років тому +3

    Cause large videos will make kinda bored