Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [architecture]

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

1
vote
1answer
46 views

Should the lobby and game room be database tables or arrays?

I'm designing a lobby which holds all game rooms If a room is empty, it gets deleted by the lobby If a room is full, a new room is created For now the lobby is an array of objects on a websockets ...
-1
votes
0answers
22 views

Putting scripts togther

I am trying to replace the exe file UCI connection in Unity from this file ...
1
vote
1answer
31 views

How to make rhythm game long notes in Unity?

I'm making a rhythm game for a university course and I can't figure out a way to make the long/sustained notes. For reference, this is what I mean taken from Guitar Hero: I already have a system ...
1
vote
2answers
74 views

How do the systems find the entities they should operate on in Entity-Component-System pattern?

I have read many articles about ECS patterns. Many of them are clear on what the entity and components are but don't really talk about the system because it "varies" or just use plain English to ...
0
votes
0answers
19 views

How to code a lot of cards in a trading card game java [duplicate]

I want to make a trading card game like Yu-Gi-Oh or Magic. I have a lot of cards in my game and even the user can make new cards. Cards are objects and they have attributes like HP and Mana ,etc but ...
6
votes
3answers
236 views

How to store relations between NPCs?

For an RPG I want to generate a world with lots of NPCs, and the NPCs all have relations to eachother. They can be eachothers parents, children, siblings, friends, bosses, lovers, lieges, vassals, etc....
1
vote
0answers
123 views

Modern OpenGL, 2D only, should I be using uniforms or VBOs for sprite transformation?

I'm new to OpenGL, I'm currently building a 2D game engine. Right now I'm only using one shader as I only draw textured quads (basically sprites). The thing is... I don't know if should I be using ...
0
votes
1answer
43 views

Dividing Data and Logic in Unity

I am currently working on a small side project (as usual), and trying to build up from previous experiences. I have the following elements in the game: 1) Region: ...
-1
votes
2answers
56 views

Does game client size always grow in size after updates? [closed]

Games that are updated in course of their lifetime (through online updates), grow in size and I can understand that new textures, sounds and other stuff takes up space. What I'm interested in is - ...
0
votes
1answer
22 views

Uninitialized Variables with Deactivation of Objects in Game Maker Studio 2

I am currently working on some map generation for my GMS2 game, and I have run into an issue that I absolutely cannot figure out. (I am very new to GMS2, so bear with me). I am working on map ...
1
vote
2answers
96 views

How can I handle scripting-like tasks in my ECS?

So I have been getting more and more into ECS architecture, and I am having a bit of trouble wrapping my head around how to handle custom actions/callbacks. For instance, let’s say I want to have a ...
1
vote
1answer
64 views

What are some gameplay cases where knowing the Z as a result of the raycasting is useful in a 2D setting?

The context is an 3D engine with a 2.5D level format. Like a roller coaster tycoon level, with some other level features added, and layers removed. For example the tile functions have the following ...
0
votes
2answers
79 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
62 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
34 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
53 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
107 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
80 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
102 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
106 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
85 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
113 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
69 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
73 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
112 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 ...
0
votes
0answers
60 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
63 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
44 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
68 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
107 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
28 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
106 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 ...
4
votes
0answers
46 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
155 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
46 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
79 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
51 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
85 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
284 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
55 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
95 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
77 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
78 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
806 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 ...
1
vote
1answer
450 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. ...
6
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
91 views
1
vote
1answer
140 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
68 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?