How code is structured. For questions on the internal design of a game engine.
0
votes
0answers
32 views
Good practices to store and access data in a game? [on hold]
The game
A classical two-dimensional RPG solo game. The player has attributes and can make choices in the game. There is a physics engine, so a lot of objects can be moved and NPCs as well.
What I ...
2
votes
1answer
58 views
How to make a game people can mod? [on hold]
In C++, how can one make it's game load content developped by other people?
For instance in Java you can look for jar files and load specific class from it.
4
votes
1answer
40 views
When should I acquire game objects with dependency injection, find-with-tag, or singletons?
This is sort of a best practice/efficiency kind of question, and I haven't really seen any other question talking about these three things together.
Essentially, Dependency Injection, Find with Tag (...
0
votes
2answers
63 views
Finite State Machine for player states
I have a state machine for a game I am developing. The player can be in four states, depending on button clicks, and some game elements (being in thin air, or standing on the ground). I am just ...
-2
votes
0answers
50 views
Inheritance in Game engine rendering backend design
I am a little bit confused each time I read regarding virtual inheritance,vtables and game engine design "best practice" articles.In general,a common belief in the domain of real-time graphics ...
1
vote
2answers
122 views
Don't message systems slow down game engines?
I am wondering, aren´t messaging systems slowing the speed of engines down? I mean, lets say that I want to zoom in my camera, without messaging I would do something like:
_camera->zoomIn(0.005f);
...
0
votes
0answers
30 views
Design convention for modular game object, Java
I want to implement a weapon object such that it would be very modular (Fallout/Borderlands like). Also assume that certain weapon extensions can cause manipulate the weapon's basic stats upon every ...
1
vote
0answers
35 views
Nested Entities in Entity Component Systems (ECS) [duplicate]
Say I have an entity that has these components:
-Transformation
-Visual
Imagine that these components can nest:
If I have a parent transformation component, a child transformation relies on the ...
0
votes
0answers
31 views
Strategy for abstracting rendering from draw surface
This question might be a little vague because I don't know how to do this myself and I might be asking something rather silly. So here we go.
Up to now, when I did my personal graphics code I used ...
1
vote
1answer
173 views
Should I create a Lua wrapper classes for my C++ classes, or should I bind them directly?
I have a fairly standard architecture like this:
GameObjects have Transform, and can have Renderer, Rigidbody, Camera, LightSource, etc, and all of these classes have their corresponding methods.
...
1
vote
1answer
73 views
Game logic in mvc: model or controller?
Sorry if the title is too broad, I'll try to explain this in a more specific way down here.
We need to create a board-game in Java for an University project and we have to use the mvc pattern for it.
...
0
votes
0answers
16 views
Handling different renderers Y axis direction in a single engine
I have an engine that uses either three.js (3D WebGL rendering library) or pixi.js (2D rendering library) depending on the game.
The problem is that pixi.js has y-axis pointing downwards (same as in ...
0
votes
1answer
83 views
What is the optimal way to store customisation options?
I am trying to understand the most optimal way of storing customisation options within a game, or to be precise, to store all the possible customisation options for multiple different objects.
For ...
1
vote
1answer
105 views
How do I avoid big switches in my message system?
I've been implementing a message system for my small engine, and I have started to think about optimizing and maintaining it. Right now, my message class looks like this (at its simplest - only member ...
0
votes
1answer
34 views
Changing the current state of an entity in the middle of an update step or wait for the end?
Let's say that I use a behaviour component that holds a function call to be called every update step assigned to an entity. Inside that function call I'm changing the active state for the entity to ...
0
votes
1answer
79 views
Three levels deep composition (player<-character<-spell), with preset character+skill sets
So I'm creating a rather generic strategy game similar to Warcraft or League of Legends, which needs to have:
a Player class for representing the users playing the game
a Character class for the ...
1
vote
4answers
236 views
What is the best approach for networking a basic HTML5 pong game?
I'm working on the design of a basic multiplayer HTML5 pong game, and I have a very basic question about architecture.
The implied physics is very basic, and the movements are not a problem. The ...
3
votes
2answers
72 views
Issues with events changing game state
I am currently experimenting with creating a turn based game using Unity and am trying to come up with a sensible architecture for structuring my game systems.
So far I have decided to base ...
4
votes
1answer
142 views
2D Tile Engine Architecture
I'm been working on a 2D tile game (sidescroller perspective) and I decided to rework my tile engine. Right now I store a new tile instance per block in the world (so there are like 1000 TileStone ...
2
votes
0answers
44 views
With what structure do you manage the graphics of a game? [duplicate]
Im currently trying to program a little game (in Java - Libgdx; if thats necessary).
I currently use a GameWorld and a GameRenderer, the GameRenderer just getting all the info it needs from the ...
1
vote
0answers
53 views
How to implement mutable functionality at runtime? [duplicate]
I am making a game in which the player character can gain traits that change how their character behaves in my world model or add functionality to it. For example, the character might gain the "...
0
votes
3answers
102 views
how to make client and server to develop independently?
Currently, all i want to do is rapid prototyping of Tower-Defense-Like game, which means that i just need write client code only,single player, play with AI system. but shortly afterwards, maybe it's ...
0
votes
0answers
85 views
Ability/Skill system
I'm working on an ability system in Unity3D. I'd like to have a flexible system, so the abilities are a composition of ability components. However I have some problems/questions with my current design ...
4
votes
1answer
373 views
A more data oriented design approach to Entity Component System game engine
I'm creating my first c++ game engine project (for learning purposes) and in it I've attempted to implement an entity/component system utilizing some data oriented design principles while also not ...
-1
votes
1answer
71 views
Clean code structure for dynamically rendering strings & numbers
I am currently working on the rendering aspect of my game.
The code is currently organized in this manner:
Classes:
G_Texture:
class G_Texture
{
public:
G_Texture();
G_Texture(SDL_Texture*);
...
0
votes
2answers
141 views
What is the best (or a good) approach to “code” difficult level
I've to decide how to code enemy spawn: quantity and time.
What's a good approach to do that ?
Maybe a class like this ?
class Level {
int levelNr ;
int soldierQty; // number of enemy ...
-1
votes
1answer
83 views
Component based development events collision
I'm working on new game architecture(actually port old game to new platform) and stuck with events in component-based approach.
So we have component Match. On match end it's generate event "...
1
vote
1answer
83 views
Semi-procedural mission generation
I want to generate missions out of more or less predefined smaller chunks. Example mission structure:
Mission type: Rescue
Travel through forest
Gather intel
Choice:
Sneak into castle (if it fails, ...
2
votes
5answers
139 views
Most efficient way of communication between “unfamiliar” game objects?
Title could look vague, so here's what I actually mean.
Three groups of people are walking in the city. These are Guards, Thieves and Citizens.
Something has happened in the city, Thief have stolen a ...
45
votes
4answers
11k views
How can I avoid giant player classes?
There is almost always a player class in a game. The player can generally do a lot in the game which means for me this class ends up being huge with a ton of variables to support each piece of ...
1
vote
1answer
94 views
Game Loop delay the right way and game speed
I am a newbie game developer. I am trying to find a right way to create my game loop.
Consider following example.
Simple Android Game
I have a game with a simple gameplay - bouncing ball.
I want ...
0
votes
1answer
160 views
Best way to manage thousands of objects in an multiplayer online game? [closed]
I'm currently planning to develop a real-time multiplayer online game, using the Google Maps API on Android. I thought about having survival-like game play, where you collect resources to build ...
3
votes
1answer
118 views
Pattern for collision handling?
I am writing a game with Java. There are many different kinds of entities on the screen, like the player, NPCs, monsters, bullets, items, shiftable blocks and so on.
This question is not about ...
6
votes
2answers
326 views
Entity-Component-System data storage design
I'm working on an ECS and I've already read a lot of articles about it. Most of these articles are talking about a simple case (store data contiguously, read it in a single for loop). However the real ...
0
votes
2answers
146 views
Component oriented programming for rich RPG world
I've asked this question on several forums but didn't get the proper answer yet.
So, in my opinion, it is a really theoritical and deep, but I really can't deal with it by myself.
What is my goal?
...
0
votes
2answers
58 views
Recreate UI or move it out of view?
Which method would be best? What are the pros and cons? For example, if I have a main menu screen, I can easily start my game loop right as the user presses 'Start'. Which would be better, moving the '...
1
vote
0answers
80 views
OpenGL back/front end threading and Doom 3 BFG engine
Introduction
I have been reading through the source code of id Software's Doom 3 BFG engine. The whole codebase is on GitHub at id-Software/DOOM-3-BFG. The architecture is both clean and elegant. The ...
1
vote
1answer
278 views
How to achieve an GPS-Based game like “Parallel Kingdom”
I'd like to use Google Maps, in my game, much like "Ingress", "Pokémon GO" and "Parallel Kingdom".
When I take a deeper look into the Android API/Google Maps API, and dozens of forums, I noticed ...
0
votes
1answer
84 views
Qt based C++ game structure : which class types to use here, and how to correctly structure the relationship between these objects
I am writing a C++ game using Qt. As this is the first time, I am trying to understand how the structure should be.
I have two objects derived from the type QGraphicsRectItem which appear as boxes on ...
0
votes
0answers
95 views
Vulkan render passes design
I'm learning all the nice features Vulkan has and making a "training" game engine. Unfortunately, I've stumbled upon a design problem, which I don't know to efficiently tackle with Vulkan. The problem ...
5
votes
2answers
258 views
Should I care about CPU affinity of threads?
I am currently developing a rendering engine, which I plan to use for creating games. The engine makes heavy use of multithreading; I have a thread for OpenGL rendering, a thread for updating, a ...
0
votes
0answers
86 views
Angular2 soccer game - which design (one or several components ?)
I would like to create a soccer management game, with match lives. In this match lives, the player doesn't play but just watches the match and can do some actions at the half-time.
I would like to do ...
1
vote
0answers
66 views
Multiplayer architecture of shooter games
I've a doubt about synchronization on multiplayer games. In the case of the architecture of a game is like this:
Client tells to the server is shooting at this position, then the server simulates the ...
0
votes
2answers
69 views
Layered UI architecture
I'm working on GUI system and I want to implement tooltips and dialogs.
Base components hierarchy looks like this:
So every panel extend ComponentContainer class, and other controls like button ...
1
vote
2answers
86 views
What pattern is used to render tiles?
I want to render a tile-based map and I am not sure which class structure to use to keep logic and rendering separeted.
My class structure so far on the logic side: One abstract parent class Tile ...
3
votes
2answers
205 views
How do I better organise rendering in an entity component system?
I'm developing an isometric RPG, with 3D characters in 2D level. I was using a standard object orientated programming paradigm, but was faced with a lot of issues. Recently, I learned about entity ...
0
votes
1answer
187 views
Data-oriented design and Component Sytem cross-referencing
Let's assume we're talking about a game (engine) which is written in C++. This is more like a design question but I can't find any suitable description.
Component System
The Component System says ...
1
vote
1answer
70 views
Communication between the SubSystems and the GameObject components?
Currently I have an architecture (not 100% accurate):
The RenderData contains primitives, which will be processed by the GraphicsEngine.
Upon creation I have to send the pointer of the renderData ...
0
votes
2answers
70 views
Unused methods after component inheritance in component based architecture?
I have a GameObject class, which contains Components, like:
Renderer
Camera
Behaviour
Rigidbody
First I inherited all of them from Component which has an Update() method, and it is called every ...
7
votes
2answers
410 views
Is this a good way of separating graphics from game logic?
My current architecture for me game engine looks like this, though it is not accurate:
Everything graphics related is done in by GraphicsEngine, and through its components, like Material, Mesh, etc). ...