Skip to main content

Questions tagged [design-patterns]

Design pattern is a general reusable solution to a commonly occurring problem within a given context in software design.

0 votes
0 answers
38 views

Command Pattern or/and Event Handling porgramming paradigm?

I have created a dynamic library that contains all the tools I want my game executable to have. Additionally, I want to create a world editor/tools for my engine to be more user-friendly. I'm ...
Benzait Sofiane's user avatar
0 votes
0 answers
57 views

SDL2 Events how to avoid monolithic control statement?

I'm using SDL2 in my game engine and I'm trying to figure out how I can prevent having a monolithic control statement like this: ...
Konjointed's user avatar
0 votes
1 answer
92 views

Singletons as presented in Game Engine Architecture by Jason Gregory

I am reading the amazing Game Engine Architecture 3rd edition by Jason Gregory, but I have trouble understanding the singleton part, more particularly the part dealing with subsystem start/shutdown... ...
Benzait Sofiane's user avatar
0 votes
2 answers
624 views

What’s the benefit of breaking code down into other classes? [closed]

Sorry if this isn’t the proper spot to ask, but something I struggle to wrap my head around is the benefit of breaking down code into smaller pieces on the surface it seems to make sense I think you ...
Konjointed's user avatar
2 votes
1 answer
86 views

Skill Class design : How to deal with multiple criteria

I'm planning to make a Class for RPG game's character skill. But the problem is that the skills need to be classified by multiple criteria. Below are the criteria for skills. Independent / dependent ...
evol1102's user avatar
1 vote
3 answers
117 views

Unity Game Architecture

I'm working on a relatively simple game, but even simple games have a lot of moving parts, and I'm running into some architecture issues. Just to be clear, everything works fine, but it feels dirty, ...
manwithcode's user avatar
2 votes
1 answer
362 views

What design pattern should I use for adding functionality

I am making a tile based roguelike game with different objects in the world, like Doors, Security Cameras, Storage Shelves. With that, there are objects that have an inventory, can detect the player, ...
RobinHood's user avatar
0 votes
0 answers
30 views

Workaround to bind templated functions to lua?

I'm trying to add Lua for scripting to my C++ game engine, which is based on ECS, and I have a rough idea of what I want to do (is it good? probably not) but trying to actually execute it has been ...
Konjointed's user avatar
0 votes
0 answers
130 views

How to implement events with ECS?

I'm transitioning over to an ECS architecture for a small C++ graphics engine I'm working on and I'm a bit stumped on how to tackle events. One solution I came across was from this Reddit post ...
Konjointed's user avatar
0 votes
2 answers
103 views

What happens with global/singleton objects when using ECS?

As I've been learning about ECS one thing that gets me confused are things like input which in my case has usually been some singleton that gets polled or in one project was event based where code can ...
Konjointed's user avatar
1 vote
1 answer
134 views

What is a "controller"?

I'm in the process of refactoring my camera code the goal is to try and simplify things using a struct instead of a class or at the very least try something new since I always jump straight to classes/...
Konjointed's user avatar
1 vote
0 answers
125 views

Good practices for making a manager class?

I found this post for designing a camera system the post mentions having a manager where you could register and set different cameras such as debug, player, script, etc and I kind of like this ...
Konjointed's user avatar
0 votes
0 answers
62 views

Architecture and design patterns for components

I was working on a physics-based plug-in/ extension for Unity water which would essentially be another component in Unity water. The goal of this extension would be to integrate interactive physics ...
Akshit Chaturvedi's user avatar
1 vote
0 answers
48 views

How could I build components for a composable loot system like one in RuneScape without using OOP?

I looked at some entity component systems, and noticed that they sometimes list static polymorphism as a feature, and ECSs and data oriented programming seem to be touted as holy grail of modern game ...
shinyoi's user avatar
  • 11
0 votes
1 answer
113 views

Implement Singleton that loads before Awake

I would have liked to comment on this answer, but I don't have enough reputation so I had to open this new one. The issue with it (and with the rest of the answers) is that it doesn't work well if ...
vandermies's user avatar

15 30 50 per page
1
2 3 4 5
23