Questions tagged [architecture]

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

Filter by
Sorted by
Tagged with
6
votes
2answers
255 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
351 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
104 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
186 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
280 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
36 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
499 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 ...
0
votes
1answer
41 views

C++: Setup the basic Update function in different classes which all derive from GameObject

Im working on a little game-framework in c++. Currently i have a (base)class called "GameObject" from which all future in-game objects will derive from. Class enemy will be ...
0
votes
1answer
229 views

How can I deploy and unreal engine windows exe build to the cloud?

I don’t have a coding background, so I am struggling with this. Someone will have to dumb down a lot of the language for me. I’m trying to deploy my unreal engine game to a cloud computing service ...
0
votes
5answers
349 views

Spell casting in a Turn based game

I'm trying to make a start on a Spell/Skill system similar to a Moba or MMO from my project where you would press the skill button and see what type of targeting it has then aim (either in an area or ...
1
vote
0answers
44 views

Server-side and client-side code management alongside API

Working on a new multiplayer game with an API, I'm struggling with code management and separating the client-side and server-side code. For context, I'm writing everything in C# (Monogame or OpenTK). ...
2
votes
1answer
73 views

Dynamic object creation from data

I want to write somewhat randomized object activation effects, like when you step on a trap, you can be tepelorted, damaged, cursed and so on. I applied strategy pattern for this: damage/healing ...
0
votes
0answers
40 views

Handling “nested” user actions in client/server card game

I'm developing a card game in JavaScript in a functional programming style and I'm unsure what is the best way to implement the flow of player actions that require other player actions for their ...
0
votes
1answer
489 views

C++ - How to create an engine editor without frameworks like qt and wxWidgets?

Basically sometimes I like to try to venture into the world of graphics computing, sometimes I have a project or another that uses opengl plus all the "blind" with opengl, I wanted to be able to ...
36
votes
8answers
14k views

Should I avoid using object inheritance as possible to develop a game?

I prefer OOP features when developing games with Unity. I usually create a base class (mostly abstracted) and use object inheritance to share the same functionality to the various other objects. ...
3
votes
1answer
385 views

Why is Game Logic so Decentralized

So I've dipped my toe in and out of game programming pretty regularly over the past few years and all of the tutorials I've watched and books I've read have all had one thing in common that perplexed ...
8
votes
3answers
959 views

Can a Game Engine be built into a Game Engine?

This confuses me as the title says "Mostly Civilized: A Hex-Based 4x Game Engine for Unity - Part 1" Unity is a Game Engine, and he is building a game engine for a game engine. Did he word this ...
1
vote
3answers
616 views

MySQL for MMO-Development… What do i have to consider ?

Im currently developing an little mmo. Its pretty basic, players can walk around... gather some resources... build some simple buildings and craft things. Before i began to develop i read a lot about ...
1
vote
2answers
285 views

Managing different types of Actors/Entities in a rendering engine

I'm coding a simple game engine using DirectX11, and I'm stuck on how to implement a kind of ECS. Now my rendering system look like this (sorry if the diagram is not real UML, it's just for ...
3
votes
4answers
531 views

Is it advisable to maintain a separation between the engine and the game?

As I'm reading Uncle Bob's Clean Architecture I keep wondering how all the advice presented can be applied in game development. Games are nothing more that highly interactive real-time simulations and ...
3
votes
2answers
588 views

Two Army Battle Simulator

I'm currently developing a small game project on unity (with purpose of learning C#) where each player controls a base and can build buildings, do research, build units, pretty much the basis. I ...
0
votes
1answer
84 views

How do I deal with closely coupled systems in a game engine?

Let's say a game engine had a central game class as well as multiple systems (as objects) that are stored within it. These systems (such as input, rendering, sound, etc) would also be updated by this ...
1
vote
1answer
175 views

Separate game engine from game

I'm building a simple game engine (or mostly rendering engine) and I would like to separate the "engine" part from the "game" part. So, I've come up with an idea to build "engine" part as a library (...
2
votes
2answers
77 views

Passing data to objects and sub-systems

I am currently creating a game in C++ using SDL. Many game objects and sub-systems require the use of variables such as an SDL_Renderer for drawing to the screen ...
0
votes
1answer
69 views

Deleting/Cleaning Screen-Objects with all child-objects in libGDX

For my game, Im using libGDX Ashley (ECS) Box2D Ive got a lot of screens but for simplification: MainMenuScreen and ...
1
vote
2answers
752 views

Composition Based Spell System

I was wondering if anyone would mind explaining a little about how a composition based spell system should work. I've been working on this for a few days now, I think I understand the composite ...
3
votes
1answer
85 views

Encapsulating parameterised prefabs

I'm currently using the following general pattern for most of my configurable components (i.e. MonoBehaviours): ...
4
votes
3answers
494 views

Class for each specific item in an RPG, or use a factory?

I had a question regarding the best way to have items in my RPG game. Currently I have a class structure in which everything inherits from GameObject. Item inherits GameObject. Armour Inherits Item. ...
3
votes
2answers
383 views

How to avoid using static variables

When developing with libGDX, you can often read, that your should not use static variables if you plan to eventually release your game on android later. But while trying to follow that rule, I often ...
0
votes
2answers
147 views

How do i manage skill collision target in Unity?

I wanted to make a skill that can be used by both Player & Enemy. How do I make it such that the skill will not be colliding with the owner/caster or colliding with both? One stupid way I have ...
0
votes
1answer
264 views

How do open world games handle efficiently enemy respawn?

I'm currently working on a 2D open world game loaded in chunks, initially I thought It would be sufficient to spawn entities randomly in a specific "radius" close to the player, and periodically ...
0
votes
1answer
192 views

Best way to store items with statistics in an mysql database?

Im currently working on an multiplayer game. Therefore using MySql for my game to store different data ( For example players, resources and so on ). Lately i implemented items, players receive them ...
1
vote
1answer
149 views

Designing a fluent API for card effects

I'm currently trying a develop a small game similar to http://www.estiah.com/. Basically, there are 2 teams of 1 or more actors each, everyone with their same deck. Turn order is fixed and each card ...
1
vote
0answers
239 views

How to properly separate render thread from logic thread?

I am not asking about parallelization of physics and so on stuff with parallel_for() like stuff. I've managed to have separate rendering thread from logic thread, ...
0
votes
3answers
254 views

Planning Class Inheritance for Game Objects

This is specifically about the development and planning direction of the game development. I'm creating a fairly basic RPG and am wondering about the approach that I should take. I've been trying to ...
1
vote
0answers
49 views

How can I properly render multiple layers/components in game?

I'm making a Love2D board game video game, which has multiple different components which need to be run and displayed on the screen at the same time. For example, I need to display the board, the ...
6
votes
1answer
464 views

Love2D game and editor in two separate programs

I'm building an engine in Love2D and I need to build an editor who will create scenes with game objects I wrote in lua. The thing is that there's this guy in my team who said : "Don't include the ...
0
votes
1answer
115 views

What do we call a feature that allows many kinds of game object to be “plugged in” modularly?

I'm currently at a very abstract level of designing a certain game (if interested, see this meta post), so my question is a bit abstract, too. But I'll provide a reasonable example, so please bear ...
0
votes
1answer
81 views

Designing an efficient neighbour-networking system

I'm developing a game, which involves the use of nodes (buildings), and I need to implement neighbour networks that nodes can use to either directly or indirectly access other nodes. Nodes can be ...
0
votes
2answers
55 views

Running code after after a few minutes of inactivity

I want to implement a logic that will execude after a while when no input was hapend. Like a screensaver that will get started after a few minutes of no mouse input. Im using libGDX so I think I ...
0
votes
1answer
185 views

Using a rule engine for a text-based web game

I have a database table that stores basic player data for the game. It looks like this: ...
0
votes
1answer
440 views

How does an ECS work for a world subdivided into chunks (example)?

I am trying to use an ECS for my 2d game at the moment. Up until now I had my world subdivided into chunks (as minecraft does) of size 64x64. They are loaded and drawn when they come onto screen. I ...
1
vote
1answer
176 views

Box2D simulation running slower on lower FPS(even when the desired FPS is lower than the actual)

I´m playing around and trying to make myself an easy platformer using the Box2D physics, before that I was not using it and was using my own physics implementation(just simple movements with timestep)....
1
vote
1answer
375 views

Are references between entities in Entitiy Component System allowed?

I've got a player entiy in my game that can pick up weapons when colliding with item entities. The player can hold and use the weapon in their hand (the weapon sprite is rendered relative to the ...
1
vote
1answer
59 views

Is a sequential update method really acceptable and is there a sane alternative?

A sequential update method is the update method pattern (e.g. as described here) where all game entities have their update methods called sequentially, even if this means the order of the entities ...
3
votes
2answers
201 views

What is the term for how much a game's code is coupled to its engine?

Essentially, what is a word or phrase I might use/search for to describe how much the choice of an engine dictates the structure of your code, such as the language it is written in or the way objects ...
3
votes
3answers
217 views

How can I un-bloat my player input processing in my text based game?

I'm writing a text based game, and I hit a snag with the user commands processing: so far I have a huge hardcoded ifelse block, and that does not seem good or scalable. With single word non session ...
0
votes
1answer
96 views

Scene components and renderer

I'm currently writing a very small game engine for learning purposes, and hit a block when trying to separate the engine's logic from the "rendering" module. My current approach is to feed my ...