Skip to main content

Questions tagged [architecture]

How code is structured. For questions on the internal design of a game engine.

Filter by
Sorted by
Tagged with
0 votes
0 answers
37 views

How would I organize my game entities and scenes? [closed]

I'll be generalizing this for the purpose of others being able to find this and use this. I have lots of entities in my game, I have a few screens I'd like to show to the user. The screens are: Menu ...
LTecher's user avatar
0 votes
0 answers
24 views

Problems with compiling with llvm and gcc, while trying to link external libraries to EngineCore.lib and finally linking core to EngineEditor.exe

Help me I Cherno's followed game engine series and branched to add 3D capabilities. I am having issues while linking libraries, at first I just wanted to share Game Engine code with friends, but not ...
Vxxssv's user avatar
  • 1
0 votes
0 answers
30 views

How to Prevent Subsystems from Responding to Events from Other Game States

I'm writing a game from scratch in C++, using the book Game Coding Complete as a guide. The engine in the book has an event manager which is used to communicate between the game's systems, such as ...
Vitamin C Plus Plus's user avatar
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
56 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
91 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
0 answers
110 views

What do you do with SDL2 events?

I have the typical/basic event loop for SDL2 and I'm a little confused on what to do with them or how to handle them or I guess more specifically how should I get the data from these events (e.g ...
Konjointed's user avatar
0 votes
2 answers
623 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
0 votes
0 answers
31 views

How to make an authoritative server initialize 3 cards once 2 "Clients" join

I somewhat understand [Command], [ClientRpc], and [TargetRpc]. However, I am currently struggling to determine how to get my SetupInitialHand() method to run. When called from the same area that ...
SmileyTheMimic's user avatar
1 vote
0 answers
63 views

How to avoid/reduce code duplication in asset loading/caching with templates?

I'm working on an asset manager for my game engine, and I'm a bit stumped on how to use templates (and potentially inheritance) to reduce some code duplication. An asset requires 4 things: a container,...
Konjointed's user avatar
0 votes
0 answers
58 views

C++ how to load different assets within an asset manager?

I'm in the process of redoing my asset/resource manager currently I have load functions scattered throughout my code for example LoadMeshFromFile(), LoadTextureFromFile(), LoadShaderFromFile(), etc, ...
Konjointed'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
0 votes
1 answer
45 views

Broken graphics in a compiled Android application

Why is it that when I compile this application in Unity for Android, the graphics completely break (camera image output). Maybe I need to set something special in the Player settings? I'm using the ...
Stiven's user avatar
  • 11
0 votes
1 answer
101 views

Sanity Check on my Idea for an Event System for game

So, I recently started making a small game from scratch, with no engine used(I'm a beginner at this) and I want to create an event system of my own. I want to check if my general idea for it is okay(...
HavocKid's user avatar
0 votes
3 answers
139 views

Is there any reason not to use classes in C++?

I'm a bit conflicted when it comes to the use of classes currently, I use them all the time, but I realized through the KISS and YAGNI principles I can simplify things by not using them, but is there ...
Konjointed's user avatar
2 votes
1 answer
157 views

Programming Singletons vs Static classes

I've been developping a 3D app for some time and I remember at some point I started to need to pass data arround in unrelated areas of the program, where it wouldn't make much sense to pass them ...
Gyoo's user avatar
  • 286
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
1 answer
145 views

How to go about executing lua scripts in a ECS engine?

I'm trying to add scripting with lua to my C++ game engine, and I'm pretty stumped on how to tackle the executing/processing part. I started by creating a ...
Konjointed's user avatar
0 votes
0 answers
124 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
1 answer
59 views

How to structure this concept in ECS?

High level At a high level, I'm looking to create a galaxy exploration-style game. A number of points of interest will be selectable on the map (I'd like to aim for several hundred, but flexible and ...
Basic's user avatar
  • 1,228
2 votes
0 answers
54 views

How does non ECS parts work with ECS parts?

I incorporated ECS to my graphics engine and I have a problem with my Renderer needing the camera which is an entity and the process is a bit bizarre. Originally, I ...
Konjointed's user avatar
1 vote
1 answer
131 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
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
1 answer
209 views

How to use handles for asset management?

The way I've learned to implement an asset manager is having unordered maps for each asset type (textures, shaders, meshes, etc.), each with a string key and object value and then having methods ...
Konjointed's user avatar
3 votes
2 answers
2k views

In an object-oriented game engine, should there be seperate classes for objects with and without parents?

I am developing a game engine in C++ (for an idea of what kind of design I'm going for, think of ROBLOX, if you're familiar with that) and I need help with a problem I have. So basically, the objects ...
AcinonX's user avatar
  • 321
0 votes
1 answer
274 views

Pygame code/file structure

I am currently working on a Pygame project and would like to seek your advice on best practices for organizing my code, particularly when it comes to creating additional scripts. I find myself ...
anathrax's user avatar
1 vote
0 answers
300 views

Why does ROBLOX use an object-oriented system rather than an entity component system? [closed]

I decided I would develop a game engine in c++, so I was thinking about different ways of handling objects. I also have experience with ROBLOX, so I know that it uses an object-oriented design as ...
AcinonX's user avatar
  • 321
0 votes
2 answers
71 views

Changing the type of an object in Unity

I'm new in coding from zero and I have some problems with architecture of classes (project mb?). I have empty room that I need to add “equipment” to it later (change the type of room). I already have ...
Макс Беляев's user avatar
1 vote
0 answers
74 views

2D grid game server - interaction system/dynamic blocks

I'm building a Server-side engine for 2D sandbox game similar to Terraria or Starbound. The language I use is Dart (similar to JavaScript or C#). Currently I'm trying to figure out how to make a good ...
Zekfad's user avatar
  • 11
0 votes
0 answers
74 views

How can I display properties/attributes of an object in an editor?

I'm learning how to make a game engine using SDL and OpenGL and I'm using imgui for the engine editor UI and I'm trying to make a properties panel that displays the properties of the selected object. ...
Konjointed's user avatar
0 votes
1 answer
393 views

How to design an EventBus(guided by the pub/sub pattern)

I'm working on my game engine, and was faced with the fact, that i don't know how properly design an event system. As a pattern i choose Pub/Sub with an event bus, but i don't know where i should '...
qulop's user avatar
  • 3
0 votes
0 answers
25 views

Logging high-level game events to external consumer

Is there any existing technology/framework/standard for publishing high-level game events to a consumer? Example: Imagine a game which can publish events like change of level, player joined, player ...
occulus's user avatar
  • 101
0 votes
0 answers
73 views

Data driven battle logic

Concept I am designing turn-based boss battles and want each boss to have different behaviors and skills they perform during a battle. The boss is selected randomly and is identified by a unique ...
VoidTwo's user avatar
  • 103
3 votes
1 answer
520 views

How are character controllers built upon complex gameplay systems?

I would like some industry advice. I feel like the starting part to every game I create is the character controller. My goal is to create a solid base character controller that I can expand upon for ...
Jacob Edie's user avatar
1 vote
0 answers
160 views

Does anyone know any 'no-interface' game engines? [closed]

What I'm looking for: I've been searching for a while now for any no-interface game engines (What I mean by that Is something like the Source Engine where other than than the level editor It's nothing ...
Fichko's user avatar
  • 19
2 votes
1 answer
2k views

Who 'owns' the components in an ECS?

Currently looking and reading about entity component systems, and just wanted to ask about who 'owns' or where the components are registered. I would have thought that each entity has a collection of ...
Juzzbott's user avatar
  • 123
1 vote
1 answer
172 views

Creating a Renderer class using SFML

I currently have a Renderer class, which as in the example code, looks like this: ...
BOOM's user avatar
  • 11
0 votes
0 answers
43 views

Source of truth for raising events in an Event-driven architecture?

I am developing a turn-based strategy game and am using Events to implement a "Buff" / "Debuff" system. The code is very OOP-y right now, not very ECS. I am adding an event system ...
David Notrael's user avatar
10 votes
3 answers
4k views

What's the appropiate way to achieve composition in Godot?

How? I think I still don't properly understand how composition in Godot works. So, as far as I know, you 'compose' stuff in Godot, right? Like, if you want to make a rock you create a mesh node with ...
YoshGJ's user avatar
  • 505
3 votes
2 answers
2k views

What is the recommended way of storing large sets of organized, immutable data in Unity?

Since I'm making an RPG in Unity, I need a place to store all the possible moves/attacks in the game. These have the following properties: there will be a very large number of them, in the hundreds ...
Labba's user avatar
  • 133
8 votes
3 answers
505 views

Should game data be encoded in configuration files, given that it will almost always contain logic?

Question inspired by the accepted answer to another question: Wondering if there is a more efficient way to store level data in my game? The answer, by @Evorlor, says: You should have the data for ...
gaazkam's user avatar
  • 937
1 vote
1 answer
834 views

How to structure a dynamic turn based system?

I'm attempting to create a turn based battle system in Unity that is made up of dynamic events. Attacks may involve a lot of movement, animation, and often player input during the attack. The current ...
blue's user avatar
  • 13
1 vote
1 answer
64 views

Designing a system for delivery

I'm writing a game where deliveries are made to specific people. These people act in different ways depending on what the delivery is. At times one character might ask the player to make a delivery to ...
Sock's user avatar
  • 11
0 votes
0 answers
132 views

Good design for player input handling in 2d game

I am working on a java 2d game. Keeping things short, I'd like to improve my current input handling. Basically the player can move up/down/left/right with WASD, perform an attack with mouse left click ...
magister's user avatar
1 vote
1 answer
312 views

Factorio style conveyer belts, how to implement multiple speeds?

I've been reading this article by Factorio about optimisation (please read it to understand the context of this question): https://www.factorio.com/blog/post/fff-176 I have implemented this ...
WDUK's user avatar
  • 135
1 vote
1 answer
367 views

What kind/type was the 3D terrain editor of Warcraft 3's World Editor? How it worked? [closed]

Warcraft III (WC3) had a lovely map editor that allowed for a whole lot of stuff, yes (this was the best result I could squeeze out of Google), but what to me stood out the most and what I played with ...
tomsseisums's user avatar
  • 3,366
0 votes
1 answer
134 views

How do I implement data persistence?

I wonder how do I implement data persistence in 2d game. I am not using any engine, just pure Kotlin and OpenGL for rendering, so it is more of a software architecture question. The case: Character ...
Steyrix's user avatar
  • 225
0 votes
2 answers
85 views

Modeling a naturally circular relationship between three classes

I have three classes Location, Item, Character. Every ...
Michael Moreno's user avatar
1 vote
0 answers
204 views

Am I doing something wrong in my ECS architecture if I must choose between coupling or copying code?

I'm developing a somewhat simple, small roguelike game as my university project. Early into development I heard about Enity-Component-System and decided to go with that as my game's architecture. ...
aallfik11's user avatar
20 votes
2 answers
3k views

Development pattern for interactive in-game tutorials

Interactive in-game tutorials often interrupt game flow and override standard behavior in a way that can be difficult to implement cleanly. For example, imagine we have an action game and we want a ...
Kevin's user avatar
  • 6,484

1
2 3 4 5
29