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
1answer
72 views

Multiplayer oriented game engine object (C++)

for a personal project i started making a 2d game engine in C++ that uses sfml. The idea is having base "game object" classes from which a game will inherit. Right now i have: Game_engine class ...
0
votes
1answer
134 views

Why separate data from logic?

I don't understand the purpose of separate SystemClass for functions. My composition looks like this: ...
0
votes
2answers
70 views

How to load assets into the game engine editor fast?

I am making a game engine with C++ and OpenGL. Currently I'm stuck making the asset explorer. I would like to be able to import assets into an engine project and then when I open the project just use ...
0
votes
2answers
91 views

How can I implement versioning into a save system?

I currently have a crude save system in my game. When my game is first launched after download, it checks for three directories in a certain location on the client computer, ...
0
votes
1answer
166 views

Do I need a rendering system in my engine?

I am planning to create a cRPG game engine that would allow to easily create games like Baldur's Gate. I already tried to do that once, but my knowledge was vastly insufficient at the time. I settled ...
0
votes
1answer
48 views

How do I keep historical variable value tied to certain period of time?

I'm currently trying to figure out how I can keep ever-changing variable values and make it available for other classes to access the said variables. In my example, I have the following: ...
-2
votes
0answers
22 views

Controller Input/Output

Can a game cause controller problems? For example: the analogue sticks output is as though the character is moving, but without any input from the user, and it has been confirmed that it is not a ...
0
votes
1answer
123 views

How does a game like Minecraft handle block and entity updates?

I am not asking how Minecraft loads chunks or generates chunks, I am asking about individual blocks and entities and their behaviours. Suppose you have a dirt block: dirt block can be converted to a ...
1
vote
0answers
88 views

How to set up an architecture and a strategy allowing the persistence of the data of a MUD in a relational database?

How to set up an architecture and a strategy allowing the persistence of the data of a MUD in a relational database? Type of game: My question relates to the design of a Multi User Dungeon (MUD). ...
0
votes
1answer
133 views

stats or profit give away result of game

Think of a coinflip game, whose logic looks as follows: Server sends websocket message (RESULT_MESSAGE) to frontend with result of a game (won/lost) Server sends websocket message to frontend with ...
1
vote
1answer
79 views

Dynamic Game Server Architecture

I'm trying to find a way to design a game server architecture for a real time mobile game. The design should be cost effective but still to some extend scaleable (later on). Mobile client flow: ...
1
vote
3answers
241 views

Is it possible to avoid global data in a Multi User Dungeon (MUD)?

I am currently designing a Multi User Dungeon (MUD). For those who do not know what it is, they are the ancestors of MMORPGs. There is no graphics, everything is played in a console by typing commands....
6
votes
2answers
655 views

Architecture of networked game engine

So after working on my game engine for 2 years, I've decided to step into the networking environment. I just don't know if it's a good idea to rewrite the engine, or how much work it will take (but ...
0
votes
1answer
54 views

Synchronize points from UI and server

I am sorry in advance if it's not perfectly clear. I would like to make a game with let's say the following map (in real it will be a 3D globe). Now this map contain point, and each point is a place ...
0
votes
1answer
65 views

Possible patterns for Registering event listeners of game entities with an event queue

I'm trying to integrate the idea of an event queue with a game loop that creates entities and responds to input. Is it better practice to submit entity reaction functions to the queue during input ...
0
votes
0answers
25 views

Unity Client and Multiplayer Networking/Architecture

My background is in Enterprise and SaaS web infrastructure. Zero information about games and how their networking works. I only know about the world of browsers and RESTful APIs. I'm planning on ...
3
votes
1answer
204 views

Handling input in a custom ECS engine

I've been implementing an Entity Component System into my custom toy engine so I can learn more about it. Currently I have the following problem: I can't think of a way of implementing input as a ...
0
votes
1answer
75 views

What engine is used in an introductory game-development course? [closed]

I am preparing a course in game-development. It is a choice-coures for 3rd-year students of computer science, who have working knowledge of several programming languages (C, C++, Java), algorithms, ...
2
votes
1answer
98 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
vote
1answer
74 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
97 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
22 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
269 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
166 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
47 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
59 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
23 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
149 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
72 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
101 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
73 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
122 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
86 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
109 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
99 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
115 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
82 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
88 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
117 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
86 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
55 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
70 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
165 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
29 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
127 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
47 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 ...