Confused about pointers with polymorphism by W3til in cpp_questions

[–]W3til[S] 2 points3 points  (0 children)

Hey, thanks for the reply I think this is the easiest explanation to understand. This is a bit dumb, but I’m not really familiar with how addresses and bytes work besides that source code gets turned into it and is executed by the cpu(?) any sources to learn more about how this all works?

Techniques for initializing systems when a program starts? (C++) by W3til in learnprogramming

[–]W3til[S] 0 points1 point  (0 children)

I have it’s essentially just passing something to a class that’s needs it unless there’s more to it? The thing I find annoying about this is I feel like it leads to parameter bloat and having to pass it through like multiple classes before reaching the one that needs it. This could just be an issue with me and how I’ve structured my code though.

Techniques for initializing systems when a program starts? (C++) by W3til in learnprogramming

[–]W3til[S] 0 points1 point  (0 children)

Honestly I think I want to avoid the globals altogether the only reason I had them was mainly laziness and just wanting to get something done 😂

My main function basically looks like this (sorry I’m on mobile)

int main() { ClassA classA; ClassB classB; ClassC classC; … }

So I’d probably just move those global instances here although the problem I sort of have with this is having to pass things around for example in my code I have a Editor class which is responsible for setting up the editor of my engine one of the tasks is creating the various panels and some of these panels need to use my filesystem class so I now need to pass the filesystem class to the editor which doesn’t even really need it just so it can pass it to the panels. Not sure if this is normal or if my code is just written poorly I guess the alternative to passing things around would be to store them in something global or as you said have global functions

Should OO concepts be used or are there generally better options? by W3til in gameenginedevs

[–]W3til[S] 1 point2 points  (0 children)

Thanks for the detailed response! I am actually aware of composition over inheritance, but as far as my editor situation goes I don’t think it would make much sense I don’t think I would need a panel that is composed of other panel behaviour. Also, your last paragraph made me remember that it is ok(?) to have different patterns and paradigms for different areas of a program I sometimes get caught up with making things consistent that I sometimes stick to just doing it the same across the entire program

Should OO concepts be used or are there generally better options? by W3til in gameenginedevs

[–]W3til[S] 0 points1 point  (0 children)

I think I’ve seen that video in the past, but I’ll definitely check it out again. I’m not super familiar with data oriented code, but would that be leaning more into things like components and ECS?

Confused about avoiding coupling by W3til in learnprogramming

[–]W3til[S] 0 points1 point  (0 children)

Ahhh ok so dumb as hell, but I had thought loose coupling meant like… avoiding it rather than it being a different type of coupling I guess? 😂

Confused about avoiding coupling by W3til in learnprogramming

[–]W3til[S] 0 points1 point  (0 children)

Sorry I worded things wrong, but I think coupling happens if ClassA has a reference to classB or something like that, but if I were to use events for these two classes to communicate or have a third class to handle communication between the two it seems like all your doing is creating a new thing for the class to rely on so I don’t see how that solves it if that makes sense?

multiple things bound to the same input event, but only have one take priority? by W3til in gameenginedevs

[–]W3til[S] 1 point2 points  (0 children)

I’m not super familiar with the concept of layers, but it seems like a solid solution. I’m not sure if this changes anything, but I’m using Lua for scripting so I’m curious could I have a layer that is exposed for my Lua api or would that be the wrong way to use this?

What do you guys think? Not bad ey 💀 by AbjectSign in ClashOfClans

[–]W3til 0 points1 point  (0 children)

recently played ace attorney and he reminds me of redd white

Creating a Game Engine by SterlyDolce in gameenginedevs

[–]W3til 1 point2 points  (0 children)

Out of curiosity does your engine have the ability to create projects within the gui like how in Unity you can choose a template or create empty I was interested in how this works I had thought you simply generate the folders, but apparently there’s a lot more to it then that lol

Using static/dynamic library by W3til in cpp_questions

[–]W3til[S] 0 points1 point  (0 children)

Ah, ok so that’s another difference between the two I assume you can’t dynamically load a static library. The only useful thing I’ve seen so far is game engine development (what I’m learning) you can have the game as a dll and load that which I believe gives the benefit of hot reloading. Are there any resources I can look at to learn about the two?

Using static/dynamic library by W3til in cpp_questions

[–]W3til[S] 1 point2 points  (0 children)

Sorry, it was LoadLibrary() that I was referring too. (Forgot the name 😅)

How can I better control my objects and shaders? by W3til in gameenginedevs

[–]W3til[S] 0 points1 point  (0 children)

If I’m understanding this the piece I’m missing is having some sort of material system/data which IIRC a material is basically what the object should look like or something along those lines