Пікірлер
@aybcrazybeats8588
@aybcrazybeats8588 9 күн бұрын
I suggest you consider creating a generic "Component" type. After that all those individual component vectors could get replaced a single vector holding either component pointers or better yet, smart pointers. Doing that you don't have to create new containers for every new component type. Exploit the features of polymorphism, that way you can write code that's more maintainable and easily expandable with new features
@eduardopozos5022
@eduardopozos5022 Ай бұрын
1.69..k subscribers? I'll fix it.
@topec1263
@topec1263 Ай бұрын
bro created runescape at 7:04 GG
@Code_Gains
@Code_Gains Ай бұрын
It actually looks similar, now that I look at it
@qubitx64
@qubitx64 Ай бұрын
bros doing gains in both Elden ring and game engine.
@sammer1122
@sammer1122 Ай бұрын
its worse than scratch, but better than unity :D
@dontuo
@dontuo Ай бұрын
I will definitely use your engine when it is available on linux. I use arch btw
@ahuvagottdiener6605
@ahuvagottdiener6605 Ай бұрын
I use arch btw
@Code_Gains
@Code_Gains Ай бұрын
Guess, I'll need to buy the socks then.
@dontknow7863
@dontknow7863 Ай бұрын
💪💻 🤖
@rileyhawksworth8362
@rileyhawksworth8362 2 ай бұрын
I'm back from a previous episode. I remember commenting about my interest in creating my own game engine. I followed through with it and I have a GitHub for it. Development is slow though and it is in a very early state. I only started it 2 weeks ago. As a challenge I'm using Vulkan for rendering.
@Code_Gains
@Code_Gains 2 ай бұрын
Good luck!!
@rileyhawksworth8362
@rileyhawksworth8362 2 ай бұрын
Thanks! Good luck too!
@python_n_c
@python_n_c 3 ай бұрын
Subscribed because you use C++. Cool project!
@tsf8086
@tsf8086 3 ай бұрын
Good. Now make it remote controlled.
@levmurflatazara9853
@levmurflatazara9853 3 ай бұрын
Hey i am also dumb so i will ask question to same dubness but more experiencess human entity Is it good idea to make game editor separate programm that will somehow load game code and edit save files itself when running game to show game world and its transforms? Or it is better to somehow implement editor into game loop and idk like turn it off somehow in release version??
@Code_Gains
@Code_Gains 3 ай бұрын
I wouldn't dare to say how it SHOULD be done, but I ended up making the Core a static library and the Editor a separate application (with the intent that games are also completely separate and would have no editor code in them). You can check out the latest video to this date.
@bioblazepayne
@bioblazepayne 3 ай бұрын
I just worked on excluding editor/client/server code last night in VS2022. You can use #if IS_SERVER and then in VS2022 you can define it as a variable, and if that variable is set then it will only compile that code, else compile the other. **Thumbs up**
@tutacat
@tutacat 3 ай бұрын
visual studio is literally just an editor. it doesnt do anything except integrate.
@dontuo
@dontuo 3 ай бұрын
It's cool that you finally chose the build system. But I'm interested in one question. Will you make the engine cross-platform? (at least for linux and windows)
@Code_Gains
@Code_Gains 3 ай бұрын
Yeah. I have plans for Vulkan in the future once the core architecture settles a bit. The plan is to make some sort of preprocessor code that would allow to compile for all platforms.
@dontuo
@dontuo 3 ай бұрын
​@@Code_Gains cool😎
@NexusGamingRadical
@NexusGamingRadical 3 ай бұрын
I never thought to cook my spaghetti code, good thinking!
@Alguem387
@Alguem387 3 ай бұрын
build.ps1 > build systems
@forest6008
@forest6008 3 ай бұрын
I love this, hope you make something awesome, im trying to do the same thing
@Code_Gains
@Code_Gains 3 ай бұрын
🫡
@DeuxisWasTaken
@DeuxisWasTaken 3 ай бұрын
dx11?? but why tho edit: ok I saw the explanation in #0, doing it just to learn because it's beginner-friendly is probably the only sensible reason to use it. It's a shame that by choosing it you've immediately committed to the engine being Windows-only and kinda outdated from the get-go, but it's better than trying to start with Vulkan and then giving up because it's too hard.
@scrapmine
@scrapmine 3 ай бұрын
dxvk and proton exists.
@DeuxisWasTaken
@DeuxisWasTaken 3 ай бұрын
@@scrapmine yeah, and they're translation layers that introduce overhead and bug surface just to run an outdated (by 8+ years at this point) graphics API meant for Windows by design. It's awesome that they exist and have gotten to the point of working (pretty) well; it's understandable when people fall back to relying on them due to learning or severe time/budget/workforce constraints, but using them is still quite a bit worse than developing for native support using the modern multiplatform API that is Vulkan.
@scrapmine
@scrapmine 3 ай бұрын
@@DeuxisWasTakenRunning dx11 games in proton gives near native performance for many games.
@DeuxisWasTaken
@DeuxisWasTaken 3 ай бұрын
@@scrapmine many, not all, and that's only because the wine/proton people poured sweat and tears implementing it. "Performance in best case scenario" isn't all there is. Besides, I've seen that some games run faster on Proton than on Windows. That's not due to Proton being magic but due to the linux kernel, drivers and whatnot being more optimised enough to offset the overhead brought about by Proton. Running natively they'd get even better performance.
@_starfarer
@_starfarer 3 ай бұрын
Vulkan only opens up the possibility for running on Linux which doesn't expand the userbase much at all. It might be a good idea compared to DX12, but it's not worth the headaches caused if it's unnecessary.
@Benjaneb
@Benjaneb 3 ай бұрын
8:40 I see a lot of people write code like this, having a pretty much empty main function that just calls another function. I usually think it looks stupid but is there actually a good reason to do it? Did you do it because you know you want other code around the editor?
@Code_Gains
@Code_Gains 3 ай бұрын
I don't think there are any hard set rules for this (because the program won't run faster or better), but for me If I have a project and see the main function I want to immediately understand what the entire application does and in this case it runs the editor (this is opposed to reading that messy code to understand that this is the editor).
@scrapmine
@scrapmine 3 ай бұрын
I know that with rust it reduces build times by a significant about, might be the same for other languages.
@Benjaneb
@Benjaneb 3 ай бұрын
@@scrapmine Build time would only be reduced if the code is separated out into another compilation unit (i.e. another file) and that unit is already compiled and you haven't made any changes to it, so if that's the piece of code you're actually working on it would do nothing to build time.
@thundertastic896
@thundertastic896 3 ай бұрын
The cherno video he referenced touches a bit on this but it's a combination of DX ergonomics when debugging & having the ability to restart your whole editor "view" without closing your application process completely (which may be a hard requirement for certain features).
@Samrax86
@Samrax86 3 ай бұрын
Nerd
@rordo.
@rordo. 3 ай бұрын
Excited to see where this goes next!
@thomasp9511
@thomasp9511 3 ай бұрын
knowledge acquired (IQ inceased +1 total 69)
@dontknow7863
@dontknow7863 3 ай бұрын
💪
@fakedy9539
@fakedy9539 4 ай бұрын
Im glad i found this channel. I'm planning on creating a new engine myself since ive matured a lot since my first attempt. I like your style :)
@drominitoketchup
@drominitoketchup 4 ай бұрын
Nice, another guy who loves low level programming². Oh, I'm already a subscriber to your site, I didn't even notice 🤔
@nolram
@nolram 4 ай бұрын
Do NOT use Cmake. Cmake is one of the worst programs ever written. Dependency management is hell with it, it’s not backwards compatible and breaks every few years, and doesn’t even allow multiple versions to coexist. The documentation is sparse and often features just… break. Use Premake if you value your sanity.
@leonardo01570
@leonardo01570 4 ай бұрын
I’m using Cmake for my game engine and it’s alright. There ar some playlist that you can watch and learn, there is a video called “do you even test? - Cmakel” (or something like that) that you use to add modules to your project. I never tried premake, but whenever o check forum, the results say Cmake is kinda the standard
@anthonyapm
@anthonyapm 4 ай бұрын
Good job man. I've been battling the same problems 😅
@hexdragon_
@hexdragon_ 4 ай бұрын
you can actually draw a hexagon using just 4 triangles
@Code_Gains
@Code_Gains 4 ай бұрын
And now I know. Thank you. I only saw it after you commented and I will not be able to unsee it.
@Code_Gains
@Code_Gains 4 ай бұрын
I love your youtube handle as well. You live up to it.
@graphicstalk7609
@graphicstalk7609 4 ай бұрын
Use tuples instead of vectors. Tuples allow you to have a dynamic array that contains multiple types.
@Code_Gains
@Code_Gains 4 ай бұрын
Thanks for the tip. I will be sure to include tuples in my analysis once I come back to this in the future vids.
@timtreichel3161
@timtreichel3161 3 ай бұрын
No I don't think this is a good if you want to go with an ECS architecture. You want the components to be stored continuously, for each component type. So going with a single vectors for each component is exactly the right way to go. Then you want to iterate over the components vectors individually when updating the game/simulation state. That way you have the most cash benefits. Code duplication can be avoided with templates. Looking up components can also be implemented with linear or binary search and will probably be fast enough in most cases. Dealing with hash maps brings their own draw back, but I guess it can be done and might be needed in some cases.
@MasterBroNetwork
@MasterBroNetwork 4 ай бұрын
Great video, I think there is a way to disable that right-click menu in File Explorer with a registry tweak, I'm not sure though.
@Code_Gains
@Code_Gains 4 ай бұрын
I found some github repositories that have an executable to remove that pesky menu later.
@kudorgyozo
@kudorgyozo 4 ай бұрын
your engine looks great, with UI, enemies and everything. Very nice!
@Code_Gains
@Code_Gains 4 ай бұрын
The only enemy is me. Thanks though.
@MJ123and5
@MJ123and5 4 ай бұрын
Mine is worse ahaha
@Sam-rr4ek
@Sam-rr4ek 4 ай бұрын
help i am big noob, what programs do i run so i can code in c++ for unreal engine 5
@xzaz2
@xzaz2 4 ай бұрын
This looks like Silkroad online
@basboerboom9328
@basboerboom9328 4 ай бұрын
I feel your pain. I am currently on my countless'th iteration of ECS for my game. Every time I almost get a Eureka moment, I run into a problem with my ECS system.
@aurimasjurgelis2261
@aurimasjurgelis2261 4 ай бұрын
I found this video randomly, thanks to the KZfaq's algorithm. I wasn't disappointed because I used to be interested in game engines too (and Lineage 2). Nostalgic and educational.
@tarck333333rrrr
@tarck333333rrrr 4 ай бұрын
Noooo, build systems are a trap! Never worry about BS like separating editor and code at this stage! I even seen AAA project that do that with extra build. Heck, look at DOOM BFG source! It has only 4 projects and it mainly for mod support. It even has editor build in into main exe! All crap like this just distract you from your main goal - making game or gameengine.
@Code_Gains
@Code_Gains 4 ай бұрын
I think it is better done early, than when I have a completed project. Also I think it is a very valuable thing to know how to do and I want to learn it.
@tarck333333rrrr
@tarck333333rrrr 4 ай бұрын
@@Code_GainsValue is doubtful. I can be done later or never - lots of AAA projects begin by checking in last title source into a new repo.
@thomasp9511
@thomasp9511 4 ай бұрын
Hmmmm..yes..oh…true dat.. big brain
@rileyhawksworth8362
@rileyhawksworth8362 4 ай бұрын
Hey, I really like the videos and you are convincing me to make my own game engine. Keep u the good work. I've used cmake before and it seems good but never used premake. If you plan on sticking with compiling on windows msys2 or the windows subsystem for Linux might be helpful.
@Code_Gains
@Code_Gains 4 ай бұрын
Thanks! Good luck with your engine if you decide to do it in the end.
@rileyhawksworth8362
@rileyhawksworth8362 4 ай бұрын
Thanks, good luck too. Currently I've just been learning Makefile because I was recommended that by someone part of Travis Vroman's discord server. He is also making a game engine, might be a useful reference. The reason I was recommended Makefile is because I'm only planning on supporting Windows.
@InfiniteCoder01
@InfiniteCoder01 4 ай бұрын
Ha, you are following my way and the way Low Level Game Dev went. Welcome to the club!
@orbyfied
@orbyfied 4 ай бұрын
🔥🔥🔥🔥🔥
@sleepymushroom9403
@sleepymushroom9403 4 ай бұрын
Hello there
@Code_Gains
@Code_Gains 4 ай бұрын
Hi?
@GTGTRIK
@GTGTRIK 5 ай бұрын
This is really helpful on my own ECS journey. I've been struggling with the whole magic layer of "linking components to entities".
@Code_Gains
@Code_Gains 5 ай бұрын
Glad to hear I helped someone
@KarimHamdallah-gc2el
@KarimHamdallah-gc2el 5 ай бұрын
amazing work, hope you get into material system with pbr and model loading
@grand1415
@grand1415 5 ай бұрын
Insanely underrated channel, you are the goat o7
@SillyOrb
@SillyOrb 5 ай бұрын
5:10 Uh-oh. Is anybody going to point out that world and universe are the same? World is often used to mean planet Earth, but it really means universe / cosmos. To be fair, the analogy still holds, if the "outer" universe is removed, due to e.g. the many-worlds-interpretation of quantum mechanics providing a linguistic precedent and concept. What is beyond the world / universe / cosmos? We don't know. You do you though, this has no bearing on what you call the concepts in your code. (Please use parent & child instead of father & child, which Unity does. 🤦) My irrelevant nitpicking aside, these videos are both very entertaining and quite informative. I am very partial to the presentation and the overall perspective. It is good to have the option to use bson, which is simply binary json (that Cereal apparently supports, as per the video). Especially for files, that don't absolutely must be text. Many people prefer text files for development data and binary files for final data, as the latter is more compact and faster to parse on top of that, but the former can be trivially inspected, fixed and merged.
@Code_Gains
@Code_Gains 5 ай бұрын
Didn't think about that, indeed, it might make sense to re-name Universe into a World Manager, or just come up with a different naming scheme entirely. The thoughts on using text for development and binary for production makes sense to me especially considering that multiple people might work on a single project. Thank you for the support.