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
35 views

Extensible 2D Rendering with ECS Architecture

I am currently creating a 2D game/game engine using an ECS architecture. Currently I have a renderer_2d system which is a function that takes all ...
0
votes
1answer
57 views

Help with software design of a turn based combat system using SDL2

I have been working on a RPG where the player is free to wander an open world but when a monster is encountered or on keyboard command the game switches to a turn based system. Note this is not like ...
0
votes
0answers
31 views

What's a good architecture for a simulation?

I have a concept that involves a world being simulated. Lots of entities and processes acting upon them, not to mention interactions, etc... Every SimulationTick, ...
0
votes
1answer
110 views

What should be an entity/component, and what shouldn't?

I've recently been reading the book Game Programming Patterns by Bob Nystrom, and one chapter I've found a bit hard to grip is the chapter about the Component pattern. In the example he uses (which ...
3
votes
1answer
70 views

Storing stateful function-based actions in a JSON

System: My game uses an "ECS + event queue" architecture where every tick, various events change the state of JSON-able data. Plain JS objects. Problem: I want to be able to save the game-...
1
vote
0answers
55 views

How can I efficiently and safely represent and query game state in the logic programming paradigm?

After learning Dialog, I've discovered representing game logic using the logic programming paradigm is a lot of fun; the composability and non-locality makes it feel like some kind of superior ECS. ...
0
votes
1answer
35 views

How to handle bloat that comes with derivative ScriptableObjects?

I have ScriptableObjects with special code functions that all are slightly different in their interaction, all derived from one main ScriptableObject. This has lead to making the ScriptableObject ...
1
vote
2answers
83 views

Design patterns for non-modal (in-game) dialogues/cutscenes in a game engine

I want to create a scripted dialogues/sequences between NPCs and/or PC during the game. I have a DSL to configure a PC's dialogue with one NPC, inspired by Inkle and Twine. Now, I need a dialogue ...
0
votes
1answer
47 views

Point System Using a GameManager?

I am trying to use a GameManager script to store and hold my players points, across multiple levels. The problem is that I have no idea how I should implement this. Should I declare the points ...
1
vote
2answers
127 views

How to handle "identity" of unit/building types within an RTS context?

TL; DR: How do I give unit and building types a unique "identity" without turning my codebase into a mess? I've been reading the genius Game Programing Patterns and it's made me very (...
0
votes
2answers
64 views

Naming convention for loop modules

Question about game engine object oriented design. Let’s say I have an engine with a main loop, and many handlers that will be executed by the main loop every time on next iteration of main loop. So ...
1
vote
0answers
38 views

How is the processing for FPS games with massive worlds (like Planetside 2) distributed between servers?

For such massively sized maps with an insane amount of players when it came out (or maybe it still has thousands of players in one general area at once still?), I'm almost certain the entire world is ...
0
votes
0answers
25 views

What are Unity's subsystems used for?

What is the purpose of these classes? https://docs.unity3d.com/2020.3/Documentation/ScriptReference/UnityEngine.SubsystemsModule.html I understand generic subsystems in web development, is this the ...
1
vote
4answers
212 views

Are MMORPG servers and clients usually developed in isolation?

As with the title, are they usually developed together in a custom engine, or are they mostly developed independantly of each other? e.g. the server and client as completely different projects that ...
2
votes
2answers
107 views

Record/History of moves and state of entire game after that move for a Turn based game

My first question here! :) Im trying to conceptualize how I would go about recording the moves of my players, and also the state of my game after the calculations of that move. For example, Final ...
0
votes
2answers
105 views

Designing persistence in an ECS world subdivided into chunks

I'm designing a kind of simple open world with ECS. The whole world is too large to be loaded at once, so I load and unload chunks according to player's position. Nothing fancy, pretty much standard ...
0
votes
1answer
77 views

How to design a system that allows for custom equations of movement?

I'm developing a top-down shooter and I currently have a PhysicsSystem which operates on TransformComponents. Basically, it ...
1
vote
1answer
93 views

Should state and behavior be combined for Buffs? Cannot decide between data-driven and OOP approach

I'm writing a 2D roguelike that uses an Entity Component System and I'm having trouble deciding between the traditional OOP approach versus a data-driven approach to implementing buffs and debuffs. ...
1
vote
1answer
122 views

How do game engines enforce global, engine-specific coordinate systems?

In Unreal, the 3D coordinate system is defined as a right-handed, X-forward, Y-left, Z-up frame of reference; but, the default 3D coordinate system for, say, DirectX is a left-handed, X-right, Y-up, Z-...
2
votes
1answer
89 views

How can I solve interactions between game environment and Entities like player or NPC on the code level?

I want to figure out how objects in a game environment like these: A reward Chest A mana depleting/replenishing zone sudden stormy winds in a certain direction should affect other entities' (player'...
1
vote
1answer
69 views

How do I solve a problem where sometimes recursion is untenably vast and sometimes it is not?

I am writing a programming language of my own. (I've done two Turing complete ones in the past, but this time I'm trying to actually be useful.) Now, one thing that should be especially easy with ...
0
votes
1answer
178 views

What server architecture should I use for matchmaking in Node.js?

I'm making a board game in which users register for a game which will start at fixed time and users can register till the start of the game. My initial idea was to use it with socket.io(connection ...
0
votes
1answer
77 views

Best way to handle events for a turn base game?

I'm looking for the best way to handle events for a tactic game in Unity. Every unit may need to react to different events (turn start, end, on damage to self, on damage to other, on kill, etc...). At ...
1
vote
1answer
122 views

Multithreading vs Asynchronous game loop for multiplayer online game?

I'm trying to create a turn based multiplayer online game where players can be grouped in a room/lobby and play (similar to Ludo but number of players can be more than 4). There can be multiple such ...
0
votes
0answers
22 views

Designing an API for defining rigged game entities

I am making a game framework for building/constructing what I would imagine are called something like "multi-component rigged entities". This would be things like a stick-figure drawing. Can'...
0
votes
2answers
387 views

What data structure do I use to store Archetypes in ECS?

I am implementing an ECS with "archetypes" similar to how they are defined in Unity: A unique combination of component types is called an Archetype. For example, a 3D object might have a ...
0
votes
2answers
88 views

Structuring a game in Java

I am currently programming my first game in Java and I'm having trouble structuring it. My biggest concern is regarding the game loop. Currently I have implemented a class with only a main function ...
5
votes
2answers
2k views

Can you show rng code running in real time in a game?

First off, I know almost nothing about game development/rng but I will learn. So apologies for sounding uninformed. I want to make a sandbox ios game with several activities to do within, one of which ...
1
vote
0answers
51 views

How to reduce code duplication in a cross-platform renderer without tying the interface to one specific API?

I'm working on a game engine as a fun project over the spring+summer. I've decided that to allow myself to explore rendering APIs I'm unfamiliar with, and force myself to write reusable code, I'd ...
0
votes
0answers
26 views

Organising gameobjects into multiple lists

I have a very simple little game that consists of a player, zombies, food, and treasure. It's all automated. The player will walk towards a zombie and shoot within a certain distance, which costs ...
0
votes
1answer
64 views

How to deal with data that needs to be accessed by all objects?

I have a World class that currently only has one instance. It has data and methods that need to be accessed by all other game objects. Right now I'm hardcoding a ...
4
votes
3answers
2k views

Is an ECS viable in garbage collected languages?

I've done some research on Entity Component System architectures. Right now I have a convoluted OOP implementation which I'm planning on rewriting, so I was considering switching to a different ...
0
votes
1answer
170 views

Plugin system with AssemblyLoadContext and unloading

I'm building a game engine from scratch and trying to implement a basic plugin system within my engine. Using AssemblyLoadContext to load the target dll dynamicly ...
0
votes
1answer
110 views

Combining a pure ECS with a FSM scheduling system

Currently I am evaluating how to refactor my core game logic since I tried to design most of it in pure ECS but isn't really completely feasible the way I intended it. My game at its core is a turn-...
0
votes
1answer
130 views

Refactoring fighting game Movement class responsibilities

I'm a web developer, new to C# and trying to learn Unity. I've learned the C# syntax, I understand how to write working code, although I'm having a hard time understanding when and to what classes ...
0
votes
1answer
306 views

How do I contiguously store and iterate over ECS components in C++?

I'm writing an entity component system and want to store each type of component separately and contiguously in memory in a way that's easy to iterate over. Component...
1
vote
1answer
99 views

How to connect the Data Layer (Models) with the Visual/Interactive Layer (MonoBehaviours)?

I have been struggling with this dilemma for quite a while already. Our game is complex enough that we have tons of logic in normal C# scripts that function very independently of any Unity specific ...
0
votes
1answer
66 views

How to decide whether a Buff should be a component or a Buff object in an ECS?

I'm developing a top-down 2D game in Javascript using an Entity-Component-System architecture and I'm struggling with the question of exactly how to implement temporary buffs / permanent passives. For ...
0
votes
0answers
21 views

How to control an Animator without having all the animations on a Controller?

I am building a sims-like game where there are a lot of objects for my autonomous characters to interact with. Because of this, as much of the unique interaction code as possible is controlled by the ...
0
votes
2answers
113 views

How to replace if/else/switch with polymorphisim

For a long time Robert Martin has been advising against if/else/switch branching logic and instead rely on the polymorphic behavior of different types. ...
0
votes
0answers
61 views

How to design a character damage system with ECS architecture?

I am developing an game with ECS architecture and trying to design a character damage system. Does the following design fits into ECS conception and will it be extendable in future? I have an ...
1
vote
1answer
355 views

Component-based ability system for turn-based rpg

I am trying to make a component-based ability system for my new turn based game that I am working on. I not sure with the architecture and the approach I am following. So here my idea: Every Ability ...
0
votes
1answer
50 views

Should abilities have their state and functionality separated?

I'm developing a top-down game using Javascript and Canvas in an ECS architecture. I'm wondering, which of these is better from a design / elegance point of view? Method 1: Combining the ability ...
0
votes
0answers
232 views

Supporting multiple graphics apis

I would like to provide support for switching between both OpenGL and Vulkan in my game (and potentially DX12 later). Currently I only know OpenGL so I am working on that. I have read a lot of posts ...
18
votes
4answers
3k views

How can I efficiently load huge volumes of star systems?

I am working on a space exploration and combat game, and I can create galaxies, nebulas, solar systems, and load and unload them procedurally as needed. Meaning the stars that the player can see are ...
0
votes
1answer
103 views

How to make an application architecture a global strategy game?

I am doing a global libgdx strategy, how can I properly design the architecture? So far, I'm in some kind of chaos, because there are different events that need to be shown to the player in the form ...
0
votes
1answer
352 views

Looking for a game engine to make a game like "Ikariam" or "Ogame" [closed]

I'm an IT student and currently in my spare time I want to start a project. I would like to make a game that resembles a browser games like "Ikariam" or "OGame". I don't want this ...
0
votes
0answers
68 views

Cannot decide between using a MessageBus and entities for events in my ECS game

For example, let's say that the player walks into an enemy and in response, a chain of events should occur (such as: his score goes up, the enemy dies, a cinematic starts, etc.) I see two "proper&...
0
votes
1answer
126 views

Reference counting with resource handles

I have implemented a resource handle and resource cache class. The handle stores an integer id. The cache stores a vector of objects e.g., Textures. The handle id acts as an index into the cache ...
2
votes
1answer
67 views

Scaling physics engines beyond single computational server

Currently working on a small home project of developing our own game. The game basics are just a straightforward space game, currently without any collision detection/resolution, just movement with ...

1
2 3 4 5
27