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
2answers
121 views

Project organization for a multiplayer client-server game

I'm programming a game 100% in Java but I'm having some issues concerning the final games architecture. I plan on having two separate projects: one that will hold the client side of communication ...
1
vote
1answer
86 views

Why would a game engine developer use both DirectX and OpenGL?

It's very common for cross-platform game engines to support both DirectX and OpenGL, and even Vulkan. Why would a studio want to write abstraction code 2, 3, or even 4 times? OpenGL/Vulkan are ...
0
votes
2answers
40 views

How can I evaluate varying conditions in a Scriptable Object?

I'm new to using Scriptable Objects, so this might just be a bit of confusion. Let's say we have a Scriptable Object that defines the abilities a character might have in the game, and a character ...
0
votes
1answer
59 views

How to manage complex mesh importing in to a game engine

A bit of context: I'm developing a 3D rendering engine and can't really make much more progress until I get some more interesting and complex meshes loaded in to the scene. So far I have been using ...
1
vote
0answers
127 views

How can I approach writing a GUI framework for my game? [closed]

The problem I want to write a simple GUI framework designed for a game, in order to learn the inner workings and nitty-gritty of how GUI 'engines' such as Unity3D's GUI work. I can't find any ...
0
votes
0answers
88 views

Where to create the vertex buffers?

Please note that this is purely an architectural/design question. And sorry for the long post, there are a lot of "thinking out loud" here. I'm working on a simple graphics engine (as a universtiy ...
1
vote
1answer
113 views

Game Metrics for Achievements

So I posted not too long ago looking for an alternative system to what I'm using for game metrics, meaning information I post each update when something specific happens (enemy damaged, killed, a wave ...
0
votes
1answer
112 views

Too many objects to update in db too often

We are creating a RTS mobile game and we face some problem dealing with updating a lot of object in db too often. Our game is a RTS in which players can attack enemies cities an take them. The world ...
1
vote
1answer
109 views

Handling localization strings in a performant game engine c++

I'm wondering what's the approach for handling localization in a modern game engine. Typically I'd reference a string that would serve as a tag (say: AURA_POISON_CLOUD) in the code and then later in ...
1
vote
4answers
116 views

Operating Expenses of Mathmetic Operations

I understand that math operations require more resources/take longer than others when being computed. (e.g. square roots take longer than divisions which takes longer than multiplications which takes ...
0
votes
0answers
94 views

Array-Backed Entity Component System with Component Polymorphism

I'm tinkering with an array-backed ECS in C++ along the lines of EnTT. Components are stored in a struct-of-array fashion where each component type lives in its own homogeneous contiguous memory block....
1
vote
1answer
94 views

What's the generally accepted way to coordinate game events between objects?

I'm a newbie when it comes to game development and I'm struggling to decide on a good and consistent architecture for having child game objects trigger actions at a higher parent level. For instance, ...
4
votes
2answers
120 views

endless Thorn (deal damage when taking damage) effect

I'm developing a card-based combat system for my game. (imagine a game like Magic The Gathering, or Hearthstone, or any CCG) I was writing the logic of the effect that I call "thorn". If a player has ...
1
vote
0answers
102 views

Understanding UE4 OpenGL contexts

Recently, I was browsing the UE4 source code. I was especially interested in the OpenGL implementation on Windows. The OpenGL "Dynamic RHI" (as they call it) implementation can be found in the ...
1
vote
1answer
67 views

Composing Game Metrics

So I'm running into a bit of a roadblock with the way I'm currently keeping track of game metrics. By "metrics", I mean little bits of information that I can compose together to get useful information ...
0
votes
0answers
57 views

How to implement a “Parent Constraint” in a custom 2D rigid body physics engine

So I am trying to write my own physics engine, with a specific game in mind, these are some design considerations: the game is about spaceships, the players build their own ships and find others in ...
3
votes
1answer
71 views

How to access internal data from separated rendering-layer?

I am currently rewriting a project I have been working on last year and I’m utterly stuck trying to "correctly" separate the game-logic from its representation. I know why this is beneficial and I ...
1
vote
0answers
205 views

Game Engine Class and Subsystem Architecture

I have a quick question for those who have experience coding their game engine and such. I was wondering what a better approach would be when designing my own game engine. Right now I plan on having ...
0
votes
0answers
30 views

Render and Update in Robotlegs Like Archtecture

I'm developing a small Snake game using a custom engine and trying to apply Robotlegs-like MVC-S architecture with Commands, Events as well. Currently I put some commands for collision checks, bounds ...
0
votes
1answer
144 views

How to keep consistent between image quality, device range support and final size of the game?

I am developing a game with the LibGdx framework, but I would like to discuss a more theoretical question. Criteria: I want to support as many devices as possible for my game (phones and tablets) I ...
5
votes
0answers
53 views

Slot Probability Function

Please can someone point me in the right direction. I'm working on a slot game. that I'm having trouble figuring how to implement the probability function for. The game has a set of symbols that bets ...
1
vote
2answers
164 views

What strategies and patterns exist to handle large amounts of game entities?

I've been wondering this for some time now: Let's say you have a builder game like Anno and let's say you're in the very late game. You have literally thousands of production facilities placed. Each ...
0
votes
0answers
26 views

Audio architecture in Unity: a time vs space paradox

Assuming we have a well imported audio clips setup. For audio clips that are quite similar and just vary by some slight differences on the shape, would you rather have them as separate files (Space: ...
1
vote
1answer
76 views

Can I have a scene graph translation node with multiple parent nodes?

I am trying to write a C++ scene graph structure. While designing the node classes I am facing the below issue. I have a scene graph to represent a house. I would like to have another house next to ...
0
votes
1answer
88 views

Should I throw out game heavily using OpenGL 2.0 and rewrite it from scratch?

I've picked up one old open source game (done with C++/Lua) with a lot of features and chosen to continue its development. It use SDL2 (ported by me from 1.2) and OpenGL 2.0. Now when I look at futher ...
0
votes
0answers
57 views

Quadtree having ownership of entities, worth it?

Typically, you would have a list of entities stored somewhere, and you'd use quadtree when you need some collision testing between entities for example, by inserting all of the entities and generating ...
1
vote
2answers
99 views

How do you make sure that a component can be applied to very different entities?

I know there's lots of posts about this sort of thing, and I've read a lot of them, but there's some gaps that I can't seem to fill in my head. Specifically, I've been reading about the SOLID ...
3
votes
2answers
295 views

How to avoid lots of booleans

This was probably asked somewhere but I can't google anything for some reason. So I'm making a puzzle game as a result I have lots of booleans which affect the game only once and become redundant. As ...
0
votes
1answer
58 views

Where to keep game images

I am new to gamedev, and I have one question about architecture. Where to locate game images? Should I keep this in the class object or in the main function and draw it depending on object variables?
0
votes
2answers
96 views

Read function outside of code while run-time?

Hi it is my first post on this community. So if i was rude or something please let me know :) So I just started learning game development alone. It's been about 1 year since I begin to learn c and c++...
1
vote
1answer
81 views

Is it a good or bad thing to allow hot-loading of changes of game rules without official updates and restarts of server and clients? [closed]

I’m working on such feature for my project that we allow the game designer to tweak game rules, from small things like item prices to bigger like probability for different randomizations, while the ...
1
vote
0answers
82 views

Is there an accepted architecture for these classes? [closed]

I am coding a game in python and so far so good, but I feel like my classes are not very modular. This is a simplification of what I've done: ...
5
votes
2answers
941 views

Need help deciding on an ability system in Unity

I'm making an RPG and got to the point where I want a player to be able to use abilities. I decided to use a command pattern to keep keybindings flexible and now I've arrived with the following ...
2
votes
1answer
721 views

Turn Based Game - Best approach for Server communication. TCP/IP or REST API?

I want to create a turn base multiplayer game where each player simultaneously takes his/her actions, and ends the turn. Both will see what the other player did afterwards and the next round begins. ...
7
votes
1answer
11k views

How can I make 3D games in 4K that are a few megabytes?

I would like to make 3D games in 4K that are a few Megabytes (MB) in download size. Is there a way to use 3D Vector Graphics in games to reduce the file size ? Or is there any other way to achieve ...
0
votes
2answers
93 views

Replacing harcoded strings used internally to locate stuff

The fields: (example) ...
1
vote
1answer
170 views

Text Adventure - Engine actions based on dialogues

Building forward my text adventure i stumbled upon how to actually drive the actions that can be caused by dialogs. I wrote the dialogues and the logic around handling them already, but i'm missing a ...
-2
votes
1answer
73 views

What happens when a game is burned to a CD?

What is happening behind the scenes when you take a code base and "burn" it to a CD be read by a game console?
0
votes
1answer
42 views

How do I move many “static relative to each other” objects around?

I'm currently building an Elevator Bank simulator in Unity3d and I'm stuck on how to reduce the amount of objects it's going to generate when it's done. The simulator will consist of one player (for ...
1
vote
1answer
98 views

Decoupling Input from Update/Physics Movement in a Game Engine

I have some troubles figuring out how to decouple the input handling from the physics part (includes movement). My Game loop looks like this ...
1
vote
0answers
21 views

Handling game message packet loss at low speed and at a microcontroller level

I read this: How do I handle packet loss in a client-server network model? ...But I'm looking for more advice. Currently I'm implementing my own lazertag vests. I'm programming hardware (8051 ...
6
votes
2answers
248 views

Which fixed framerate should i choose for physics thread?

I am writing first-person shooter game with fast motion. I have a fixed high-frequency physics loop thread, which is separated from variable-frequency rendering thread. I need to choose the physics ...
1
vote
2answers
328 views

Event queue: tell or ask?

I'm working my way through a lot of game development resources, coming from a completely different field of software development, I'm interested in learning what patterns are frequently used in game ...
1
vote
1answer
101 views

Authorization in scaling multiplayer game

I have an architectural problem associated with authorization. I'm making an MMORPG multiplayer mobile game without separation onto different servers. What I mean by that is that a player from USA ...
1
vote
1answer
184 views

Separating game logic and rendering logic in separate static libraries

I'm trying to write a game in C++ using OpenGL. I've tried to separate my game logic and my rendering logic as much as possible, and up until now, this has worked for me. I haven't written a lot of ...
0
votes
1answer
267 views

How to Design a Generic Collision Detection System?

I'm designing a C++ 2D collision module, and I ran into a problem designing a system where the collider is unaware of the shape it's colliding against. I'd like to have a abstract base class called ...
1
vote
1answer
35 views

Tiledata management

I've been trying to create a grid-based open world game. In order to do that I've decided to create a personal map editor. The problem I've encountered is handling data because of the actual data size....
3
votes
2answers
63 views

Solutions for maintaining importers and exporters when chaning file formats

After having a very short discussion with Delix on youtube (see link below) on custom data storage formats, I started thinking. What are some useful ways of maintaining importers / exporters when you ...
1
vote
1answer
67 views

How to organize passing data to shaders in cross-API render system?

I try to create rendering system that supports DirectX and OpenGL. I am trying to create class for constant buffer, but DirectX constant buffers and OpenGL uniform buffers have different memory ...
0
votes
2answers
482 views

How to implement ECS in a videogame with C++?

What do I need to know in order to implement ECS in a video game? I'm developing a video game and so far I wasn't using any complete architecture, I was just using inheritance but I don't like it ...