Here's How You Should Be Thinking About Data

  Рет қаралды 35,458

Infallible Code

Infallible Code

Күн бұрын

Sign up for the Level 2 Game Dev Newsletter: eepurl.com/gGb8eP
Data is an essential ingredient for making games. But on it's own, data is nebulous, disconnected, and can be difficult to work with. In this video, I'll show you how to reason about your game's data so it's easier to manage and maintain.
This video was created in collaboration with @JasonStorey
💬 Join Our Community
Discord: / discord
Patreon: / infalliblecode
Newsletter: eepurl.com/gGb8eP
❤️ My Favorite Unity Assets *
Odin Inspector and Serializer: assetstore.unity.com/packages...
Editor Console Pro: assetstore.unity.com/packages...
Rainbow Folders 2: assetstore.unity.com/packages...
Peek: assetstore.unity.com/packages...
Project Search & Replace: assetstore.unity.com/packages...
⚡ Unity 3D Plus: prf.hn/click/camref:1100l3e8M/...
⚡ Unity 3D Pro: prf.hn/click/camref:1100l3e8M/...
👋 Contact me directly at charles@infalliblecode.com
* Disclosure: These are affiliate links, which means I'll receive a commission if you use them to make a purchase.

Пікірлер: 124
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Sign up for the Level 2 Game Dev Newsletter: eepurl.com/gGb8eP
@dago6410
@dago6410 2 жыл бұрын
I just added a CSV of my game's units (strategy game, lots of those in it) into my game and felt kinda bad about it and now i see this and im super validated
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Nice! Glad I could provide some validation for ya :D
@xXYourShadowDaniXx
@xXYourShadowDaniXx 2 жыл бұрын
Whats really cool is you could even make some extra code to export those game units to scriptable objects if you wanted to strictly use those for unity projects.
@wafflespawn
@wafflespawn 2 жыл бұрын
Already loving where this series is going! Looking forward to the next one!
@ianlaird8519
@ianlaird8519 2 жыл бұрын
You have so clearly articulated a point that i have been trying to get across to my team for months. Great video!
@omnicatalyst
@omnicatalyst 2 жыл бұрын
This channel needs to be the number one link in every single game dev support discord channel.
@Dustyy01
@Dustyy01 2 жыл бұрын
I hope that Barles has also learned this
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Oh he definitely learned a lot from this one :D
@Dustyy01
@Dustyy01 2 жыл бұрын
@@InfallibleCode Perfect😂
@olon1993
@olon1993 2 жыл бұрын
Great video! Loving this format and content.
@samarthdhroov
@samarthdhroov 2 жыл бұрын
I have been wondering about data and Unity for the last few days and you came up with such an important content today. Cant thank you enough. Good Luck for the journey ahead !!
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Wow perfect timing! Glad you found it useful
@phildonahue3158
@phildonahue3158 2 жыл бұрын
Super excited for this series refresh! Good luck with it.
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Appreciate that!
@G4M5T3R
@G4M5T3R 2 жыл бұрын
I'm really looking forward to more videos in this format. Welcome back Charles!
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Really appreciate the feedback! It's great to be back :D
@SergioLepore
@SergioLepore 2 жыл бұрын
This is such an elegant pattern. Thanks for sharing!
@holliscrane4644
@holliscrane4644 Жыл бұрын
Really love what youre doin with the newsletter a lot of stuff like that is paid but i love how youre letting the knowledge flow.
@ewwitsantonio
@ewwitsantonio 2 жыл бұрын
I just yelled "aw yeahhhh another video!!!" out loud by myself in my apartment. that is how happy i am to see a new vid by you!
@InfallibleCode
@InfallibleCode 2 жыл бұрын
You're the best! Hope you liked it :D
@buckyBitBoy
@buckyBitBoy 2 жыл бұрын
Amazing tips, subscribed for the newsletter
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Awesome! Thanks for being a part of the level 2 community :D
@filipathtc
@filipathtc 2 жыл бұрын
Incredibly well made video. Thank you Charles!
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Really appreciate it!
@tiger5gaming
@tiger5gaming 2 жыл бұрын
These videos are extremely high quality; it's borderline criminal how this doesn't have more views
@ivanmoltini926
@ivanmoltini926 2 жыл бұрын
Amazing content as always and so happy to see you back!! I know the point of this video is not the code, but could we maybe have access to the source code of this video? There are some interesting concepts you showed and it would be a great learning experience to dive into it to check out the code!
@dusan7873
@dusan7873 2 жыл бұрын
Very nice, can't wait for more!
@Cloud-Yo
@Cloud-Yo 2 жыл бұрын
This is an awesome overview and video as always. I would love to see more about the csv integration. :)
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Coming soon!
@Cloud-Yo
@Cloud-Yo 2 жыл бұрын
@@InfallibleCode absolute legend! :D
@MrRedpearl
@MrRedpearl 2 жыл бұрын
Excellent. This is immediately applicable for anyone who doesn't understand these principles.
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Glad you think so!
@robrab2000
@robrab2000 2 жыл бұрын
Oh man, I was really worried (also a bit excited) that I was going to watch this and find out that I'd been doing it all wrong but the video actually validated a lot of things I'm currently doing.. whew! Loving the Level2ness of the vid!
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Nice! Glad I could help validate your workflow :D
@zeon137
@zeon137 2 жыл бұрын
"Data structures are meant to represent things" that's kind of a very bold OOP claim. I don't necessarily agree with some of the ideas presented here, however, in the context of "regular Unity" (not DOTS, not ECS, etc.), this is a very nice video, especially regarding repositories and auto-populating data from different sources. Thank you Charles, I'm glad you're back at making content :)
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Thanks for sharing your feedback! I see your point and it's completely valid. But as you said, context is key and in this video we're definitely focusing on more high level data structures as opposed to low level algorithmic type data.
@DragstonDev
@DragstonDev 2 жыл бұрын
This is awesome, I've been wondering how to structure my data for characters and weapons for a SRPG!
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Nice! I'm really glad this was helpful :)
@alizaidi5610
@alizaidi5610 2 жыл бұрын
It's so nice to have videos like this.
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Glad you like them!
@adamodimattia
@adamodimattia 2 жыл бұрын
Great video again Charles!
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Thanks!
@666iiviietal666
@666iiviietal666 2 жыл бұрын
so glad your back!
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Glad to be back!
@bigjamar
@bigjamar 2 жыл бұрын
excelente..!!muchas gracias!!
@InfallibleCode
@InfallibleCode 2 жыл бұрын
De nada!
@Sovreighn7
@Sovreighn7 2 жыл бұрын
Great video, awaiting more!
@InfallibleCode
@InfallibleCode 2 жыл бұрын
More to come!
@shchack5583
@shchack5583 2 жыл бұрын
Definitely useful!
@KonradGM
@KonradGM 2 жыл бұрын
regarding data, how would you approach a for instance a databse of 100's items in a game like heroes 3? I am assuming you can create templates with scriptable objects, but what about accesing them and saving them for the player and in database? Should it only be done trough items id's and loaded at runtime?
@TheSchloteYT
@TheSchloteYT 2 жыл бұрын
Now this is level 2! If the rest of this series is content like this im in good hands!!
@InfallibleCode
@InfallibleCode 2 жыл бұрын
That's the plan! :D
@KingRecycle69
@KingRecycle69 2 жыл бұрын
Awesome. I learned a lot.
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Glad to hear it! (Also great name ;D)
@thebebinator
@thebebinator 2 жыл бұрын
Great new content thanks so much! New format is cool too, although the code snippets could stay on the screen a bit longer. And did Barles get laid off in the merger with thousand ant? :D
@imgekko4142
@imgekko4142 2 жыл бұрын
Fantastic video!
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Thank you very much!
@veeaxis3892
@veeaxis3892 2 жыл бұрын
What's the name of the syntax theme used in the video? I really like the way it looks.
@MariferAlcon
@MariferAlcon 2 жыл бұрын
Wow thank you so much!
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Glad it helped!
@MariferAlcon
@MariferAlcon 2 жыл бұрын
@@InfallibleCode this kind of approach i want to do in my project, it help to understand how important this kind of stuff especially I'm using database. Please continue educate us thank you so much.
@THEspindoctor84
@THEspindoctor84 2 жыл бұрын
awesome video! Really looking forward to the new content.
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Thanks!
@Ryan-ww7un
@Ryan-ww7un 2 жыл бұрын
Subscribed to the newsletter! btw, I think your site is missing a landing page.
@dustypants9326
@dustypants9326 2 жыл бұрын
good to see u back
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Great to be back!
@devinweidinger3812
@devinweidinger3812 2 жыл бұрын
Thanks!
@InfallibleCode
@InfallibleCode 2 жыл бұрын
You bet!
@gbcgiovanni6885
@gbcgiovanni6885 2 жыл бұрын
Loved the video
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Glad to hear it!
@stefano4993
@stefano4993 2 жыл бұрын
Thanks for the video! Maybe I missed some Unity feature but how do you access the Load method from the button in the Inspector?
@clearsky4049
@clearsky4049 2 жыл бұрын
I'm assuming its the work of an editor script associated with the CsvWeapons class.
@InfallibleCode
@InfallibleCode 2 жыл бұрын
That is correct :)
@InfallibleCode
@InfallibleCode 2 жыл бұрын
That's a custom inspector we created for the CsvWeapon class :)
@JediMediator
@JediMediator 2 жыл бұрын
I'm not sure my subscription to the newsletter went through correctly. Has the first issue been released already? Also, will it cause problems if I go through the subscription process again, just to make sure?
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Shoot me an email at charles@infalliblecode.com and I’ll check for you 👍
@VeneDrummer
@VeneDrummer 2 жыл бұрын
what are some other great channels that teach cool unity/game dev concepts like this?
@AschKris
@AschKris 2 жыл бұрын
Great comeback!
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Appreciate it!
@salos4ever
@salos4ever 2 жыл бұрын
See this is the kind of content I wanted to have when I was starting the course of Game Development at Uni level. It just never happened. Even though I still followed your videos a couple of years back, this format is way way way better and it's so much easier to understand. Can't wait for the next one. #NewBrackeys?
@pcccmn
@pcccmn 2 жыл бұрын
hory sheet. Mind blown! Subbedddd
@bankshotzombies8165
@bankshotzombies8165 2 жыл бұрын
But what if you want to connect stuff like animations and FX to the weapons?
@themaskyyt
@themaskyyt 2 жыл бұрын
That's a whole different thing then. But, you can, for example, make a system to gather the data for the weapons, another for the FX (animations, sound, particles, etc.), and another for behavior (shooting, reloading, etc.) and then link them together with events. FX and Behavior would wait for a Shoot event to be raised to do something. But of course, that's just one way to do it!
@MaZyYTube
@MaZyYTube 2 жыл бұрын
To 7:13 : You can also use json and also streaming assets. With streaming assets you do not even need to rebuild the unity game. Just update your file and on next start unity will read new data. This may is good or not. People can mod your game this way and can change the csv or json file. If you want to avoid this so better to keep rebuilding or even create your own assetbundle which can be better to make small updates.
@sabatheus
@sabatheus 2 жыл бұрын
Another consideration is data security. Having data stored in an Excel spreadsheet, or JSON file is going to be easy to get into and edit. Where as Scriptable Objects are going to be a lot harder. I might like to see how a Level 2 would think about this. :D
@faridbehrouzi2380
@faridbehrouzi2380 2 жыл бұрын
Have you sent a newsletter? because I haven't gotten any.
@SubjektDelta
@SubjektDelta 2 жыл бұрын
When will the unit of work video go live?
@panendraommina3474
@panendraommina3474 2 жыл бұрын
So this is about data structures in unity. Is it necessary to use linked list , stack , heap ,etc .
@mehmeh8883
@mehmeh8883 2 жыл бұрын
Thanks barles
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Barles says, "you're welcome" xD
@gilbertobitt3757
@gilbertobitt3757 2 жыл бұрын
Oohh I miss those infallible code content
@InfallibleCode
@InfallibleCode 2 жыл бұрын
I missed you, too :D
@dago6410
@dago6410 2 жыл бұрын
awwww u back
@InfallibleCode
@InfallibleCode 2 жыл бұрын
And it feels good!
@SilverAura
@SilverAura 2 жыл бұрын
I really appreciate the fact that I had to verify my Level 2 Game Dev Newsletter. Not because I like doing more work but because I respect the fact that you wanted to make sure joining what's basically a mailing-list, is an explicit choice. The easier I feel it is for me to accidentally sign up for something, the less confident I am that it's going to provide me a service that's appropriately offset by paid sponsorships. That little added "Are you sure?" is a bit of (probably faux) reassurance that I'm not signing up to generate ad revenue.
@afriendlyfox
@afriendlyfox Жыл бұрын
I don't understand why would we create a whole new class CsvWeapon if we can just add that functionality to the Weapon class
@kaiser9321
@kaiser9321 2 жыл бұрын
Sometimes when I watch these videos I question my entire programming history
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Haha I feel the same way A LOT of the time. Don't put so much pressure on yourself, though. There's so much to learn and know but what's most important is how you apply the knowledge that you already have :D
@halivudestevez2
@halivudestevez2 Жыл бұрын
I believe this was a little complex. Even for an advanced developer, or a beginner, this seems to be overwhelming.
@evilvirraZzz
@evilvirraZzz 2 жыл бұрын
Большое спасибо за видео. И да, с России тебя тоже смотрят! ;) ENG: Thanks a lot for the video!
@jamesmillerjo
@jamesmillerjo 2 жыл бұрын
Nice prologue starting with Unity Entities LOL Feels it requires overcomplicated work to handle simplest paradigms. Not wrong, but not that intuitive demanding high level design decision for low level assigning attemption.
@8bitWatermelon
@8bitWatermelon Жыл бұрын
What IDE is this please? It looks amazing 👏
@nahhasfadi
@nahhasfadi Жыл бұрын
JetBrains Rider
@Layarion
@Layarion 2 жыл бұрын
Make a video about making your game as modding friendly as possible? with as much modding power as possible? i'd like my modding community to be able to use Unity itself to mod my game.
@dago6410
@dago6410 2 жыл бұрын
PLEAASE make the 'unit of work' video soon pls pls pls
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Stay tuned ;)
@fearian
@fearian 2 жыл бұрын
beginner question: Why not define a struct at any point here? Shouldn't we start off with an actual struct, rather than a bunch of arrays?
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Just depends on the project and requirements. Either approach is completely valid
@de0o0
@de0o0 2 жыл бұрын
So using scriptable object to store data is bad idea?
@Soraphis91
@Soraphis91 2 жыл бұрын
No it's not, ScriptableObjects are just fine, but it also highly depends on your workflow. You also could write yourself a custom menu command to generate ScriptableObjects based on an CSV file if that fits your workflow the best.
@pornos1
@pornos1 2 жыл бұрын
Good luck with plugging any more advanced elements into CSV. Examples: Animations to use with this weapon Prefab to spawn of this weapon Particles / VFX of this weapon SFX of this weapon You can hold SFX, Anims, VFX in prefab itself, but then you have to validate or read data from 2 places: the collection of weapons itself, and each prefab independently. You do, CAN parse that info, but with any larger project we know, there will be errors. IMO: Each weapon is a Scriptable Object (SO) with its data plugged. Name, desc, price, type, SFX, VFX, whatever. Just a data container. Then a WeaponsSet SO with Weapons[]. Now we can easly have EasyWeaponsSet, DebugWeaponsSet, GodModeWeaponsSet etc. Replace a whole set, duplicate it, change a single weapon, whatever. Add getters and filtering logic. Store data in Dicts. Dict where int is index in main weapons array. Now get a WeaponsSetHolder SO, that ONLY holds a WeaponSet SO. Shop in village A, Shop in village B, Treasure Chest dropping weapons -> they all get WeaponsSet from WeaponsSetHolder SO they have plugged. You want to replace a WeaponsSet? Just plug a different one into holder. No changes in ShopA, ShopB and others.
@aleksapetrovic7088
@aleksapetrovic7088 2 жыл бұрын
.
@Nairistarcraft
@Nairistarcraft 2 жыл бұрын
could you not just set up a dictionary with and add the key to the CSV, key probably as a string in this case. Then whenever you need an animation you just check the dictionary
@RehtseStudio
@RehtseStudio 2 жыл бұрын
LOVE THE VIDEO. I"M LEVELING UP💪💪 Laugh at the CSV part when he said "That's not the point of the exercise"🤣🤣
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Thank you!! Haha yeah the CSV implementation deserves its own video xD
@masonmason22
@masonmason22 2 жыл бұрын
Kinda interesting, but I felt you rushed through the code too quickly. I know the code technically doesn't matter, but seeing how the idea is actually applied helps to explain it.
@googleuser4720
@googleuser4720 2 жыл бұрын
You do realise you can reorder elements in arrays in the inspector.
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Yes I do! :D
@walterjohngallant
@walterjohngallant 2 жыл бұрын
Please stop putting background music in a teaching video. Did you have background music in class? It’s very distracting. You are a great teacher though.
@InfallibleCode
@InfallibleCode 2 жыл бұрын
Appreciate the feedback!
@Alperic27
@Alperic27 2 жыл бұрын
bro… seriously??? … ‘Weapons’ … as MONOBEHAVIOR???? … 😂 …… … ….. at least make it scriptableobject .. then … CsvWeapon??? … you manage to negate 30 years of lessons of bad OOP in under 1” … if you worked for me, I would fire you without discussion. and for the record, you are preaching ideas that are at the exact opposite of what the DOTS philosophy is
@Havii
@Havii 2 жыл бұрын
Use Scriptable Objects
Infallible Code Channel Relaunch Announcement
7:28
Infallible Code
Рет қаралды 11 М.
4 Tips for Refactoring Your Code for Readability
14:58
Infallible Code
Рет қаралды 30 М.
1🥺🎉 #thankyou
00:29
はじめしゃちょー(hajime)
Рет қаралды 74 МЛН
ONE MORE SUBSCRIBER FOR 6 MILLION!
00:38
Horror Skunx
Рет қаралды 12 МЛН
1❤️
00:20
すしらーめん《りく》
Рет қаралды 32 МЛН
Unity Job System - A Practical Code Example
13:50
Infallible Code
Рет қаралды 80 М.
Better Coding in Unity With Just a Few Lines of Code
15:27
Firemind
Рет қаралды 300 М.
How Thinking in Systems Can Improve Your Code
10:16
Infallible Code
Рет қаралды 31 М.
Software Architecture in Unity
7:13
Jason Storey
Рет қаралды 111 М.
How to Setup a Git Repository for a Unity Project
13:56
Infallible Code
Рет қаралды 73 М.
How to MASTER Data Structures & Algorithms FAST in 2023
10:21
Internet Made Coder
Рет қаралды 203 М.
__new__ vs __init__ in Python
10:50
mCoding
Рет қаралды 204 М.
20 Advanced Coding Tips For Big Unity Projects
22:23
Tesseract
Рет қаралды 151 М.
How to Code a Simple State Machine (Unity Tutorial)
19:22
Infallible Code
Рет қаралды 160 М.
Unity async / await: Coroutine's Hot Sister [C# & Unity]
16:18
1🥺🎉 #thankyou
00:29
はじめしゃちょー(hajime)
Рет қаралды 74 МЛН