This is the most important video on yt related to the logic behind programming to avoid butcher code! I wish every butcher would see that. What u explain is the essence of everything in game dev! That said from an artist. Can't write a single line of code, but I understand the principles of structuring and logic behind finding the shortest way. With people like you I would achieve triple A stuff. A pro artist in indie game dev is nothing worth without a good programmer. Vice versa. Keep it up! You are a man of language, in many ways!
I started using DataTables last year and my god it changes everything. Especially debugging. To make rows of data just for testing and to be able to immediately flip between rows to try different settings out is amazing.
Yeah the way object oriented programming ties logic and data together really does many developer's heads in. It's like this massive brainworm you have to unlearn to be a productive developer. It was a massive mind blown moment for me when I first figured out you could separate functionality from your data structures and create really reusable code like that. Turns out you can also create really configurable designs and formulas and whatnot, which I wasn't aware of. Glad this kind of stuff is transferable.
Yep, I admit, I got it wrong first. I was not aware that the term "spreadsheet" is used for anything outside excel or google sheets. I'm not a native English speaker, and love that excuse.
I love this. You have an amazing way of explaining the ways of a game developer on a basic level, which is easy and fun to follow. I just stumbled upon your channel and I've learned a lot of "basic" things that I wish I knew earlier. I was wondering if you take suggestions for content. If so, I would love to see you talk about replication for multiplayer. Hoping you could give some practical examples and best practices. Keep up the good work :)
THIS IS AWESOME! Thanks a lot about the clarification. Your last video was already a good brain starter for the process but I misunderstood you there as well. Having this example and a clearer explanation on why and how is everything someone who starts could ask for. An example in multiple most used game engines would be the only thing I would add here (e.g. Unity, Godot, GameMaker...) but that is a lot to ask ^^. Thanks again and keep up these extremely helpful videos, they are the best source of gamedev mind food you can get here on YT :D
Great video. Data tables are such a gamechanger ,I use them for defining my item lists and an array for my characters inventory. One warning though, I would recommend making sure your structure is fully defined before making a data table of it. Every time I've gone back to add something to the struct after making the data table, it throws a wicked amount of errors and I have to replace every array instance... that's my only issue with them, I wish they were just a bit more flexible in that regard. But really liked the video, nice job 😁👍
the cool thing about the excel / unreal connection, is that the director/battle designer/clients can doodle all day long in a conference room about what character can have what stats, and if the stats are balanced...bla bla bla.. all in excel, and then the programmer just reimports ,and it's all set.
... varian? There's almost always a way to connect things and save them, because the spreadsheet simply lists the asset name. But I don't know what a varian choice is, so I can't give specifics.
@@DarioOrtisi So that could mean two things, I think. The first is if you're setting up a list of variants for a particular thing. In that case, you could either use an array of classes (or names or whatever), or have a spreadsheet where one of the fields is "this is a variant of..." and link back to the parent. Both options work fine, depending on what you need. The other thing it could mean is variants that the player chooses during gameplay. You normally wouldn't try to save live changes to a data table. Instead, you would use a save game for that, which is also pretty trivial. Just two or three blueprint nodes. Create an array of "variants chosen" and save it to the save game.
That's a really nice feature. I was looking for a spreadsheet system like this in Unity for a turn-based project I'm working on. Closest I can find is maybe storing a bunch of prefabs / ScriptableObjects in a folder?
@@CraigPerko One question I have is that if you're limited by what is essentially a flat series of data points, how do you deal with the differences between objects? Maybe I have a potion spreadsheet, but what about each type of potion? I can have a healing potion, a speed potion, and a potion that affects health, speed, and a third stat all at once. Maybe a potion needs a script attached to it. Are the effects in the sheet or just defined somewhere outside of it?
@@lorrmaster4778 So, there's a few ways to go about it. If you have very specific categories, you can simply use an enum and switch based on it. However, you can also point to code objects - for example, actor classes or components. So, for example, you can have a "spawn this actor" variable that points to a type of actor. The point is that the actor reference would only spawn in to do that one thing. The effect isn't "the potion". You don't have to spawn it in when, for example, you're buying potions or choosing what potions to drink. It might be a fairly generic actor that takes some arguments through an interface-defined function, or it might be a super specific one-off. Either way, it's its own little thing and not entangled with other systems.
@@CraigPerko Okay. I've been wondering about what kinds of data should be stored in spreadsheets. Can they represent changeable data in runtime, or only a very rigid set of data? So the PokeDex would contain data that doesn't change, but are runtime individual Pokémon with swappable attacks managed in a data sheet or by a component?
@@lorrmaster4778 Although I'm calling it a spreadsheet, that's just a turn of phrase to keep things grounded. We're talking about any flat data structure. Data tables are optimized for unchanging data used to help define the world, but an array would serve realtime needs, wherever you happen to stick it. The two are conceptually identical, it's just that data tables are built to be accessed in a specific way.
Data driven coding is one way to architect a system. Another way is Domain Driven Design. It's a different way of forming boundaries to minimise change. DDD takes the perspective that when you mutate an object you change something within a boundary. Spreadsheets are poor at representing hierarchical data. If your data is hierarchical, you will get complex really very fast. So I would say that use the right model for the game you're making. Sometimes that's a flat structure, sometimes it really isn't.
While I agree, my goal is to help newbies that just want to make something with complicated systems. In my opinion, other methods of minimizing spaghetti require a lot of insight into exactly how all these pieces work, and newbies would never know that. I'd rather they get a little annoyed by "stacking flat things" rather than having to try and imagine how things they've never tried to make before will change when they try to make them.
I'm not familair with data tables, but why not import the data through code (from xml or json or whatever else works for you)? For example, you can 1: read directly from your data file, or 2: store your data in a static, so you can more easily create objects with it later, or 3: you can read the data and create prototypes of objects and store those. I'm not familiar with Unreal either. I use Unity, but I mostly work with code, not in the editor. All this dragging arrows around and having to click and select things seems very annoying to me. Whenever something is repetitive and/or annoying it means you should probably find a way around it. As a programmer, you have all the power. Just code it the way you want it to work.
@@CraigPerko Hmm, yeah maybe I guess they aren't... You can learn it though, I also taught myself. There's plenty of material online. But yeah if you want to do it without coding, I guess the data tables make a lot of sense :) It never occurred to me you could make games without being able to code.
@@LawlFrank That's one of the reason I'm making these videos. A lot of folks come in to Unreal to try to make a game because they hear they can do it all in blueprint. And for small projects, that's absolutely true... but you might need some tips.
Look like it is not far from having a simulated playtest as unittest to balance attribute by random sampling win probability. That's could break away from flat spreadsheet into simulation backed by the game physics. Now you would need an AI controlled pawn
This is the most important video on yt related to the logic behind programming to avoid butcher code! I wish every butcher would see that. What u explain is the essence of everything in game dev! That said from an artist. Can't write a single line of code, but I understand the principles of structuring and logic behind finding the shortest way. With people like you I would achieve triple A stuff. A pro artist in indie game dev is nothing worth without a good programmer. Vice versa. Keep it up! You are a man of language, in many ways!
Glad it makes sense.
Model or data-driven design like this is so practical, and not just in the gamedev world.
I agree.
I started using DataTables last year and my god it changes everything. Especially debugging. To make rows of data just for testing and to be able to immediately flip between rows to try different settings out is amazing.
It just makes developing so much easier and less spaghettish.
Yeah the way object oriented programming ties logic and data together really does many developer's heads in. It's like this massive brainworm you have to unlearn to be a productive developer. It was a massive mind blown moment for me when I first figured out you could separate functionality from your data structures and create really reusable code like that. Turns out you can also create really configurable designs and formulas and whatnot, which I wasn't aware of. Glad this kind of stuff is transferable.
Thank you for this. Without knowing I needed to hear this I needed to hear this. Thank you
Yep, I admit, I got it wrong first. I was not aware that the term "spreadsheet" is used for anything outside excel or google sheets.
I'm not a native English speaker, and love that excuse.
No need for an excuse, if you heard it wrong lots of other folks did too and I need to know about it.
I love this. You have an amazing way of explaining the ways of a game developer on a basic level, which is easy and fun to follow. I just stumbled upon your channel and I've learned a lot of "basic" things that I wish I knew earlier. I was wondering if you take suggestions for content. If so, I would love to see you talk about replication for multiplayer. Hoping you could give some practical examples and best practices. Keep up the good work :)
I'm afraid I don't know much about multiplayer, it's not an interest of mine.
THIS IS AWESOME!
Thanks a lot about the clarification. Your last video was already a good brain starter for the process but I misunderstood you there as well.
Having this example and a clearer explanation on why and how is everything someone who starts could ask for.
An example in multiple most used game engines would be the only thing I would add here (e.g. Unity, Godot, GameMaker...) but that is a lot to ask ^^.
Thanks again and keep up these extremely helpful videos, they are the best source of gamedev mind food you can get here on YT :D
I would if I could, but I really don't feel comfortable enough in other game engines to talk about them.
Great video. Data tables are such a gamechanger ,I use them for defining my item lists and an array for my characters inventory. One warning though, I would recommend making sure your structure is fully defined before making a data table of it. Every time I've gone back to add something to the struct after making the data table, it throws a wicked amount of errors and I have to replace every array instance... that's my only issue with them, I wish they were just a bit more flexible in that regard. But really liked the video, nice job 😁👍
Thank you for making that video! It helps me so much
the cool thing about the excel / unreal connection, is that the director/battle designer/clients can doodle all day long in a conference room about what character can have what stats, and if the stats are balanced...bla bla bla.. all in excel, and then the programmer just reimports ,and it's all set.
These videos have been awesome!
This seems like a godsend for making any kind of bestiary or list of character jobs/classes.
That's the basic idea, yeah.
Hi beatiful explanation. I was wondering if there is a way to connect the variants choice and save in this spreadsheet. Thanks in advance.
... varian?
There's almost always a way to connect things and save them, because the spreadsheet simply lists the asset name. But I don't know what a varian choice is, so I can't give specifics.
@@CraigPerko oh dude forget the t. I mean variant
@@DarioOrtisi So that could mean two things, I think. The first is if you're setting up a list of variants for a particular thing. In that case, you could either use an array of classes (or names or whatever), or have a spreadsheet where one of the fields is "this is a variant of..." and link back to the parent. Both options work fine, depending on what you need.
The other thing it could mean is variants that the player chooses during gameplay. You normally wouldn't try to save live changes to a data table. Instead, you would use a save game for that, which is also pretty trivial. Just two or three blueprint nodes. Create an array of "variants chosen" and save it to the save game.
@@CraigPerko great thank you very much. It so helpfull
That's a really nice feature. I was looking for a spreadsheet system like this in Unity for a turn-based project I'm working on. Closest I can find is maybe storing a bunch of prefabs / ScriptableObjects in a folder?
This is one of the reasons Unity is harder to use than people think.
@@CraigPerko One question I have is that if you're limited by what is essentially a flat series of data points, how do you deal with the differences between objects? Maybe I have a potion spreadsheet, but what about each type of potion? I can have a healing potion, a speed potion, and a potion that affects health, speed, and a third stat all at once. Maybe a potion needs a script attached to it. Are the effects in the sheet or just defined somewhere outside of it?
@@lorrmaster4778 So, there's a few ways to go about it. If you have very specific categories, you can simply use an enum and switch based on it. However, you can also point to code objects - for example, actor classes or components. So, for example, you can have a "spawn this actor" variable that points to a type of actor.
The point is that the actor reference would only spawn in to do that one thing. The effect isn't "the potion". You don't have to spawn it in when, for example, you're buying potions or choosing what potions to drink. It might be a fairly generic actor that takes some arguments through an interface-defined function, or it might be a super specific one-off. Either way, it's its own little thing and not entangled with other systems.
@@CraigPerko Okay. I've been wondering about what kinds of data should be stored in spreadsheets. Can they represent changeable data in runtime, or only a very rigid set of data? So the PokeDex would contain data that doesn't change, but are runtime individual Pokémon with swappable attacks managed in a data sheet or by a component?
@@lorrmaster4778 Although I'm calling it a spreadsheet, that's just a turn of phrase to keep things grounded. We're talking about any flat data structure. Data tables are optimized for unchanging data used to help define the world, but an array would serve realtime needs, wherever you happen to stick it. The two are conceptually identical, it's just that data tables are built to be accessed in a specific way.
Data driven coding is one way to architect a system. Another way is Domain Driven Design. It's a different way of forming boundaries to minimise change.
DDD takes the perspective that when you mutate an object you change something within a boundary.
Spreadsheets are poor at representing hierarchical data. If your data is hierarchical, you will get complex really very fast.
So I would say that use the right model for the game you're making. Sometimes that's a flat structure, sometimes it really isn't.
While I agree, my goal is to help newbies that just want to make something with complicated systems. In my opinion, other methods of minimizing spaghetti require a lot of insight into exactly how all these pieces work, and newbies would never know that.
I'd rather they get a little annoyed by "stacking flat things" rather than having to try and imagine how things they've never tried to make before will change when they try to make them.
Love this
I'm not familair with data tables, but why not import the data through code (from xml or json or whatever else works for you)?
For example, you can 1: read directly from your data file,
or 2: store your data in a static, so you can more easily create objects with it later,
or 3: you can read the data and create prototypes of objects and store those.
I'm not familiar with Unreal either. I use Unity, but I mostly work with code, not in the editor. All this dragging arrows around and having to click and select things seems very annoying to me.
Whenever something is repetitive and/or annoying it means you should probably find a way around it.
As a programmer, you have all the power. Just code it the way you want it to work.
Go for it, man. Code your own engine, too, while you're at it. But 99.9% of people aren't programmers.
@@CraigPerko Hmm, yeah maybe I guess they aren't... You can learn it though, I also taught myself. There's plenty of material online.
But yeah if you want to do it without coding, I guess the data tables make a lot of sense :)
It never occurred to me you could make games without being able to code.
@@LawlFrank That's one of the reason I'm making these videos. A lot of folks come in to Unreal to try to make a game because they hear they can do it all in blueprint. And for small projects, that's absolutely true... but you might need some tips.
@@CraigPerko For me coding is also the most fun part of making games though :)
I mainly watch your video's for your insights on game design.
Look like it is not far from having a simulated playtest as unittest to balance attribute by random sampling win probability. That's could break away from flat spreadsheet into simulation backed by the game physics. Now you would need an AI controlled pawn
Love how you called the video a work with spreadsheets and then literally started to code down classes lol
Nope, no classes. But, yes, a struct.
@@CraigPerko my bad