Questions tagged [architecture]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
136 views

How can I improve on this engine design?

I am trying to come up with a terrain visualization system and I am writing a simple graphics engine for this. For some reason, I wanted to try a new idea. Rather than using dynamic polymorphism and ...
1
vote
1answer
554 views

How to abstract GLFW from my rendering library?

I would like to split my game engine in different libraries, so it is easier to maintain, however i have one problem: for example the window creation is handled by GLFW, so I encapsulated it into a ...
0
votes
1answer
105 views

Should I separate the Pathfinding info from the Tile Info class? [closed]

I have implemented A* on a Tile Based Game, my Tile class contains a lot of info like Position, TileType, Items, Characters, etc on it. Right now that class has the Edges references(neighbours), ...
3
votes
0answers
618 views

Framerate independent realtime input

I am currently working on a fighting game (with 3d graphics, gameplay like a 2d fighter) and encountered a pretty big hurdle I currently don't know how to deal with. For fighting games, input ...
1
vote
1answer
153 views

Single handler vs multiple handlers for the Command Pattern

I'll be soon implementing for the first time a Command pattern to catch general events about the world of the game I'm developing Since I haven't found much info about this particular issue, I'm ...
4
votes
1answer
712 views

Game Engine “Control Flow” Design Options?

I'm dabbling in writing my own somewhat basic game engine from scratch, and I wanted to ask about some common design configurations for connecting the various parts. I'm particularly interested in the ...
0
votes
0answers
22 views

Fast selection of visible child components

I'm working on gui and I have next realization of base UI component: So when I want to get absolute component position I need to sum all parent positions with component position. Also if I want ...
22
votes
3answers
4k views

How to avoid hard coding in game engines

My question isn't a coding question; it applies to all of game engine design in general. How do you avoid hard coding? This question is a lot deeper than it seems. Say, if you want to run a game ...
1
vote
1answer
193 views

How to keep the state of all games in the server?

i have a problem implementing a turn-based game server in java. What i want is a way or a technic that let the server keep all the games state that are created in order to the client recover at the ...
3
votes
0answers
148 views

Design pattern for world objects caching

I'm developing in Unity a voxel-generated terrain and I'm trying to find an extensible design pattern for voxels and more in general, world objects caching. E.g. storing in a 'ChunkCache' class only ...
0
votes
0answers
77 views

Convert a one-player client to a hotseat

I'm making a card game (inspired by Dominion, Hearthstone, Gwent, and others). The way it's set up now, it has a player manager that handles a player's resources ...
3
votes
1answer
270 views

Merging custom c++ engine with Unreal Engine

I have my own custom C++ game engine with networking, game logic (most important) suitable for type of games I am working with etc. I find it harder and harder to keep up with other engines in case ...
0
votes
2answers
337 views

How to handle Entity Initialisation and Destruction

I've been using the ECS pattern for a while now and, as the complexity of the game increased, I started having issues with the timing of the entity initialisation and destruction code. I'll use the ...
1
vote
1answer
45 views

How should I implement an Observer patter in the following example

I am wondering how I implement an observer pattern in the following example. I am mostly wondering what should be in charge of subscribing. The Example A factory produces cars (Observable), they ...
0
votes
1answer
50 views

Which Entities should be in my Pooling System?

Let's suppose that I'm designing a Tanks Battle Game, there will be a lot of projectiles and Tanks. Every Tank is composed with a Body, multiple Weapons such as Machine Guns, Missile Launchers, etc ...
0
votes
0answers
98 views

Are unit/building types generally stored as full objects or imported properties?

I'm trying to write a generic turn-based strategy game, with a few unit types, building types, etc. Since this is something I've never done before, and its not a very easily searchable subject, I'm ...
2
votes
1answer
352 views

When/where should a game state transition take place?

I'm in the process of redesigning some of my state management code (there are several features I've grown to dislike in practice..) which was based on this tutorial and others. The issue I'm having ...
6
votes
2answers
250 views

Should I store a value for every damage type even if zero, when using the Decorator pattern?

My game characters take damage by the method TakeDamage(Damage amounts), and the Damage struct has every type of damage (...
0
votes
1answer
70 views

Guidelines for determining what should be a component?

Background: So I'm developing my first 2d C++ fighting game (for learning purposes) and I have a setup where I have 'components' which are really just data holders with maybe some simple utility ...
2
votes
2answers
699 views

Using an interpolated game loop (such as Gaffer's final game loop), will the frame be rendered out of sync?

A highly recommended game loop is one from an article called Fix Your Timestep. It presents a method to update using a semi-fixed time step with interpolated rendering. The problem with this is that, ...
12
votes
1answer
2k views

Creating a Robust Item System

My aim is to create a modular / as generic as possible item system which could handle things like: Upgradeable Items (+6 Katana) Stat Modifiers(+15 dexterity) Item Modifiers(%X chance to do Y damage, ...
0
votes
2answers
98 views

How can I fix the vibration in my Player movement?

Edit: solved my issue, but look at the other answer I am stuck with a problem that I cant quite figure out. When I move my Player to a new point, it does get there, but it vibrates. I can't seem to ...
1
vote
1answer
81 views

How do I make the camera aware of the position of the object it is tracking?

I'm making a 2D game with a Camera that tracks GameObjects (usually the player). At the moment, a ...
5
votes
1answer
437 views

Managing complicated RPG character data

For a detailed survival RPG, the data that needs to be managed can easily become overwhelming if approached in an ad hoc manner. First, you may want to do away with HP and instead have a system of ...
0
votes
1answer
103 views

Why are voxels used for landscape?

According to Wikipedia many games have been using so far voxel engines for modelling landscape. Why is it only used for landscape and not characters etc?
8
votes
4answers
1k views

Goal oriented Action Planning with multiple Agents

I'm a little bit stuck: I implemented an AI with GOAP (Goal oriented Action Planning, http://alumni.media.mit.edu/~jorkin/gdc2006_orkin_jeff_fear.pdf) for a simulation game. That works fine. Now I ...
0
votes
1answer
97 views

Structure GameObject - States - Visual representation

Question: What is the best data structure for GameObjects that have different states and thus different visuals? The situation is: I'm creating a game for mobiles (written in Kotlin, no Engine used)....
1
vote
2answers
372 views

Getting Components to their respective System in Entity-Component Engine

I asked this question in stackoverflow, but I didn't get any responses. I think it's better suited in this exchange. I'm building a game engine of sorts (purely educational) and am not sure the best ...
0
votes
1answer
256 views

Game engine tool generating game entities

I'm writing a game engine with an editor that allows you to create individual components like sprites, fonts, and particles. Then you're able to combine these individual components into what I call an ...
1
vote
2answers
1k views

Do game engines compile games or just interpret them

I know that many game engines like Unity3d use scripting languages like c# or java script but does that mean that a game engine is just an interpreter? If so, does that mean that if I move the ...
2
votes
1answer
113 views

Gameserver Request handling

EDIT: I forgot to mention that in this implementation E stands for Entity which is just an ID, C => Component as data-only types and S for Systems which should implement logic Currently i'm working ...
3
votes
2answers
91 views

Filter game data according to player unlocks

I'm currently developing an online "empire management" style game in HTML and Node. Along the game, the player will be able to raise resources (by creating farms, mines, raiding) to unlock new ...
2
votes
1answer
967 views

Game engine design choice, favour data oriented design over oop?

I have a scene, in the scene there are multiple systems. Transformsystem, collidableSystem etc ... Currently, these do nothing except returning a bool if the parameter component matches the system: <...
2
votes
1answer
112 views

Logic and view separation but the view is generated by the logic

We are working on a simple turn-based card game. We would like to implement it using a design which let us create additional "monsters" and "events" later on (so the code should be flexible). Also, ...
2
votes
0answers
190 views

Event based collision system

Currently I am writing a litte 2D engine for training purposes. Some time ago I had some thoughts about good ways to implement and handle collision. (Not about the particular algorithm, but about how ...
2
votes
2answers
73 views

Programming Pattern: Representation of pick up objects

I'm pondering about the best way to represent objects that can be picked up in my 2D engine. I have an Actor class which is the base for all objects that can be spawned into the game. This class ...
1
vote
2answers
1k views

Entity component system design. Should ID of entities be continuous?

I am implementing an entity-component system. Below is my current implementation in c++. ...
2
votes
1answer
411 views

Should I avoid constructors/destructors in C++ when using custom allocators?

I'm currently building my first 2D game engine and have reached a point where some large-scale tests have shown that some form of custom memory management would be beneficial (object pools). So I ...
5
votes
5answers
2k views

Is it acceptable to use Hash Maps for input, copying one hash map to an another during the game loop?

I recently started developing a simple 2D game in Java using JavaFX and no proper game library (libgdx etc.) and among the things I did was to make an InputManager to handle every input from the ...
1
vote
2answers
177 views

Where should I put the code for objects interactions?

I'm working on a 2D puzzle game, and one of the features is the ability to push crates so you can climb on top of them to get to a destination. I've tried many things to get this to work but none of ...
1
vote
0answers
56 views

Flexible and extendable system of level objectives (victory/failure conditions) in Unity

I'm trying to come up with a flexible system of level objectives for a Unity game. What I'd like to achieve is to have a system that on each level (scene) can accept a different set of (configurable) ...
0
votes
1answer
288 views

What is the intended usage of the Sprite class in LibGDX

I am making a small game in LibGDX and it all works, sprites are moving etc. The drawing is mainly done in the render() method of a Screen, using Batch.draw(TextureRegion). So far so good. But now I ...
0
votes
1answer
52 views

How to save and update modifications done by the player in my procedurally generated JavaScript game?

I am making a game and I need the world to be generated and saved. I used Perlin noise to generate the terrain (and other stuff like trees), but cannot figure out the best way to save and recall ...
1
vote
0answers
77 views

Interaction between entity and tiles

In my game, I have a player, ennemies and tiles like Mario. And each entity has a different behavior when it touches a tile. For exemple, when my player walks on spike he dies. But a certain type of ...
6
votes
3answers
2k views

Clicker economy and bonus system

How is an economy system implemented in clicker games? Obviously, you can't store values like 1 Quintilian in long type. I understand that there might be some string operations or even better, some ...
2
votes
2answers
736 views

Architecture for extremely modular game? [closed]

I'm developing a modular game in Unity 5.6. Each module has very little overlap in assets with the others. I'm concerned about having a bloated repository after a few months of development, and since ...
3
votes
2answers
121 views

Large-Scale Case Handling for 2D Procedural Environment

I am creating a procedurally generated side scroller and I have a question regarding proper code structure/Architecture when it comes to connecting different platforms and large scale cases. There are ...
2
votes
1answer
856 views

How to make a game people can mod? [closed]

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
221 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
471 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 ...

1
3 4
5
6 7
25