Questions tagged [architecture]

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

Filter by
Sorted by
Tagged with
1
vote
2answers
352 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
551 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
721 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
86 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
202 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
90 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
98 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
932 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
88 views

Encapsulating parameterised prefabs

I'm currently using the following general pattern for most of my configurable components (i.e. MonoBehaviours): ...
4
votes
3answers
590 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
480 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
178 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
321 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
253 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
160 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 ...
2
votes
0answers
265 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
322 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
51 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
483 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
118 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
83 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
223 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
496 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
230 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
480 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
67 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
205 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
221 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
104 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 ...
0
votes
1answer
181 views

How to create class for storing different types of vertex?

I am writing graphics engine for educational pursoses and have some problems. I need to have ability to use different vertex formats (for example position+normal+uv or position+normal+uv+bones+...
1
vote
0answers
44 views

Sequencing method calls with time delay

I'm trying to solve what seems to be (or should be) a very simple problem. I'd like to sequence several steps in a GameManager class with some time delay between them. In my case, I'd like to clear ...
3
votes
1answer
427 views

Simulate parallel dimensions / subspaces in Unity without colliding coordinate systems

I've built an online game with Unity with a very large open world. The server (which can be a local player, or run as a standalone application without a local player) simulates everything around ...
2
votes
1answer
314 views

representing transforms without a world/global reference frame

Background: I'm trying to make a segmented/portal-based game engine that supports impossible (non-euclidean?) geometry. By segmented/portal-based I mean the world is divided into segments which are ...
1
vote
1answer
170 views

Preloading for level transitions in a tile-based game?

I am developing a 2D Metroidvania which consists of a series of interconnected levels. When my player gets near a portal which can take him to a new map, I want to pre-load the next map so that there ...
17
votes
1answer
2k views

How can I implement persistent state for objects defined in a level?

I am developing a 2D Metroidvania which consists of a series of interconnected levels that can be revisited. Each level is represented by a Tiled TMX file in which I have specified where various ...
0
votes
1answer
1k views

Tips on how to architect your JavaScript game with classes

OK, so I'm creating a <canvas> game using JavaScript (ES6+) features like Classes. It's straight from the vue-cli and <...
1
vote
0answers
79 views

How to do game object perception at scale without some god object?

I've read through this post Interactions between game objects but it doesn't really address my question. Background assumptions: Maximum number of possible objects and the game still runs Maximum ...
1
vote
0answers
44 views

Good Way to Handle Scheduled Events in Mobile Multiplayer Strategy Games

I am developing a mobile strategy game like Clash of Kings. There are scheduled events in the game (like constructing buildings, recruiting troops, and attacking to other settlements) which happen ...
2
votes
1answer
466 views

Is this an optimal way to architect an OpenGL Renderable object class?

I want to create a class which is a "Renderable class". Basically, world objects will use this as a Base class to create objects that can be drawn into an OpenGL window. This is what i 've got so far: ...
2
votes
2answers
153 views

Is it possible to copyleft license a game engine and still allow users to sell games made with it?

I have recently been studying and working on implementing my own game engine. I am interested in making my work open source so that others may use and modify it freely. However, I also want to make ...
-2
votes
1answer
34 views

Entity update or Keyboard commands transferred to the Gaming server?

I am working on a research project . I need to know the network communication in games in large Multiplayer games (Battlefield,GTA 5). Is there some official documentation present for these games? ...
0
votes
1answer
134 views

How do I deal with this tilemap wraparound edge case?

I'm building a 2D game engine that uses tilesets to build levels. I recently added functionality to handle wraparounds (ie. where the right edge of the map connects to the left edge.) The engine ...
3
votes
0answers
229 views

Optimal solution to render sprites with transparent edges in Unity

Since I'm currently developing a 2D game for mobiles, overdraw and drawcall count is my first priority in the design of the application I've thought initially to split each sprite in two parts: one ...
1
vote
0answers
222 views

unity game engine - should I be using a di framework / ioc container [closed]

Is it worthwhile for a solo dev to take up the widely recommended practice of using a dependency injection framework within the unity game engine? I have seen reason for concern regarding the clash of ...
4
votes
0answers
418 views

With this MMOG architecture, how can I avoid losing games when the server goes down?

I am fairly new to game designing and am trying to design game engine architecture for MMOG poker game. My major problem is scalability. Old Legacy code written in python runs everything on single ...
15
votes
2answers
7k views

What is an actor in game development?

I am reading a book about game development (Game Coding Complete, Fourth Edition) and there is an "Actors" topic which just explains how to use them briefly instead of explaining what it is. Here's ...
3
votes
2answers
296 views

Is single/double frame allocator suitable only for POD datas?

Let´s say I have a single frame stack allocator, so I´m using it for allocating memories for my temporary data. ...
4
votes
2answers
1k views

Performance problems with quadtree for dynamic objects

I´ve implemented a quadtree spatial partitioning to my game engine as I wanted to try it and see how it affects the performance checks. The results were great (instead of hundreds collision checks ...
0
votes
1answer
318 views

What kind of work is usually done by scheduled tasks

I was reading about how task schedulers work in game engines. What is unclear to me is what kind of work is usually scheduled inside these tasks. Do engines usually tick an actor inside a separate ...

1 2 3
4
5
25