Declarative configuration systems like Flex enable game developers to separate configuration data from game logic, allowing runtime adjustments to game settings (such as entity positions, speeds, and input mappings) without recompilation. This approach involves defining game entities and their components through script files that can be loaded and modified dynamically, facilitating iterative design and balancing of game mechanics. The system typically requires custom serialization layers for standard C++ types like strings, and the choice of configuration framework impacts development efficiency, moddability, and the separation between gameplay logic and visual/behavioral parameters.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
C++ | Briarthorn | Architecture Exploration ContinuesAdded:
All right, I think I am now live on YouTube.
Well, at least on one of them.
Uh, why not the other though?
What is going on?
I said, hey. Yeah, yeah, yeah, yeah.
Hey. Yeah. Yeah.
I said, "Hey, what's going on?"
But seriously, what's going on? Why is this not working?
Live. Go live.
Hey. Hi. Hello there.
Howdy. Howdy.
My vertical stream is not wanting to Oh, wait, wait a minute. Wait a minute.
Sweet.
I think we are officially live across all of the two platforms that I stream on. So, that is a good thing.
All right, let's get the show on the road. So, uh what was I doing last stream? Was that Friday? I think Friday I started exploring um flex a little bit more in depth because I think it's has a scripting language that comes with it that makes it really nice to um automatically handle configuring data strrus uh upon obviously like registering your strrus that kind of thing. Uh and then we went on a tangent and kind of explored some general uh C++ performance exploration of iterating over pointers versus iterating over raw data and then kind of looking at a little bit of the comparison of unique pointers versus shared pointers. And uh had a good conversation. I was able to create a YouTube short out of it, but I didn't realize the audio was so bad during that stream. And I think part of the problem is I have a tendency to speak loud when I'm excited about uh uh talking about something I I I like.
And I don't think my mic setting was set up to allow me to talk so loud. So, I'm going to do a test real quick. And I apologize for your guys's ears, but I want to make sure the audio is good.
Even when I am talking loud and excitedly, which even right now I'm kind of talking a little loud. I could talk a little quieter, but I do want to make sure I have somewhat good audio.
All right, it's test time.
All right. So, here I am talking loudly and excitedly about things I know.
>> All right, that sounds pretty good.
>> That sounds pretty good.
>> All right, so now here I am talking quieter >> and just kind of relaxed and enjoying what I'm doing. Okay, I think the audio is better. I don't I don't know what happened Friday. The audio was just terrible.
Hey, Rodrigo.
Uh, you started to play Builder's Gate 3 today. You made a wizard. It's going to be fun. Spend an hour making the character. You only spent an hour making the character. Are you even trying?
I actually hopped on a Baldersgate 3 playthrough with a friend of mine last night and we are destroying everything.
We're even playing honor mode. Like once you've played Boulders's Gate 3 enough times, you you you basically learn how the game works and it becomes so easy to just like make super powerful broken builds.
But yeah, it's uh that's awesome you're playing that. I I I do want to play Boulders Gate 3 on stream at some point, but I really want to get Balders's Gate one completed because I have never completed it. So tomorrow we will be doing Balders's Gate 1. I did see they might be remaking Balders's Gate 2, though. And if that's the case, I really need to get Balders's Gate 2 beaten before that happens. So, we shall see what uh what happens there.
But in the meantime, I've got some uh additional coding exploration to do with Flex. I was able to after the stream this weekend at least verify that my thoughts on being able to use um like a flex scripting file with like declarative syntax here will actually load into my application.
Um and I do that somewhere and I I also found out you load it by calling run script. So this line right here script run file that will assuming you register your strrus with the flex API which I do somewhere right here. So assuming you do something like this you can then specify position max speed somewhere here. So there's max speed of 450 position 10 comma 20 140 40 etc. Doing that should yield Oops. Or not. I apologize.
Maybe I should have built you first.
Oh, also we're back to drinking monsters. Should I should I start doing a uh uh what is it like a a day one of asking Monster to sponsor me? Day two of asking Monster to sponsor me.
You're shooting for the moon, Dark.
Oh, I I forgot. I'm getting my uh my engine and my game mixed up.
There we go. Entity ID zero.
I swear this is working. Oh, wait. Am I building in release?
Ah, I'm building in release.
Okay, there we go. Uh Wait, I thought I was printing.
Oh, I got I forgot I got to pass in the uh flex demo flag.
Flex demo.
There we go. So, demo spawn three entities. So, if I pull up the file, we have a demo scene with player ship scout alpha scout beta. So there's three entities.
Uh the entity demo scene.player ship has a position of 10, 20 and a max speed of 520.
So that's working. And if I change these values without having to recompile, I should be able to now see position is 100 and uh or x is 100, y is 120. So, this I think this does basically what I've been needing from my configuration and it does it without me having to write custom parsing code. I literally just register with the flex API right here and it parses. All I had to do was call the run script function off of uh the flex world object.
So, I'm going to at least explore this a little more, kind of get my ideas sketched out, and we'll see if uh that's the way I want to go.
Uh G&G, what's that? What are I'm not sure what you're asking.
So, the question becomes If you're asking what this is, this is uh an outline of what my game might eventually look like.
Maybe potentially.
Probably not.
But maybe it will. I'm trying to like resize this so the player ends up in the center of the screen. Yeah, like that.
There we go.
Okay.
And the other thing, the other thought I had was if I needed to roll in this event system and action system into the uh flex API.
I don't know if I don't think the events need it, but my actions I want to be configurable as well.
and be able to define some defaults.
So that might need to roll into because I might do something like because you can imagine this is the game.
I don't know if Lex supports commenting.
Assume it does.
That looks like a comet.
All right. I know the extension is out of date, but maybe it's good enough.
Give me a little bit of help.
Does this support formatting format document crap?
That's the only downside to flex script.
It's not like a super well-known scripting language or a super popular one.
So, I am kind of left to having to make sure I keep things formatted myself, which I'm not as big a fan of. But maybe down the road, you know, I can also support Lua. I don't know.
Yeah, it's at least the syntax highlighting makes it a little readable.
The the big issue is it's like four years out of date. So it probably supports a version of Flex that doesn't even exist anymore.
Um cuz honestly I bet I could just swap this to like say like, "Hey, this is C or C++."
I don't want the red squigglies of death, though. Uh no. Okay, maybe not.
Anyway, with these actions, I'm wondering if if this is say a demo scene, then I could do like action map and then it defines I would define an action. Okay, so this would be like saying, hey, jump is an action.
Uh, it would have a name.
Oh man, these are almost like components. I don't know if that's maybe it's lowercase. Jump.
Jump as an action.
This is a entity.
I don't know if this is I am on Twitch. Wait, what do you mean?
You should move to Twitch. I am on Twitch.
Aren't there like language agnostic formats with lang Oh, you might be right. I do I am aware of a um an extension called prettier prettier prettier prettier code formatterater I think supports a number of languages.
So maybe I'll try that at some point down the road. I don't know. I don't know if I'm going to stick to flex or not. We'll see.
Uh what am I working on currently? I'm just working on tinkering. I'm not really building towards anything spec specifically. I mean, maybe hopefully building up my uh my game my game here.
I uh the the usual spiel here is I kind of demoed up a game in GDAU called Brierthornne and it's essentially or the the plan is potentially to be either like a turnbased tactical RPG or more like a real time rogue light something like that with the with the idea being that you have different aircraft that you could fly top down. So, this is just your tactical view. I'm not doing like 3D aircraft or like real combat or anything like that.
Um, and the idea is to, you know, take on enemies, engage in different scenarios, maybe a little bit of puzzle solving while you're in the middle of combat kind of thing. Um, use your aircraft's capabilities, offenses, defenses, uh, radar capability to determine what's out there, who's an enemy, who's a friend, maybe who's lying to you about who's an enemy or a friend, and then like beat the engagement, whatever that means. Whether that's like destroy a target or survive a waves of enemies kind of thing. um you know, just kind of your general rogike progression system. Maybe get to a boss level engagement, collect items, get rewards, so on so forth. I'm speaking vaguely because it's not um set in stone exactly what I want to do yet. But before I do any of this, so this was scripted in GDO, uh, but I don't want to I don't want to do GDO myself mainly because I'm more experienced in C++. So it's a little quicker and easier for me to understand a C++ API than to figure out how GDAU is doing everything under the hood.
Um, so right now I have been exploring different like architectural options for my game. Do I use raw data strcts? Do I use a uh object-oriented inheritance hierarchy? Do I use an entity component system? Uh so currently I am looking at an entity component system that's pre-built that comes with all kinds of features. And I'm honestly just trying to decide if um if those features are worth using or if it's just too much. Uh using ray under the hood. So, Ray Lib for graphics, event handling, um, and then everything else is kind of up in the air. I'm not even opposed to using a framework that provides all of these solutions. So, like I'm aware that QT exists, QT with QML, QTQU. Uh, the slight downside to that is the LGPL license, but I can still like sell a commercial game with it, so it's not the end of the world. And I do want my game to be customizable, moddable. So, I'm not opposed to like handing it over to my users. I mean, you paid for it, right? To, you know, do what you want with it, right? Um, there's a newer framework out there that I'm that I also have an eye on called Slint, which is written in Rust of all languages, which is kind of cool. I'm not a Rust dev. I could maybe tell you what Rust looks like if I saw it, but that's about it. But this is written in Rust and it does front-end graphics just like QT. Um, but it's a lot smaller, a lot lighter weight and all of the scripting that it does, they automatically generate it into the native code of your choice. And they support uh Rust, C++, Python, and JavaScript TypeScript, I think, out of the box, which I think is really cool. Um, so I might continue to explore this too because this would give me that kind of that configuration option and it would automatically convert to code. It also has live uh like hot reloading. So any changes I make to its scripting file, it would automatically u update as like a uh uh hot reloaded application window. So I'm I'm not opposed to exploring that either, but I'm just exploring. I'm in no rush personally to get the game done.
Um, and so I would like to figure out what my foundation for developing this game will be that isn't good. Um, and then be able to just get my head done head down and start typing, right? I don't want to be 10, 20, 30,000 lines of code into this project and then realize this isn't working out for me and then have to like refactor a bunch. So, I'd like to just kind of get something set in stone before I start uh hit hitting the ground running.
Uh, remind you of Ztype. Interesting. I don't know if I've ever heard of that.
Hey, Devron, how's it going?
Yeah, I'm I have I have dreams for games. Um, I have a dream for another game, but this g but that game is going to be a lot more involved. And I have never made a game before. So, I am trying my best to limit the scope of this game as much as possible. And I don't necessarily want to spend all my effort building a game engine and then not making the game. Uh, I do have Awin, which is a game engine. So, I'm building that sometimes just to take a break from the gamedev side of things to talk more C++.
Um, yeah, I'm not Nothing is uh carved in stone, so I'm kind of just expo exploring seeing what this is all about.
You know what would be really funny?
What if I ended up landing on using Slint and decide that C++ isn't the way and I I become a Rust dev?
Wouldn't that be something?
gooey test like it even has automatic uh UI testing which is kind of cool.
Supports all the platforms I want to support. I do want to support web assembly for it.io because I think I can release games as web assembly on that website which would be kind of cool especially for like letting people do live demos.
So yeah, that's that's kind of where that's kind of where I'm at right now.
I'm just kind of tinkering.
SK signet. Oh, I'm also, you know, and maybe I it kills me they haven't announced this or they announced this, but they haven't released anything yet.
Um, but I am also keeping my eyes on a new game engine coming out called Fluorite.
Fluorite is a game engine that uses Flutter which is written in Dart which is a cross like super crossplatform single codebase single configuration builds for all the platforms.
Um I think it's I think Dart is garbage collected but I still think it like compiles to native machine code. Um, but it it has a ECS system written in C++ and it's developed by Toyota.
It's developed by a car company because Toyota needs, you know, touch displays and they needed a a framework they could use that would um be easy for them to implement these uh touch displays. So, apparently they landed on Flutter and then decided to integrate it with other um uh tools like powered by Google's filament renderer. I don't know anything about the filament renderer um to make a console grade game engine with Flutter. So, I'm kind of excited to see what comes of this.
So, if if this ever gets released, I will definitely be streaming the exploration of this game engine because it it looks kind of promising. I mean, you there's only so much you can take from a couple of uh gifts on on a website, but yeah, I'm I'm looking forward to that as well.
Um, my understanding is this will be open source.
Uh, Toyota had an announcement. They had a whole presentation a couple months ago. I'm pretty sure it's going to be open source.
I don't know if they say it on here.
Uh, Fluorite is the first console grade game engine fully integrated with Flutter using a Fluorite view widget for 3D scenes C++ entity component system.
Yeah, I'm not sure. I'm honestly not sure if it's uh going to be open source or not. I thought it was, but I'm not seeing it on here. So, yeah, it looked interesting. I'm definitely going to explore it whenever it comes out. I thought it would have been out by now because they announced it a few months ago. Uh, but I haven't seen anything on it, so I don't know.
But I need a way that makes sense where if I define user actions, I need to bind it to like an event. So, this would be like uh something like that. So I could configure Do I even need that? Does it let you do I just do that? Yeah, because I think this just gives it a string to perform a lookup. I don't have to do that. So, I could just do that except I'm not jumping in my aircraft.
You get the idea. So, then here it would be cool if fire is not an event keyboard. It's a uh it's an event mouse.
something like that and then this would get loaded into some data strrus which I could then visualize in a game menu screen.
And then I would I would want to support serializing this data because a user is going to change the settings, save it. So I'm going to need to be able to reload that as well.
But this should be possible based on what I'm seeing down here.
Know what fighter is?
Fighter is a prefab. Oh, so this is just a definition of a collection of components.
So that so I can't do that here.
So maybe it's just literally it's basically what I'm trying to do here.
I want to do it automatically.
Okay. So, what I would need is a an action map strruct that might just be there to tag things.
So, I'm just going to use it as an entity that represents any of its children is an action.
I'm going to need an action.
Oh man, how am I going to do this?
Maybe it's just like this.
So you say position component and assign it data. So I want event component and I need to assign it data.
But my event, this is what this is what I'm not 100% sure is going to be possible. My event is a standard variant. Does Flex support loading and storing a a strct as a variant component?
That I'm not sure it can do.
Another option would be to just store all of these enums because that's what these are. This is an enum.
This is an enum. Enum.
Enum. Store it all in a single enum.
It'd be cool if I didn't have to write custom types just to support parsing, though. That's kind of my end goal here is I don't have to write any custom code to handle configuration.
I want to focus more on the game dev.
You good?
Okay.
He was snoring weird.
How would that even work prefab?
So, this would just be a generic entity.
Hey, Jan. How's it going?
It's been a while.
It's been a minute. You're You're not wrong. I didn't stream this weekend. I was busy this weekend. I um Oh, a couple of things happened. Trying to think what happened. Why was I busy?
I played a game with a friend all day Saturday and it was like a escape from Crimson Manor or something like that. It's like a uh it's like an escape room style game where you both have to work together to help each other solve puzzles to get out of the each other's room and then eventually escape the uh mansion. That was that was a lot of fun.
Um, I ended up trading a my little I had a little uh minis form PC. I ended up trading it for this because I've been talking about wanting to support the Steam Deck with um with my game. So, I figured I was going to need a Steam Deck to uh test my game on. So, I was able to get that. So, I didn't have to worry about uh trying to purchase the new $300 increase to the Steam Decks that are out there. This is just the um I think this is just like a 256 gig LCD screen version. So, it's it's an older one. Um I'll probably upgrade the solidstate drive at some point.
Would that be worth showing on stream at all? Showing people how to modify or like upgrade your components? I don't know. I might just do it. Um, so I did that Saturday. What did I do Sunday?
I was just busy.
Uh, I went and saw the Mortal Kombat movie.
The Mortal Kombat movie was pretty cool.
A little silly. The There wasn't much of a story, but the fight scenes were cool.
It was very nostalgic.
Trying to think.
are all of these components. All of these are components and they are entities.
Uh so you have components a prefab that's an entity.
Okay.
So that Okay. Okay. So maybe I can't nest as much as I my parent my child.
Uh an entity is created by specifying an identifier followed by a scope.
Okay.
So that means this is an entity if it if it's followed by a scope brace.
But what about components? Oh, my packages.
Pairs are added to entities by adding them to an entity scope just like tags.
Likes pizza.
Okay, here we go. Components are specified like tags but with an additional value colon.
Okay. So, this would be a component.
Ooh.
Okay. So, we I need to test this. I think the I think we just need to test a simple script and see if we can get this to work. I have an idea on how we can test this.
Oh, yes. I did see Project Hail Mary.
Project Hail Mary was fantastic. It was hilarious. it uh it will make you cry and it was just a it was a fun movie. It was it was a lot of fun and I never once like sometimes movies like those they're they're sometimes a little drawn out or um you just you you get lols in in the movie where things are kind of slow. Um but I never felt that with this movie.
This movie was really really well done.
Really enjoyed it.
All right. So, I think the best way to test this, because there's just a lot going on here, and I like to keep my thoughts simplified.
So, I think what I want to try and do is maybe just comment all this out and only do um the pieces I need.
Think I need this.
How's it going?
Oh man, is it reading my m is it reading my mind here?
Also, I figured out how to fix my freaking language server. I don't know why the Microsoft IntelliSense one wasn't working with VS Code and the modules, but I swapped it back to ClangD and now it's working again.
Okay. So I register position. I call script run position and we will see uh don't I wouldn't expect this to work.
So let's define if I understood the API correctly. Let's define an entity.
Uh entity This gets a colon.
I think these get colons as well. What did that uh file look like?
Yeah, you assign colon, okay, colon, comma.
I'll leave the comma there. So, this is an entity. This is a component. So then what I should be able to do is callookup entity get position.
I don't need to error check. Are you kidding me? I know what I'm doing. I never check for errors. I just write perfect code.
All right. Uh we need to include print and then compile it. First try.
Come on. First try. Dang it.
Wait, is it not like that?
Oh, it takes a name followed by a script. Okay. Uh, let's give it a name.
Script.
Uh, what am I doing? Good evening people. Uh on line 48 main CP use con expert.
Um uh oh oh I think I know what you're seeing. Apologies.
Think I know what you are seeing. So okay. So I have the code commented out right now. You notice how that colon doesn't exist anymore?
So you're talking about um and I don't even think I can highlight it. Yeah, I can't highlight it. So you're talking about this colon constint. So that is that's clangd.
I have an extension called clangd from VS Code. When I install that, it automatically downloads the clangd tool, which is a uh C, C++, LSP. So, it's a tool that provides uh syntax highlighting, code navigation, autocomp completion, um code formatting, that kind of thing.
And so because I am using auto, it it inserts what my types are in line based on what it's able to deduce. So I can still see the information. Honestly, a little annoying. I I leave it alone because I don't feel like messing with the settings, but a lot of the times I don't I don't really need that information. Um, but that's what you're seeing. So like even on line 317 here how how it shows name colon x comma pointer colon position. So it's just letting you know what the um what the parameter names of the function you're calling is without you having to like rightclick go to definition and see that it takes a name and a pointer. It just puts it in line for you.
Uh do I know JavaScript or Lua? I know a little bit of JavaScript.
Um I have professionally I have done a lot of QT development and more recently uh QML. So that's QTQ quick QT declarative and it uses its own like in-house scripting language that was basically built on top of JavaScript. So I know some JavaScript from that. I wouldn't say I am a expert JavaScript developer. I will say JavaScript is a pain of pain in the butt because you don't you don't know what the types are at all ever and and the code will still run. So that's a little annoying.
Uh but I don't I don't know Lua at all.
Type inference. Uh that might be the word for it. You might be right.
Okay. Uh, did that compile?
Treated as an error. Oh, you cannot include print seven.
Okay, there we go.
So, if this works, in fact, let me let me build this in debug so I can step through the code.
Uh, I want to debug.
Okay. So, we register the position.
We run the script. We get the position.
Oh my god, I think it's actually working. Look at that. We have 10 and 20. That's awesome. Okay, so that works.
I mean, we knew that worked. That that was already working. I just wanted to make sure being able to run a script without um loading a file would work because then we can test the more complicated situation using standard variant. We'll see how that works. Uh I have not tried No, that's not true. I have used standard expected but not like professionally. I've only done it in some toy projects. So I would not say I am an expert on like the best practices for using standard expected but uh I definitely want to get better with it.
How's it going Steve?
I am not saying the first part of your name.
Okay, let's let's get fancy with it.
We're going to use a variant and let's see if this works.
Um, so Oh man, how would we even begin?
Let's say I have a position, a velocity, um, sure, an acceleration, and these all have the same exact parameters. So, this is an easier case that might work. And we'll call this uh using kinematics equals standard variant position velocity velocity acceleration.
If we can get this to work. Holy [ __ ] Uh we will register the types like we normally would. Now what's what's interesting?
Do I need to register the kinematics type as well? I think I do because it's going to be a component, but it's not going to have a member variable because what I want to do is say kinematics and then assign it data. But it's not going to know what data to assign to it.
So, I don't actually expect this is going to work.
Kinematics.
How am I going to do this?
What's the recommended age someone should start coding? I don't know.
Whenever you want to, I guess. I don't I don't think uh coding has a has an age requirement.
What will I do in C++? Uh you're kind of looking at it. I I'm I'm going to use the the scripting language for configuration.
I still plan on writing the actual game logic in C++. I definitely want to do that.
um a little easier for me to control the the state of of how the code's going to be ran and laid out in memory, that kind of thing.
But I'm not going to deny there is definitely a benefit to being able to dynamically add and remove lines of script while the application is running and see state change.
I think that'll be useful. having never written a game before.
Maybe it's not, but I think it'll be useful.
Best extensions like for VS Code for C++ definitely uh clangd, clangd or clang formatterater. Uh being able to auto format your code, that's kind of a must. Like I don't want to stress about tabs and spaces in my codebase. I just want it to work.
If this actually works, I will be impressed.
I feel like I would have to tell Flex.
No way.
If I say 200.
Did I run the wrong executable?
Okay, I ran the wrong executable.
I was expecting it to like crash or something, not actually work.
Yeah, there it is. You guys don't see it. Hang on.
Uh desktop desktop background desktop uh this is what I was expecting.
Okay. So, that definitely does not work.
Um no, you're you're allowed to ask. I I know people are coming and going and they don't see it. Um I can show you real quick. I am trying to make a game called Brierthornne.
I do technically have a website for it.
There's not a whole lot there, but I did implement a demo. Uh, also the website has my live stream up whenever I'm streaming anything with the Brierthorn title in it, which I think is kind of cool. I did that. I was pretty I was pretty proud of uh getting that set up.
And then if I'm not streaming, then this goes away.
Um, so this is very very bare bones because there's not a lot of detail here yet, but it's either going to be a turnbased tactical RPG or or RPGish RPG light maybe because I'm a I'm a solo developer that's working like two hours every other day on this. If I was building an actual RPG, this wouldn't get done for another seven years. Um, or maybe even just like a real time rogue light. So, you're literally flying your your aircraft from the from this HUD and um basically fighting enemies and utilizing like offensive abilities, defensive abilities. I am at least picturing flying four different types of aircraft. So, we're talking and I and I lay it out on the website here, I think.
Uh, yeah. So, this is this is all like uh maybe, right? So, you could picture you can picture like like an RPG, you have a class, right? One of the classes is called jet. Versatile and adaptive, equally dangerous up close or at mid-range. Built to handle whatever the scope throws at it. Thunder. Big, powerful, and loaded. dominates mid to long range with the heaviest, most capable weaponry in the sky. This one I am super excited to try and implement because I think it'll be cool. At least what I'm picturing. And that is Swarm. A dynamic network of drones shifting between aggressive and defensive formations to control the engagement on your terms. And then f and then finally, ghost. Fast and nearly invisible. You won't know where it is until it's already struck. So, like I'm picturing almost uh this only shows one aircraft, but I'm almost picturing this as like party based. So, being able to control all four of the classes and then kind of cycling through them to pick and choose which one you want to use for an engagement. Um, and then so like I'm also envisioning swarm, this network of drones being able to like transform into defensive maneuvers where it will like spread out and surround the other players and then like rotate around them to like absorb weapon weapon attacks, things like that. And then swarm isn't defeated until all of the drones are dead. But if like any drones survive kind of like Cell from Dragon Ball Z, it can regrow. So, I like I I have these grand ideas, but it's going to be a lot of work. And I'm only spending maybe maybe 10 hours a week tops on this at the moment. And I And so I scripted this up in GDAU. Um uh I'm not going to pull it up. It's I don't think it's in a good state. Uh but I scripted this up in GDAU and now I want to port it over into C++.
So that's what you guys are stumbling upon me doing right now is exploring what my core architecture of my game is going to be. Is it going to be an entity component system? Is it going to be using something like like uh slint here which is this uh application framework written in Rust but allows me to do the scripting I need. Um, do I use QT, which is what I'm very familiar with and probably the quickest path towards a game? Do I write everything completely from scratch, which is probably not what you should do and and will result in just just terrible code that I have to keep maintaining and refactoring. Um, or do I use something else? So, that's that's where that's where I'm at with all of this. And you guys get to watch me struggle as I try and figure out what I want to do.
Also, day one of asking um Monster to sponsor me.
Yes, it it would be top down. Top down 2D from the perspective of So, what this is called, if you guys aren't familiar, this is a tactical situation display. So basically like your radar display, but like you would have the option to see all these tracks like all the enemies out there. And what this doesn't show you is what isn't out there or what is out there but not in your field of view or not within your radar's capability.
So you can have you can have a a like you can think of the the main bad guy of this entire game, right? Super stealthy.
He sends waves of enemies at you. You see the enemies. They're they're like um they're like the puttymen from Power Rangers. I'm aging myself. Um but he sends like enemies out, right, that you're able to see. Your radar is able to pick up, but but the main bad guy, his capabilities is way more advanced.
So, did you manage to defeat the previous levels and upgrade your gear to to increase your radar capabilities in order to find this guy before he blows you out of the sky? You know, things like that. Or maybe there's like SAM sites like maybe the battlefield is is laid out to try and like just completely destroy you. So you have missiles flying at you. You have to duck and dodge.
Maybe I add like uh landmarks or something you can fly behind to avoid getting shot. You know, the the the options are endless. So I have to find a way to scope it down for one guy to implement the game and get it and get it out the door. Um so I have all kinds of ideas. I I don't know what direction I'm going to take with it yet.
But right now, step one, I need to figure out if how much of this I want to write from scratch and how much of this I want to borrow or pull in from like third party libraries or frameworks that isn't GDAU. I I know I don't want to use GDAU.
Register the component explicitly in newer flex versions. Non-trivial types. What is that trying to say? Why can't I scroll over?
What are you trying to say? Non-trivial types often autoregister, but explicitly calling or setting up hooks ensures absolute safety.
Wait, types automatically register.
Yeah, I'm kind I'm kind of with you there. Uh, KBM, I I I'm not I don't consider myself a game dev yet because I've never made a game. I have tinkered with like game engines. I've explored like parts of implementing a game. I've done like simple physics systems. I've done uh renderers. I've done um I've done a custom entity component system before. So like I'm familiar with all the different pieces that you could that you could implement for a game, but I've never made a game because I like you, I I kind of I get distracted. I get distracted in the learning and I enjoy the the tinkering and the building of these components just to understand how they work versus actual like game design and implementing an actual game. There's like I have ideas for the game but there's no guarantee that uh I am able to make it fun. So, we'll see.
Worst case scenario, I get to uh sit here and talk C++ with you guys and maybe we can um share some knowledge with each other because I also like teaching. I also like helping others learn. That's what I enjoy about my job is anytime I have a team members working for me or with me then you know we get to share some knowledge.
I don't know what this is. Component with life cycle.
Wrapping the variant inside a structural component is highly. So maybe this is what I need to do. Warrior mage.
Um so does flex let you define Can I assign a component?
Oh, I mean if I can do this, maybe I can.
Hang on. Let's try uh position.
Can I do this?
I appreciate KBM.
I um I I do have music playing on Twitch. I I fear I fear Big Brother YouTube when it comes to putting music on YouTube. Um, I don't know what I can and can't do. And so I at the moment until I uh make myself a little smarter about how YouTube handles playing music, I am avoiding it.
Okay, that crashed.
It did not like that one bit.
I probably just need to break down and find some like D uh DMCA free music and play it on YouTube, but I want to listen to like enjoy like music I enjoy listening to.
So, I'd still want to listen to what I'm listening to now on Twitch.
So, I know you can do this. I know how to do that, but how do you do that in a script?
No, that's not what I want.
I might not be able to do this. Type query. No.
Okay. So, it doesn't look like I mean there might be a way and maybe I just don't know how to do it.
Does that do anything?
crash. What am I crashing on? Retry to debug the application.
All right, let me let me run in debug and see what happens.
Maybe I'll figure out what the uh what's being thrown.
Invalid parameter with entity get ID Okay, so I'm performing a lookup on entity, but then when I call.get kinematics, it's invalid because this is almost certainly failing to parse.
Okay, how do you uh open a browser in VS Code?
I just do uh control P and then start typing browser. Nope, sorry. I I just lied to you. It's control shiftp and then I start typing browser and then it's just open integrated browser. Uh VS Code supports it. Uh the one thing that I found that VS Code doesn't support with the browser is video playback. So whatever codecs or multimedia layer required to play video embedded um VS Code doesn't have or I don't have turned on or I I don't know. I haven't dug into it, but other than that, it's worked pretty well.
The only other thing I could maybe try I can make this a data property and see if Flex even supports registering it.
Because if it does, then that tells me Flex should be able to support it.
And if that works, then what I should be able to do is something like data position.
Something like that. If that works, holy [ __ ] That would get me what I need.
Crap. Unknown member data for type kinematics, which tells me this failed.
Serializer missing reflection data for type Uh there might maybe I can custom custom register. Sir.
Um, maybe it's in the quick start. Is there like a I'm looking for the meta cuz flex comes with like reflection reflection.
No meta meta meta meta flex reflection framework collaboration diagram for meta add-ons.
Okay.
Okay.
That's the API. I need examples.
Wait, do I have to import it? That doesn't sound right.
Oh, we are definitely over complicating this.
Honestly, I probably don't need the scripting language to begin with, but I am curious if I can figure it out.
Because what I what I would like to do in my code, I use instead of using like pointers or polymorphism uh or virtual inheritance, what I'm doing is and specifically for my events.
Uh where did I put that? Where did I put that? Uh UI.
No, it's right here.
Um, my events are a collection of strrus that I define as a variant. So my event type is a event keyboard, mouse, gamepad. Now, what I would like to do is use an action system here that basically defines like, hey, jump or shoot, fire, you know, basically something that maps to a keyboard, controller, what have you. And I want to be able to say, hey, um, and I do it here in main. I just commented it out, but I want it like I want this to be scriptable where I can say, "Hey, uh, create a jump action and use my event keyboard key pressed with the space bar as the action for jump." And then for shoot, it's going to be a mouse pressed for the button left. And so it would be cool if I could use this without having to write additional code to uh automatically handle like configuring this for uh using flex with the flex script. But my guess is flex doesn't support CPP variants.
Yeah. Uh I mean yeah like just about any game engine's input system. Yep. Good does it as well.
Probably like one of the lower priorities when it comes to like trying to build a game because really I think the highest priority is seeing if you can figure out um what you need to do to make the game fun.
But that's okay.
I was just seeing if this would be possible and I don't think it it either isn't or I don't know how to make it possible. It feels like I need a I I almost need like a way to translate the variant to a specific or a specific type to a variant.
Sometimes, not always, especially with a a third party library, but sometimes the AI can give you an answer.
Can I use standard variant with flex script?
Oh, yeah. That's This isn't going to work.
almost almost any C++ type. Almost.
Yeah, input systems can be difficult. I'm hoping my game isn't so complicated I need anything crazy. I just want to be able to configure it. I want to be able to tweak and adjust because I feel like uh you always hear uh the last 10% of whatever you're making takes 90% of the time. I'm trying to set myself up for success during that phase where you're going to have to adjust parameters, tweak values, uh change colors, those kinds of things.
Um, and I want to make that as painless as possible and as quick to do as possible, which is honestly why I'm wondering like I keep thinking and I keep going back to using something like Slint or Qtqu where they already have all of that built in and it is tempting.
Um, Slint requires Rust, the Rust compiler and cargo, but there's something to be said about being able to like change the values and have it and have see it visually change it. This will not be an entity component-based system, but that's okay.
I don't need an entity component system at all. My game isn't running like hundreds of thousands of entities. I'm not doing like an RTS or anything like that. Uh, so performance, I am not worried about performance.
I think as long as I can, you know, run it on this guy right here, I think we'll be sitting good.
So performance really isn't an issue.
Um, it might have an entity inspector. I know it has a website for its scripting language, um, which I thought was kind of cool.
I don't remember where that was, though.
designing with flex. Getting started with Unreal appar. Yeah, like flex is supported with these other engines as well. Hey, flex with ray. That's what I'm doing.
Entire shader reload system because you were fed up with reloading your application. Oh my gosh. See, you're already ahead of me. I I've I've written a handful of shaders in my career and none of them were anything crazy. It was all just like, you know, ignoring some pixels or or changing the colors of some pixels or transforming a vertex here or there, but I've never done anything complex.
It's something to be said with how easy it is to get a UI up and running with with a declarative language like this.
And I would still write my game in C++ but the visual elements of it could be built using this which would include input configuration and then data would still get serialized and loaded. So I would still use like JSON or binary to do that or binary JSON something that would that supports easy versioning I think.
So tempting.
I think the big problem I'm running into with Flex Script is it's not like so well supported that there are language servers for it and the extension for it with syntax highlighting is like four years old. It's out of date and the documentation isn't great.
Prefab varants.
Is this what I want?
This isn't what I want. This is just literally different ways to use prefabs.
Enemy stylized sky shader. That sounds pretty cool.
Is my cat here? Hey, what are you doing?
Hey, come here. No. Is it time to feed you? What time is it? Oh, I haven't fed my cat. I'm going to I'm going to use the bathroom, feed my cat, and I will be right back.
Well, if we can't use variance, we could still achieve what I want.
We just have to like define a different type, right? So, let's say I have an entity that represents my action map.
So I would need then to I could still support generic entities.
A generic entity being like an action, but then I could use different components, right? So instead of using like the event component straight up, I could just have a um a name component and call it jump.
I could have a um event keyboard component.
And what would it be? It would be type pressed P space something like that. I'd have to and because these are like generic entities, they could have their own components under this. So now shoot would become name shoot event uh event mouse type press button left. So I could do something like this. Um, except this would be lowercase because it would be a property.
Oh my god, this autocomplete. It wants to help me out so bad. It won't stop. Oh my god.
Just hold the project in my head. You're not wrong.
I never did uh buy more bread, so I'm still eating peanut butter buns.
So, I think I do something like that.
I should go buy bread.
I think this is the last uh I think this is my last bun, too.
So this is an entity.
I would loop over its children to get these entities.
These entities have a component called action with a name and a component for the event.
And then I just use that. Oh man, I think this will work.
buffer is on to something. I need to get more buns because I'm out of bread.
And I think this will work.
because then I can collect that action map which would basically replace uh where is it?
It would replace this here.
So then I I still collect my input events and then I would use that action map collection of entities to translate them into actions. So I can still do that.
I don't know if Plex supports enum serialization.
Yep. Multiple keybinds for the same action. I definitely would would support that. So basically because this is using an entity component system, I could foresee doing something like this as part of the configuration.
Uh what would be a we'll just say right. So I could proceed doing something like that and collecting the components that not compile.
Okay. So here we would look up the action map and we would call children and those children are the actions and then in actions.
Oh shoot. Yeah, we can just So for each action, we would get its name and then we would see if it has a keyboard event or a mouse event and then that would be the trigger.
Uh no matching overloaded function. Uh is this not right? Is this not return an entity?
It return. Yeah, it returns an entity.
Am I doing this wrong?
Oh. Uh does it not like being constant entity then I call children on it matching Uh, it's just an entity. It's not a pointer or anything.
Uh, should you watch me code if you are new to coding? That is a great question.
I don't know.
Um, I think it's worth tuning in when we start talking some good need to know types of stuff, which is kind of where my YouTube shorts are coming from. Um, I also think there's a lot more advanced stuff that I'm doing that might be a little too much. Um, I've got some fairly complex project setup configuration going on with CMake and dependency management that I wouldn't necessarily expect someone new to learning C++ need to focus on. Um, so that might get a little confusing.
What I'm doing right now, I'm not doing anything crazy. I'm just learning. Well, actually, this would be a good time to tune in because you're watching me learn someone else's codebase and trying to figure out how I want to um use it for my codebase. And so, this is kind of how I go about learning new libraries, new APIs. I sit here and stare at it and cuss and struggle and stare at it some more and then give up and then come back a couple days later and try it again, give up, try it again and then and then cry myself to sleep. But then eventually I figure it out.
And because I eventually figure it out, I know that. And so I know not to really give up because I will figure this out eventually.
I don't know why this is being a jerk, but it is being a jerk. Entity view.
No matching overloaded function found. I could have sworn I could call.
Can I not call echildren?
I can.
Does lookup not return an entity?
This is the only function called lookup.
It returns an entity.
Is children not const?
No, it's const. Oh, wait a minute. Oh, is it expecting a function? Uh, a lambda.
I thought I could just get all entity children.
Uh, this makes it look like I can't just get all entity children. It looks like I have to pass in a function to determine which children to get.
Oh, it's not even doing that. It's I have to I pass in a Oh, If the entity has an action, it goes into my action list.
It also helps um the way I go about doing this, it helps like being able to read other people's code bases, right?
So, as soon as I saw that this took a template type named funk, like I am familiar with seeing this pattern in C++ code bases. It's a pretty good pattern to use for um performance reasons versus like passing in a standard function kind of thing. So, as soon as I saw that, I realized I needed to pass in a lambda.
So, that's good. Now, I need to figure out what else is broken.
shave his belly with a rusty razor for the morning.
Yeah, I don't think this works. Magic.
I'm not uh standard visit. No matching overloaded function found.
That is that is horse donkey.
The only thing I could think is this might not work if the type is event mouse. Yeah, this might not work.
I might have to be explicit. So, this needs to be like um Come on. This needs to be uh what does this need to be?
This needs to be like failed to find.
I don't know, something like that. I don't even know if that'll compile, but that's okay because I need to handle the explicit types. Um, there we go. Cool.
Autocomplete. Go.
Do it.
Do it. You won't.
There it goes.
All right, I'm getting real fed up with these compile errors. Standard visit, no matching overload found.
Oh, um, wait a minute. This isn't right. I'm being dumb. You guys are letting me be dumb. I'm not using a variant for this.
I'm using the the event struck directly. So all of this was just completely wrong and you guys let me do it. I blame you. Should have been this stupid autocompletes.
Hey, how's it going? It's you are uh joining me at a time of exploration and struggle.
First try. Oh, that failed miserably.
Missing reflection data for action name. Is that true?
That's a freaking lie.
Missing. Oh. Oh, wait a minute. Wait a minute. Wait a minute. I don't You don't use a comma here. I think that's what's wrong.
I am in the process of figuring out how I want to handle project configuration for a video game.
Son of a biscuit. Um, I have already See if I still have the website up. I don't. I need to I need to have this website open at all times. I think I have already scripted a game demo in GDAU. I have a website um if I know how to spell it called brierthorn.game.
So top down 2D tactical maybe rog light maybe RPG maybe uh fighter aircraft something. That that's about all I can tell you. Um, but I scripted that up in GDAU as kind of a quick and dirty demo.
Now I'm wanting to actually implement it, but I want to use C++ or more C++ than what GDAU has given me.
So you're watching me build this up with um, currently Flex, an entity component system that supports scripting its components, which would be cool for project configuration and building out game levels. U we'll see.
Oh, hey, Penny.
Uh, do I have open YouTube chat and Twitch chat separately? No, I don't. I am looking at one screen. So, if YouTube talks to me and it's not coming through, I do completely miss it.
But I don't think I'm missing anything yet. So, if I miss your messages, I apologize. I'm still learning. Um, I don't have a third monitor. I think maybe eventually once I get a third monitor, I'll just have like everyone's chats open on one monitor and I'll just look at that. But right now, I got like a little a little window that has everything integrated because I'm using a um I forget what I'm using. I'm using something called social stream ninja to combine all the chats.
Okay. So, it cannot resolve member name even though I register.
Check out Chat Arino. I'll look it up.
I'm I'm not I'm not uh I have not settled on any one solution yet.
I've gone through like three different uh chat integrations at this point.
Multiple types of plugins and stuff for OBS.
Still trying to figure it out.
All right. I don't know why it's yelling at me about action name. I would have expected that to work. So, I think what I need to do is simplify the problem and see if I can get that to work.
Uh, so if I do world.cript script run and I create an entity and I give it an action component.
What I would expect then script run. We have an entity component or we give it an action component and assign it name jump.
Screw this game.
Six 4K monitors, three for programming, two for gaming, and one for Discord. And make it all different shades of of whatever that color is.
I did um I I did have back in the day I had three 1080p monitors all mounted and uh I had oh my gosh, what was it?
Two GTX 6 uh Nvidia GeForce 680 GTX. I think I had that in Sly SLI configuration. I bought them used on eBay and I wired them up. I used uh Nvidia had a configuration that turned your three monitors into a single display. So I wired all that up and then I had Skyrim running on all three displays and it was the coolest thing ever.
It was hard to play that way but it was really cool.
Uh, all right. Why is programming so dumb?
What am I doing wrong? That should be like really straightforward. I'm not even doing anything crazy. I register an action. It has a named member.
Unknown member name for type for type action.
Am I spelling it wrong? Action. I I have been known to spell things wrong.
Action.
Do I Wait a minute. Wait a minute. Do I need to uh surely not. I don't need to include string. Surely not. Um, okay.
So, what's going on here?
What is this called?
How do I flex script?
I am literally doing this, right? Aren't I?
I am literally doing this.
The amount of time and effort it's taking me to just figure this out is really making me think I should just give up and use like slint.
Slint might be the answer.
because then all I would have to do is integrate I could use SDL3 gamepad integrate that with Slint and then everything else I would just do myself I think I would have to integrate Steam obviously. I mean I I was going to have to integrate Steam no matter what.
Why is this not working? I'm literally doing what?
The S and C++ stands for struggle.
You're not wrong.
Hey, old school coder. How's it going?
Thank you for the raid. Really appreciate it.
Uh oh god. How's it going?
I w I wish I would I wish you would have raided when I was like doing something really cool and not when you guys are watching me uh bang my head against uh the C++ API.
All right. I'm not doing something stupid like building it in release and running it in debug, right? Nope. I'm definitely not. I'm just being dumb.
Uh I mean, yeah, we'll definitely we'll definitely have a stream on integrating Steam. That will happen someday.
I I need to get a game up and running first.
How's it going? Sourcey sort sort sorty source source. I apologize for the pronunciation.
Okay, this should work. I'm not being dumb.
C++ is being dumb. It's not me.
All right, let's simplify the problem more.
We'll just narrow it down to exactly what I need. You know what? Let's also not import just in case like if I'm importing something that's like causing some name clashing, we can eliminate that as an error.
What the freaking freak? Missing reflection data for type basic string.
Oh, are you kidding me? Lex doesn't handle standard string by default.
No way.
Saucy. Okay, fair enough. How's it going?
Apparently, Lex doesn't handle basic string. What?
That's fair. Flex is written in C. C++ is just a wrapper around it.
Interesting. Let me let me try that.
We'll see if see if that's correct. So, it's saying I need to do Wait, what did it say? I already forgot.
I literally looked at it and then I immediately forgot. Okay, so it's saying I need to do it like this. Standard string name.
the struggles of learning someone else's API.
Flex is pretty new. Uh well, okay. So, Flex is I don't know how old Flex is. Um but it is extremely well supported.
Uh maybe not extremely. It's well supported. It has 8.4K stars. It was last updated 3 hours ago. Um, I do know it's like being used by uh I would say a maybe not a AAA game, but a double A game uh in Tempest Rising and then some of these other games like it is being used now. I don't think my game will be H. That looks cool. Um, hey, this is this is using an aircraft.
So, like there's proof it works with aircraft, right?
Whoa.
Who are we? Who What does that even mean?
Probably fed dinosaurs.
Rude.
Uh, okay. So, the AI, the Google AI is clearly wrong as well.
Do I have to Oh, do I have to do it like this? There's no way.
Wait a minute.
So, can I use vector or other types inside components?
Good save. I have fed a bird before.
I'm like, dude, I just want to use All right, it's time to bring out the big guns.
I can also look and verify that flex github doesn't have a like examples for like STL types.
I have to define. Okay, so this is kind of what I was looking for. I have had to do this before with other like serialization libraries where um you sometimes have to define like a translation layer to go from one type to a type that that serialization library supports.
Um, so I'm curious if the LLM here will come up with this solution where I need to define like a way to translate from like a char star to a string or something like that.
So that's interesting. So this needs to get defined first. Oh my gosh. Wait a minute. That means if I can do this, maybe I can use that variant solution after all.
H yes, I don't know. After all that, I kind of like the other solution I came up with, which is just use components.
Use the components directly. But if Oh, man. If I can use a variant solution though.
So, GitHub has recently updated its uh its usage policy for AI. And the fact that this is still running probably means I have just consumed my entire month's use of uh AI in one prompt.
So after this guys, it's it's just pure raw programming and it's the first day of the month.
217 kilobytes is quite small for having a full C++ layer. Let me check if there's Yeah, I don't I honestly don't know what's going on. My suspicion is with GitHub Copilot, a lot of people were taking advantage of just being able to uh with like a couple of sentences being able to run a ton of agents at the same time, which was causing a lot of, you know, server costs, but I can only guess. I have no idea what how all that stuff's working under the hood.
Oh, thanks. I appreciate it. This isn't This list isn't anything in particular.
It It's based off of a um Oh, there there is a YouTube singer. I don't actually know if she's a YouTube singer, but a singer, an artist named Alina Ginger Tale, and she did like music covers of some RPGs I like. one being Boulders Gate 3, which I really liked. So, I always just pull her up and and shuffle the the radio station with her, and this is what we get. And it kind of turns out really well.
Nothing like very soothing, nothing too distracting while I code.
All right. Oh, it might be on to something. It may It might be figuring it out, guys. I think it just figured it out. It has everything it needs. Oh, it's changing my file.
Oh, it figured it out. I mean, I found it faster. So, I I beat Let it be known I found the solution quicker than the LLM, even though it may have written it before me, but I was waiting.
And all it cost was $10.99.
And you're not wrong. LLMs, I don't like I'm not I'm not even talking about vibe coding, but just having the ability to like debug, run a bunch of scripts to to get your code compiling. Um what else?
Just general like problem solving and googling. So everything I would have done and what I used to do in the past.
So like I grew up in the age of Stack Overflow and I experienced the pain everyone else did using Stack Overflow, which is you go on there, you can't find an answer to your problem, so you you you write up a really nice uh uh description of your problem. everything you tried and they close your post because it was duplicated.
It wasn't duplicated. My the the answer I needed did not exist. So then you reopen it and then you get flamed and it's like what the hell guys? I'm just asking a question. I I don't know the answer to this. How do I use boost? you know, how do I how do I do uh how do I use boost asio to to get like a multi-threaded UDP TCP solution going and they and you just get trashed on you just get you just get trashed and now like that issue didn't go away like developers have questions they have questions on APIs third party libraries out there that are well used and poorly documented So there are people that exist that are really good with those APIs. Like I would be able to answer questions for QT for instance that might not be documented because I've had my head in the codebase for years, right? So there there are experts out there that probably has come across your problem.
And so being able to ask someone and get an answer is huge. It saves so much time and money until they flame you and then you don't get your question answer because you worded it wrong or you accidentally misspoke or used the wrong vocabulary words. Well, now all I have to do is say, "Hey, copy and paste my error into a prompt."
And boom, it found it. It literally found it. Now, obviously in this situation, I was I I I knew because I have some experience with Flex, I knew to go to GitHub, go into its examples, read the code, right? But maybe you're a newer guy, maybe you're not as familiar with GitHub, maybe you're not as familiar with uh reading other people's code bases, and all you have to do is be like, "Hey, I got an error." Boom.
There's your problem.
That's addicting. That 100% is addicting. I don't know if I want to go back to Stack Overflow because of how like even when you do manage to get your uh question answered, it's like weeks if not months ahead or like later and you've already moved on because your job requires you to move on. You can't just sit there and wait three months to solve a problem. So, you have to work around.
You have to come up with something else.
Um, so I definitely can't go back to that. So from that perspective, LLMs are highly addicting.
Oh yeah, it's it's voodoo magic when you don't understand what's going on. But when you do understand what's going on, it's such a huge like force multiplier.
I can get so much more done so much more quickly, especially when it's like code that I have already written before or I like I've written time and time again, so I know exactly how I want it written. Well, then it gets to a point where I just describe a couple of markdown files that correctly explains how I want my code written, how I want it styled, how I want it uh formatted, tested, etc. It's just so powerful.
Now, this is coming from someone who hasn't had to work with younger people or inexperienced people also generating a bunch of code. So, I haven't been responsible for what they are producing.
I imagine that would become a challenge.
But even then, like from a business perspective, I'm just setting up like policies and processes to make sure, you know, everyone's adhering to them. Maybe some training, you know, that kind of thing. But even before LLMs, I was still training. I was still teaching the the newer people like how we should be writing code, that kind of thing. That doesn't go away just because we have LLM.
All right. Anyway, all of that so that I can use standard string as a type.
Um, so this is saying take the string data as a C string and then treat it as a flex string and then when I'm reading the data from a C string, store it as my standard string.
So now this should work.
question mark, please.
This is huge. If I can define my own serialized functions for custom types, I'll I'll literally be able to do whatever I want. I literally do whatever I want.
I could I could make a game and run the game by loading the file. So, not not like load the file and run the game. I mean run the game while the file is loading. And then when the file's done loading, the game is over. Oh man, is that a game idea?
Man, I don't know what I don't know what kind of game you'd make out of that. You have to like beat the game before the file finishes loading.
I mean, that's literally just a game, isn't it? Like, you're just streaming the the the levels from disc while you're playing the game.
I just invented video games.
Okay. So, let's make sure we can still do what I intended. So treat these as components which means I can then define this as a list of actions video game TM.
Okay. If I'm good at what I'm doing, then what should happen is we get an entity called action map who's going to have child entities called jump and shoot. And these child entities jump and shoot will have an action component and an event component or multiple event components that represent um what can be used to trigger the action.
Which means this guy here should get populated with two entities.
Which means we will get two names followed by uh Okay, this won't be quite right. We're specifically or no per entity. No. Yeah, two names. Okay. Yeah, we're doing this first try after all these other tries.
[ __ ] [ __ ] [ __ ] Unresolved identifier event keyboard.
Wait, do I need do I need the name space?
Surely not. I can't be right. I'm I know I'm doing this wrong. I'm just guessing.
ladies and gentlemen, I can script an action map.
And if I can script an action map, that means I can tweak and adjust game input without having to recompile over and over.
Holy [ __ ] That worked because then I can just feed this into my um generator because I am basically so I collect user inputs. So raw inputs, keyboard, mouse, etc. I take those inputs plus the action map that I just parsed and turn them into actual like actions, game actions. So, this basically defines the API of your video game. And then those actions get turned into commands. commands is what's going to modify state move like tell your character to move, tell the aircraft to fire a weapon, uh uh navigate an inventory system, that kind of thing.
And then we update the game state, update UI state, play audio, etc. And then draw.
And then we're done. That's it. That's a video game done. This was easy. God, video games are so easy.
do the Royal Navy ad, but for I don't even know what that means.
Heck yeah. Okay, now that I figured all this out, do I use flex?
Do I use flex?
The downside is I don't really get a lot of syntax highlighting and language server provider because I could do something very similar with the um uh slint or QML APIs and that would just work out of the box.
I I'll definitely look up the ad. Royal Navy ad. I'll remember that.
All right. I This is good. I I wasn't 100% sure I would be able to get this figured out tonight.
Uh sometimes when it comes to programming, especially when you're like exploring other people's APIs. You know what? I think I'm done showing off code.
Um but yeah, so sometimes like at least for me, I have an idea in my head on exactly how I want to like architect a project, how exactly I want to handle solving a problem, but I don't have experience with some of these thirdparty libraries. So I just literally don't know how to use them. I didn't know I needed to add a um a a serialization layer for standard string when I'm so used to like APIs providing serialization for standard string.
Though it kind of makes sense because under the hood of flex is a C library which isn't aware of any STL types. So that makes sense, but it still time consuming. And I'll be completely honest, if I wasn't like live streaming this, I probably would have used an LLM to ask for the answer a long time ago. But I did want to show like my normal process for uh figuring things out.
So, I do think it's useful for people who are new to coding to kind of like see how I work through it, how I simplify the problem when something isn't working, how I read code, you know, that kind of thing. I do think that's worthwhile. I don't I don't think we learn a lot if you're just sitting there watching me like write English paragraphs poorly and then getting an answer right now.
Obviously, I broke down at the end, but at least you kind of saw the process.
Um, so yeah, this is exciting because if I can script this, then the other honestly, it wasn't even like input handling scripting that I really wanted. What I really am going to want the scripting for is level design.
I want to be able to like place entities easily, script them in with like position values, what types they are.
Um, I'm not really looking to do logic, but being able to just like add and remove enemies, being able to uh change loadouts or define like uh their stats, being able to script all that in um so I can adjust it and tweak it. I think that's going to be huge, especially when it comes to like balancing gameplay. I think that's going to be important. Um, and then the other piece is UI and styling. So, designing what the UI looks like, being able to define color, line thickness, things like that that you don't really like think about when it comes to building a game because you're more focused on the game play. Um, it's all that stuff that comes at the end of bu making a game. the last 10% that takes 90% of the time. I want to make that as easy as possible. So that's why I'm like putting a lot of effort now into figuring out the like basically the core architecture of how I want to use the game. So is it going to be entity component system? Is it going to be um something else entirely?
Time will tell. I'm hoping I don't know if I'll have the answer this week, but maybe by the end of next week. This is part of the process. Just exploring what's in the realm of possibility. How like I'm even paying attention to how how long it took me and how hard it was to figure out how to serialize and read a string, right?
how like it took a couple hours because I'm I started stream a little after 5:30 and I'm only streaming so like the stream's almost over. Um, I only stream a couple hours a night. And so if I am dedicating two and a half, three hours every other night to building a game, I want to and I'm not using GDAU or Unreal or Unity.
And I want to um and I still want to show off some C++ while I'm doing streaming. So that's why I'm C++.
Um, I need to know what level of effort it's going to take to learn these APIs because if I can figure out some of the hard stuff now and realize like, oh, okay, the rest is easy. Oh, yeah. This is good. Flex will work. Um, but if it like if it was going to take me all night to figure out how to serialize a freaking string, that's when I start to question like, man, is this actually worth my time or should I look at something else? So, that's that's kind of where I'm coming from with this because I don't at the end of the day I'm not too stressed about whether I make the game or not. It's more about just exploring, learning, writing some C++, yelling at it, hating it, punching my monitor, you know that that kind of thing. It's all about that, right?
Right.
Yeah. Yeah. It's all about that. So that's that's where I'm coming from.
So this is this is huge progress. I was able to figure out how to use flex to parse components which will make the game configurable.
I think that was the hard part. I already know how to use flex in C++ code.
So this is good. And if I wanted to with Awen the like the game engine portion of of what I've been showing on stream maybe I maybe I can port the flex implementation stuff back into Awen. So, as I'm building up the game, you guys still get maybe a uh an open source GitHub project you can follow along. Um, we'll see. It It all It's all time dependent.
Say no to LM. Ah, it's so addict. It's so addicting. LLMs are so addicting. Not even like like I said, not it's not even the vibe coding. It's just how quick and easy it is to get answers to the questions you have. Um, that for me anyway. Now, if I honestly if I got my codebase written to a point where I like it, where I have a process for like adding a new game feature, like this is how you add a game feature. You're going to you're going to create a module.
You're going to define the the data for the game feature. You're going to define how you're going to visualize the data.
Like if I define a number of modules myself that describes exactly how to do that, then yeah, it would be a lot quicker to have an LLM read the data structure. Maybe have a markdown file that also describes how you write your code and test it and then just say, "Hey, I need to shoot a missile and have it explode and animate the explosion using um using particles or something like that."
Right. Yeah. 100% the LLM is going to be able to take what I have already written and align new code with it and then I could just review it kind of thing. Uh I don't know if I'll ever get to that point. We'll have to see. Uh but for now the exploration continued and was successful. I have a little bit more exploration I think I'll do. Um but I am leaning heavily towards using flex right now.
Um, do I have an issue with contributors? I would hesitate to have contributors mainly because if I am if I am successful in making a game and releasing it, I don't want any legal situation or honestly to feel like even just feel bad for profiting off of free contributors. Right. So, even if I make my uh uh the portion of the game open source that's like general where anyone could use to make their own game, I I just I don't know le legally. I don't know. I I just I it feels weird.
It's like using my my viewers to build the game for me, which feels kind of gross. Um so I I don't know. Yeah. Yeah.
If I I mean, if I made it rich and famous, I'd have no issue paying contributors. Um, but I I'm I hold no illusion. I'm not making the next Stardew Valley. I'm making a a fairly niche video game where maybe a handful of people might find fun, if I can even make it fun. Um, so it's also just practice and a and an excuse to show off some C++ and talk C++. I mean, it doesn't have to be a game. It could be anything. It's just a game is something I've always wanted to try doing.
Yeah. Uh, okay. I think I am going to call it here. Tomorrow I'm back to Balders's Gate, Balders's Gate Enhanced Edition. And then Wednesday, we will be back to programming some more. Uh, Thursday, some more Balders's Gate. And then Friday is usually my longer streams. That's really the opportunity to kind of get the head down and and write some logic. Uh, so that's kind of where we're at there. Uh, again, like I said, weekends are always up in the air.
I was busy this past weekend. Maybe next weekend I won't be. Um, and and I'll either play a game or do something. I don't know. We'll see. But yeah, thank you guys. I really appreciate you coming out. We had a we had a really good showing today, which is very exciting.
Um, and I hope to uh see some of you tomorrow. Have a good night.
Related Videos
Agentforce NOW AMA: Build with React and Salesforce Multi-Framework
SalesforceDevs
490 views•2026-05-28
How agent o11y differs from traditional o11y — Phil Hetzel, Braintrust
aiDotEngineer
450 views•2026-05-28
WEB TECHNOLOGIES UNIT-2 | Degree 4th sem BCOM Computers web technologies unit-2 full explanation💯✅
LearnwithSahera
1K views•2026-05-29
More tests are always better? How to use AI to identify tests that bring little value
Alliance4Qualification
335 views•2026-05-29
Search Algorithms Explained in 60 Seconds! 🤖💨
samarthtuliofficial
218 views•2026-06-01
People of Game of Thrones using JavaScript DOM
AltCampus
296 views•2026-05-30
Introduction to Problem Solving Part - 1 | Lecture 1 | Intermediate DSA
ascensionix
107 views•2026-05-29
🚀 BCS613C Compiler Design | Module 1 to 5 Schema Evaluation 🔥 | VTU 6th Sem 💯 #VTU #bcs613c #exam
Pranavaa-y4y
104 views•2026-06-02











