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

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

0
votes
0answers
8 views

Splitting action execution and validation logic in a client/server board game

I'm developing a board game where players can perform actions depending on the game state. The client runs through all actions types and based on the game state presents the possible actions to the ...
1
vote
0answers
69 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
665 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 ...
0
votes
0answers
20 views

Alternative for map data structure to handle large data?

currently I am implementing normal calculations for my game using a std::map to retrieve connected triangles of a vertex stored in map. Since, I handle heavy models, large data from the map has to be ...
1
vote
1answer
133 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
0answers
43 views

How can I structure my game to simulate 'real life' objects and events, and their interaction?

I'm currently in the planning phase of a game, but I'm a bit stuck on the architecture. I will need to simulate some "real life" objects, but to keep it simple, let's look at this example: Let's ...
0
votes
2answers
82 views
1
vote
1answer
81 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
62 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?
0
votes
1answer
32 views

How do I move many “static relative to each other” objects around?

I'm currently building an Elevator Bank simulator in Unity3d and I'm stuck on how to reduce the amount of objects it's going to generate when it's done. The simulator will consist of one player (for ...
0
votes
1answer
45 views

Decoupling Input from Update/Physics Movement in a Game Engine

I have some troubles figuring out how to decouple the input handling from the physics part (includes movement). My Game loop looks like this ...
1
vote
0answers
13 views

Handling game message packet loss at low speed and at a microcontroller level

I read this: How do I handle packet loss in a client-server network model? ...But I'm looking for more advice. Currently I'm implementing my own lazertag vests. I'm programming hardware (8051 ...
0
votes
0answers
36 views

How can I implement multi-platform build system for my custom engine?

I'm programming a simple game engine. But I got stuck. How can I build to project on engine for any platform Android / iOs / Linux & etc?
6
votes
2answers
206 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
98 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 ...
0
votes
0answers
60 views

How should a game server receive/send udp packets with a defined tick rate?

I currently have a game server with a customizable tick rate, but for this example let's suggest that the server is only going to tick once per second or 1hz. I'm wondering what's the best way to ...
1
vote
1answer
64 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
92 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
147 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
28 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
62 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
25 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
218 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
31 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
52 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
222 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
26 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
61 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
32 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
87 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 ...
35
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. ...
3
votes
1answer
318 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
910 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
192 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
190 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
495 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
193 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
72 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
125 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
57 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
20 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
250 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
61 views

Encapsulating parameterised prefabs

I'm currently using the following general pattern for most of my configurable components (i.e. MonoBehaviours): ...
4
votes
3answers
296 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
167 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
52 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
87 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
37 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
122 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 ...