Questions tagged [architecture]

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

Filter by
Sorted by
Tagged with
3 votes
2 answers
1k 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
  • 43
0 votes
1 answer
60 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
81 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
  • 43
0 votes
2 answers
62 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
58 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
35 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
109 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
24 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
63 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
380 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
85 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
97 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
31 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
9 votes
3 answers
2k 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
  • 433
3 votes
2 answers
1k 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
284 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
  • 947
0 votes
0 answers
68 views

How to organize widgets in Unreal Engine for multiplayer

I am a beginner UI programmer working with UMG. My question: are there ways to organize widgets other than, you know, the master widget that holds the rest of the widgets? WBP_Master -> (...
anime username's user avatar
1 vote
1 answer
337 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
62 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
113 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
202 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
229 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,356
0 votes
1 answer
117 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
  • 191
0 votes
2 answers
77 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
93 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
  • 4,961
0 votes
2 answers
257 views

Initializing Monobehaviour in Unity

I have three scritps and one plain C# class. EnemyMonobehaviour, EnemyAttackMonobehaviour and UnitState plain class. In enemyMono I have Initialize function that initializes unitState. ...
Taras Fityo's user avatar
0 votes
1 answer
128 views

Software architecture advice for a Sokoban clone

I'm building a Sokoban clone, and I would like to try to get the architecture right for future extensions. Sokoban is a simple game, where the player has to move boxes around a grid and place them in ...
ArenaLor's user avatar
  • 103
2 votes
0 answers
153 views

Application of modified MVVM paradigm

Let's assume a game development company uses a modified version of the MVVM paradigm that includes the notion of a Manager which handles manipulation of the Model. So, the idea is View - all frontend ...
DyingIsFun's user avatar
  • 1,307
0 votes
1 answer
133 views

Why do modern games take so long to reset the current level after failing?

While recently playing a game I kept failing at, I realized that I don't fully understand why I need to wait for the level to reset at all. Taking time to load a new level makes sense to me - assets ...
d33tah's user avatar
  • 125
3 votes
1 answer
580 views

Characters ai code organization

I want to create a an ai with finely customizable character. The ai should be able to handle generic behaviors, like scheduled activity, shared across all character, but have specific override for ...
user29244's user avatar
  • 327
3 votes
1 answer
1k views

Are Yields a Bad Code Practice in GDScript?

I understand that the title is a bit vague, but I'd like to get a better sense of where it is appropriate to use yield(). Up until recently I wasn't even aware of yield(), but now that I know it ...
dahrasz's user avatar
  • 65
0 votes
2 answers
98 views

Should dealing damage and healing be the same function called change hp or should they be sepparated into the functions of their own?

I'm making a simple game with sliders, where there is a damage over time function, the main focus of the player is to upkeep the player health as long as possible by clicking corresponding buttons. My ...
koogel's user avatar
  • 79
3 votes
1 answer
107 views

How do I design a "Chores" or "Errands" system?

I have a number of entities running around in my game, and I am running into a headache trying to design and implement a system for them to both generate and assign the tasks. More than anything else, ...
Raven Dreamer's user avatar
1 vote
1 answer
445 views

Is it possible to keep a prefab of a UI element with UI Toolkit?

I'm digging into Unity's new UI Toolkit, and so far I like it a lot; but there are a few things bugging me about it. I have a dynamic list in my UI which keeps track of way point paths, and it changes ...
Michael Macha's user avatar
0 votes
0 answers
264 views

Message pump and D3D11 DXGI in separate threads

I have read: https://learn.microsoft.com/en-us/windows/win32/direct3darticles/dxgi-best-practices#multithreading-and-dxgi https://learn.microsoft.com/en-us/windows/win32/direct3ddxgi/d3d10-graphics-...
Peter's user avatar
  • 1
0 votes
1 answer
219 views

How would you implement card effects in a card game?

I'm making a card game right now and I am hesitating in how to design my cards. Let me explain I have a card that draws two cards from the deck when played. The way I'd code it is I'll create a class ...
younes alaoui's user avatar
2 votes
1 answer
377 views

Decoupling Components

I am working on my first Tower Defense game and I got stuck with architecture. I found some past Q&A "Should the entity handle his own movement?", read about Entity Component approach, ...
Taras Fityo's user avatar
0 votes
0 answers
70 views

What class should access my database?

I would like to code a turn-based RPG, and I decided to use a database to store all skills in the game. Now I have to decide as well which class can see this database, and how classes pass around ...
user avatar
2 votes
6 answers
203 views

Modelling Two Way Relationship in Unity for Scriptable Objects

How does one model two-way relationships for scriptable objects? Let's say we have a number of items in-game, and each item can be obtained by different conditions. Some may require you to complete a ...
qris's user avatar
  • 53
1 vote
2 answers
261 views

Having one giant level instead of several levels separated by a loading screen

I'm making a metroidvania game. For what it's worth, I'm using Godot as the game engine, but I think my question applies for any engine. If you look back at old games such as Super Metroid on SNES, ...
Eldy's user avatar
  • 793
0 votes
0 answers
144 views

How do buildings in (Tile based) city builders/colony sims keep track of each other? [duplicate]

Like, how does a building in these games know if they're being powered? Or if they're within range of influence of a hospital or fire station, etc. How would they know where to send an NPC or ...
Sir Gaelence's user avatar
2 votes
1 answer
1k views

How to design an upgradeable skill system?

In my game skills can be leveled up to modify base stats like reducing cooldown by 20% and increasing fired projectile count by one. How would I architect the system so that each skill has its own ...
gamer1's user avatar
  • 65
1 vote
1 answer
415 views

Implementing ability system with ability parameters

I am trying to implement an ability system in Unity for a game similar to XCOM (turn based, team consists multiple of units, grid based). Every unit have X action points per turn. I would like to do ...
Kostej's user avatar
  • 33
3 votes
1 answer
158 views

Handling infinite combos

I'm working on a game where entities can be affected by 'statuses' that can have an effect in response to any entity event (lost_life, turn_began...). I'm searching for good ways of handling this kind ...
Alikae's user avatar
  • 31
1 vote
1 answer
62 views

How should I share the states amongst all the executions of a Behaviour Tree triggered from all ticks?

I'm still learning about Behaviour Trees and my understanding of the "blackboard" is essentially a state object. When passing the state object through the ticks to the function calls (which ...
xenon's user avatar
  • 427
1 vote
0 answers
49 views

Is it worth creating engines for simple projects? [closed]

I know, this question has already been answered in several places on the internet and the answer is NO. But there are some points, I probably don't have the experience of half of you but I love C++ ...
Samuel Ives's user avatar
0 votes
3 answers
226 views

How to prevent a huge backlog of physics calculations from freezing browser when tabbing out of browser game?

I'm developing a browser game and am using the timestep implementation from the famous Fix your timestep! article. It works perfectly, but there is one problem. If you tab out of the tab and then come ...
Ryan Peschel's user avatar
3 votes
1 answer
291 views

Trunk Based Development: Prevent unreleased assets and features from being included in the build

Our team is currently working on a live service game (A game that will be updated regularly post-launch) and is using a trunk-based development strategy. The trunk-based development strategy is great. ...
qris's user avatar
  • 53

1
2 3 4 5
28