Stack Exchange Network

Stack Exchange network consists of 174 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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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

1
vote
1answer
50 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
84 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 ...
0
votes
1answer
23 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
59 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 ...
0
votes
0answers
11 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
161 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
25 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
47 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
187 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
votes
0answers
38 views

Game tick system for web based 2d multiplayer sandbox game. Good approach?

For educational purposes, I'm trying to develop a game ticking system for a web based 2d multiplayer sand box game. I've never done something similar, but I'm experienced in developing enterprise ...
1
vote
0answers
24 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
59 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
28 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
70 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
13k 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. ...
2
votes
1answer
285 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
899 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 ...
0
votes
3answers
128 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 ...
0
votes
2answers
181 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
485 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
154 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
69 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
122 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
55 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
16 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 ...
0
votes
2answers
162 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 ...
2
votes
1answer
53 views

Encapsulating parameterised prefabs

I'm currently using the following general pattern for most of my configurable components (i.e. MonoBehaviours): ...
4
votes
3answers
276 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
139 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
43 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
0answers
56 views

card game backend framework

I'm doing research on how to create the server-side backend of my own web-based cardgame. I'm an experienced developer, just not in the game dev area. I'll figure out how to best communicate with ...
0
votes
0answers
34 views

What architecture is involved with creating a lobby system in a networked game?

I've recently done some networking courses which go into detail about how to make these systems work, but they have failed to cover any advanced scenarios that are actually included within real games, ...
0
votes
1answer
84 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
60 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 ...
0
votes
0answers
153 views

Need help with 'Party' mechanics in Game Maker game

To be brief, I'm working on a sort of dungeon side-scroller where you have a party of four adventurers (out of a possible many more) rushing through a dungeon fighting monsters and collecting loot. ...
1
vote
1answer
120 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 ...
0
votes
0answers
40 views

Separate Gizmos from Play functionality on MonoBehaviour scripts

I have a question regarding logic separation from visual debug (Gizmos) on Editor: I like to make use of Gizmos utilities to debug stuff on the Editor scene, such as waypoints and curves, such things ...
1
vote
0answers
124 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
141 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 ...
0
votes
0answers
63 views

Architecture and the gameloop

For the game I am making I think it would be best to implement an N-Tier architecture. The reason being is that I learned at school having a seperation of your UI, Logic and Classes is best in big ...
1
vote
0answers
31 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 ...
5
votes
1answer
342 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
87 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
77 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
0answers
16 views

Changing the function of a button in java during runtime/ Dynamic UI

So, I am totally new to most of the coding relating to game design but I had a question that I think is fairly straight forward. How do I get a single button to do different things depending on what ...
0
votes
2answers
35 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
68 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
187 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
63 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
109 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 ...