Growing Your Code Library with Each New Project

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ก.ค. 2024
  • In this 2021 Game Career Seminar talk, developer Sherveen Uduwana goes over how to dust off your old scripts and make them usable across multiple projects, to tackle more ambitious games without needing a massive team.
    Register for GDC 2022, in-person in San Francisco, March 21-25, 2022: gdconf.com/passes-prices/?_mc...
    Join the GDC mailing list: www.gdconf.com/subscribe
    Follow GDC on Twitter: / official_gdc
    GDC talks cover a range of developmental topics including game design, programming, audio, visual arts, business management, production, online games, and much more. We post a fresh GDC video every day. Subscribe to the channel to stay on top of regular updates, and check out GDC Vault for thousands of more in-depth talks from our archives.

ความคิดเห็น • 42

  • @Twisted_Logic
    @Twisted_Logic 2 ปีที่แล้ว +52

    This seems like a much more practical version of what I've been doing: Rememnering that I've done something similar before -> dig through my old project files for longer than I need to -> find the code -> rework it almost completely to fit in the new project

  • @GoldDeagle777
    @GoldDeagle777 2 ปีที่แล้ว +63

    "Gamefreak got a ton of flack for daring to re-use pokemon models across all their games"
    No, they got a ton of flack for re-using models when they said they'd be cutting the dex to focus on updating the models and animations.
    I'm definitely for re-using assets across games but this was a bad example of it.

    • @vespirbelmont3131
      @vespirbelmont3131 2 ปีที่แล้ว +13

      Exactly! They told us they couldn't do all the work to create an animate the full amount of Pokemon.
      Then got caught re-using assets and modders showing them up with better models and animations within a week.
      Expansion comes out: They sell us a few more old Pokemon, their true intentions out in the open as: "We just wanted to make more money off of you."

    • @Furymgs3
      @Furymgs3 2 ปีที่แล้ว +2

      Maybe a better example would be Spiderweb Software, the creators of Avernum and Geneforge. They're not _super_ well-known, but their games sold decently enough, though I think they got some complaints because they reuse a lot between games, and you can really see it when you play them. It's pretty justified in their case, since it's literally just the owner and his wife, if I remember correctly. The owner, Jeff Vogel, also did a talk for GDC ("Failing to Fail") where he explains his process, and why it's important and sometimes even necessary to reuse a lot, among other things. It's a more business-like approach, but it was an interesting talk.

  • @zsheets7483
    @zsheets7483 ปีที่แล้ว +3

    2:30 People weren't upset at Game Freak for reusing critter models. People were upset because they claimed graphical improvements as the major reason for removing critters from the roster and we didn't see the payoff from that in the finished product. In other words, it wasn't the reuse but that they had apparently lied based the evidence of observation and data mining.

  • @GameDevYal
    @GameDevYal 2 ปีที่แล้ว +57

    The reason Game Freak got flack for reusing models was because they claimed they had to cut the monster roster in SwSh because "making new models and animations was too much work"... so if they were reusing assets after all, they suddenly had no good reason for making the most controversional decision in the series' history. (And since the game's DLCs added in previously-cut monsters it smells very much like they were making an intentionally worse product so the DLCs would look better....)

    • @speider
      @speider 2 ปีที่แล้ว

      They couldn't use earlier models, since they made stuff in 3D. Using older models was literally impossible, since they were 2d.

    • @MAP233224
      @MAP233224 2 ปีที่แล้ว +7

      @@speider What are you talking about? The 3D models used in Sword and Shield are the exact same they made back in 2010-2013 for XY. They have not changed.

    • @FoxHoundUnit89
      @FoxHoundUnit89 2 ปีที่แล้ว +1

      Yep, this is the real story, but nah the default is to assume "gamers" are being reactionary scumbags :-/

  • @olon1993
    @olon1993 2 ปีที่แล้ว +17

    This is exactly the talk I needed right now! I'm literally about to start my third game after releasing my second and I'm starting to work on a code library. Great talk!

    • @gfujigo
      @gfujigo 2 ปีที่แล้ว

      Out of curiosity, how will you keep track of it? Will you use MS Word or something else to store them?

  • @muzboz
    @muzboz 2 ปีที่แล้ว +4

    Thanks Sherveen! Great talk.
    I'm super glad you used Enemy Controller (NPCs) as the example for a lot of this, because I really needed to learn more about how one might set up code for a variety of enemies with different abilities, and keep it modular and manageable. Awesome!
    The example with Shielded Enemies as a child class, but still with virtual methods, really started to bring this approach into focus for me. :)

    • @muzboz
      @muzboz 2 ปีที่แล้ว

      Oh, and you've even shared a code library with great comments throughout! This is great. Thanks! :D

  • @ivanm71
    @ivanm71 2 ปีที่แล้ว +6

    We need more confs like this one, thank you

  • @Nerdextrous
    @Nerdextrous 2 ปีที่แล้ว +4

    @2:45 Game Freak wasn't attacked for re-using assets so much as they were attacked for those character models being lazy. Little to no animation from the biggest franchise in existence financially. GameCube Pokémon games had more animation lol.
    As an independent yes your statement makes sense.

  • @foreducation408
    @foreducation408 2 ปีที่แล้ว +2

    This was really good talk, i always thought that i should keep the code that i use for almost all of my game in a separate folder so I can just copy and paste it and save me a lot of time but i never did, so after watching this i am gonna start doing that, thanks for giving these tips.

  • @TRFrench
    @TRFrench 2 ปีที่แล้ว

    This is exactly what I needed for a quick Unity Cut Scene heavy project.. Thanks so much

  • @adventuresingamedevelopmen5708
    @adventuresingamedevelopmen5708 2 ปีที่แล้ว +11

    awesome. I always wanted an actual game developer to speak about creating flexible code.

  • @mikehynz
    @mikehynz 2 ปีที่แล้ว

    Great talk. I learned a lot I wouldn't think to ask. And THANK YOU so much for those increddible resources!

  • @thejoblesscoder
    @thejoblesscoder 2 ปีที่แล้ว +6

    This. I'm a huge fan of using a Code Library. The added benefit is that because there is a single location for your code that is shared across projects, if you fix a bug in the code library you then don't have to fix that same bug in 6 different games.

    • @uwyphi
      @uwyphi 2 ปีที่แล้ว +8

      Until you reach the point where fixing something used a bit everywhere will introduce regressions in old project that you can't bother to maintain anymore

    • @thejoblesscoder
      @thejoblesscoder 2 ปีที่แล้ว +1

      @@uwyphi That's why you use unit testing. If the two go hand in hand.... Golden

    • @uwyphi
      @uwyphi 2 ปีที่แล้ว +1

      @@thejoblesscoder Unit testing only ever works for domain layer testing and small algorithms when they aren't just placebo

    •  2 ปีที่แล้ว

      @@uwyphi you can use git submodules (or nuget, npm etc) and reference a specific version. That way the bugfix will only apply to the projects that need it and there's an explicit upgrade process.

  • @Xonatron
    @Xonatron 2 ปีที่แล้ว

    Great talk. Thank you for sharing your experiences.

  • @JETWTF
    @JETWTF 2 ปีที่แล้ว +3

    Games would be better if they didn't reinvent the wheel for each sequel. They would be familiar to the previous version and instead of making it from scratch the developers can add to it and improve upon the existing. Play Game 1 and go to Game 2 as soon as you complete it and you know the controls, you know the dialogue system, you know what you can and cannot do in combat... It's the same game with a different story and maybe a different setting... but it's more because that same game is just the base for a whole new games worth of new stuff that would never be added if they reinvented the wheel.
    Take a fantasy game, Game 2 borders Game 1's kingdom. Architecture, armor, clothing, and weapons... all other Game 1 assets really could be in that border region. Player could even start there so transitioning from Game 1 to Game 2 is seamless. Hud's pretty much the same but with new widgets, inventory has a new tab or 3, controls are the same but with some new stuff you can do, it's an old friend. Get out of the border region and all new stuff. You have twice the stuff the previous game came with, features from the previous game are not gone but all new features are added, it's not the same game but twice the game, twice the armors, twice the weapons, twice the foods, twice the ingredients, and on and on.

  • @jansmycka4338
    @jansmycka4338 2 ปีที่แล้ว +9

    While I like the idea of it, this feels like it's just "Hey, here are few design patterns I used(singleton, interface), they are really cool. You should use them too."

  • @StarContract
    @StarContract 2 ปีที่แล้ว +2

    There's a lot of talk about "code reusablility / scalability". In my experience - anything that isn't packaged to a library for solving a specific problem (physics, rendering, io, ...) will have to be created almost from scratch, per project.
    I might add that of all those design patterns - as useful as they might be for the development team - the only one that made me personally save time and reduce code duplication is the EC / ECS.

  • @gfujigo
    @gfujigo 2 ปีที่แล้ว

    This talk was golden 👍🏿

  • @user-ml8vy8op9k
    @user-ml8vy8op9k 2 ปีที่แล้ว

    I work in a game company now, and want begin a freelancer to make my game, can you tell me how can i get short term work like you. thank you

  • @luke_fabis
    @luke_fabis 2 ปีที่แล้ว +13

    There is a counterpoint to reusing assets. People do notice, and it reeks of laziness and lack of attention to detail.
    It’s one thing if it’s the same asset over and over. Pikachu is Pikachu is Pikachu.
    But if your swamp yetis move the same way as your ghouls, and both in turn move the same way as your clockwork golems, people are going to notice.

    • @thejoblesscoder
      @thejoblesscoder 2 ปีที่แล้ว

      Its why Heroes of Might and Magic 7 was a complete flop. Half of the assets were copy pasted from Heroes 6 which wasn't a great game to begin with. It tried to copy the gameplay of Heroes 5 but with the graphics from Heroes 6 and ultimately just fell flat.

    • @fkknsikk
      @fkknsikk 2 ปีที่แล้ว +4

      I agree, there definitely has to be a balance. Don't waste your time making the same things over and over sure, but don't use the saving of time as an excuse to cut corners either. I feel like more people need to be reminded of the latter these days. Not enough devs reusing assets and code isn't a problem I'd say we have. lol

  • @uwyphi
    @uwyphi 2 ปีที่แล้ว +6

    16:00 Instead of singleton I'd suggest to design your library either purely functional or with IoC friendly classes, or a mix of both. Not being able to manage the lifetime of your objects is something you will end up regretting down the road

  • @smokeback
    @smokeback 2 ปีที่แล้ว +1

    This is very helpful

  • @rednax3333
    @rednax3333 2 ปีที่แล้ว

    Cool vid! I dig the way you think! 👍

  • @RewdanSprites
    @RewdanSprites 2 ปีที่แล้ว

    I want a crazy biblical angel.

  • @vast634
    @vast634 2 ปีที่แล้ว

    Conclusion: be like Batman

  • @themerpheus
    @themerpheus 2 ปีที่แล้ว

    Honestly, no. I have been there before where I built and shipped 10+ indie games. Mostly mobile but hardcore genre, not hypercasual stuff. Mostly not live anymore, due to mobile market shift. Usually when you wanna write modular systems, you tend to think about the architecture 2x times AT LEAST. Along with that, most of the time, the earlier code you have written drastically changes so that it doesnt matter what you have written in the first place. This is specifically true if the genres you are shipping are different. If you are making a walking sim and gonna do another one for the next game. Sure go ahead, even then its not that much of a big deal to write non-modular code when you are by yourself as an indie. So my experience tells the otherway around to this.

  • @roguedrones
    @roguedrones 2 ปีที่แล้ว

    zomg gold mine of good ideas.

  • @Jadebones
    @Jadebones 2 ปีที่แล้ว

    I now more clearly understand the increasing amounts of bugged games released, coupled with the game industry's terrible mindset towards their reliance and dependency on updates/patches as a safety net.
    I understand the need to manage time and resources, but what would you rather have:
    A sandwich made with fresh, clean ingredients....
    Or a sandwich slapped together out of crap left over from two days ago and clearly cross contaminated?