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
0 answers
32 views

Best choice of .NET engine for developing a map-based game [closed]

Sorry, you probably get a lot of these kind of questions, but I was unable to find anything. So I'm looking at developing a game in c# with dotnet. The game is mostly going to be composed of looking ...
  • 1
2 votes
6 answers
106 views

Modelling Two Way Relationship in Unity for Scriptable Objects

How does one model two-way relationships for scriptable objects? Let's say we have a number of items in-game, and each item can be obtained by different conditions. Some may require you to complete a ...
  • 53
0 votes
0 answers
27 views

Is there something like ToDoMVC in game development?

So in web when we are want to select from several frameworks we are building a ToDo app: https://todomvc.com/ to understand if it suits us well. Is there something like that in-game development? There ...
0 votes
0 answers
17 views

How to viably store player position & state between scenes? [duplicate]

[The following is being constructed in Unity] Consider an RPG where the player enters different rooms and we must remember the last position the player was in ...
1 vote
2 answers
90 views

Having one giant level instead of several levels separated by a loading screen

I'm making a metroidvania game. For what it's worth, I'm using Godot as the game engine, but I think my question applies for any engine. If you look back at old games such as Super Metroid on SNES, ...
  • 743
0 votes
0 answers
54 views

How do buildings in (Tile based) city builders/colony sims keep track of each other? [duplicate]

Like, how does a building in these games know if they're being powered? Or if they're within range of influence of a hospital or fire station, etc. How would they know where to send an NPC or ...
2 votes
1 answer
160 views

How to design an upgradeable skill system?

In my game skills can be leveled up to modify base stats like reducing cooldown by 20% and increasing fired projectile count by one. How would I architect the system so that each skill has its own ...
  • 63
1 vote
1 answer
97 views

Implementing ability system with ability parameters

I am trying to implement an ability system in Unity for a game similar to XCOM (turn based, team consists multiple of units, grid based). Every unit have X action points per turn. I would like to do ...
  • 13
2 votes
0 answers
87 views

Handling infinite combos

I'm working on a game where entities can be affected by 'statuses' that can have an effect in response to any entity event (lost_life, turn_began...). I'm searching for good ways of handling this kind ...
  • 21
1 vote
1 answer
34 views

How should I share the states amongst all the executions of a Behaviour Tree triggered from all ticks?

I'm still learning about Behaviour Trees and my understanding of the "blackboard" is essentially a state object. When passing the state object through the ticks to the function calls (which ...
  • 417
1 vote
0 answers
46 views

Is it worth creating engines for simple projects? [closed]

I know, this question has already been answered in several places on the internet and the answer is NO. But there are some points, I probably don't have the experience of half of you but I love C++ ...
0 votes
3 answers
101 views

How to prevent a huge backlog of physics calculations from freezing browser when tabbing out of browser game?

I'm developing a browser game and am using the timestep implementation from the famous Fix your timestep! article. It works perfectly, but there is one problem. If you tab out of the tab and then come ...
3 votes
1 answer
173 views

Trunk Based Development: Prevent unreleased assets and features from being included in the build

Our team is currently working on a live service game (A game that will be updated regularly post-launch) and is using a trunk-based development strategy. The trunk-based development strategy is great. ...
  • 53
0 votes
1 answer
84 views

Architecture of networking in game engine

I am currently building a 2d game engine, with the future intention of adding some sort of networking functionality. I have past experience making networking games in Unity and whatnot, however I am ...
0 votes
0 answers
156 views

(FSM) Detect a change on a variable on Update, and trigger certain State

So, I'm working on a FSM that ticks on every frame. The inner workings can be simplified to this: The user (me) creates the States: ...
0 votes
1 answer
94 views

How to give two GameObjects references to each other?

I have two GameObjects and would like both to have a reference to the other. I know this can be done by creating public properties and setting them with Unity's inspector, but my preference is to ...
2 votes
1 answer
68 views

How are map/room/world-related game assets usually organised and implemented?

I'm trying to build a simple 2D Shoot 'Em Up type of game in C++ using SDL2 and an Entity Component System, which I've already implemented. The idea is to have different maps/rooms where you have to ...
3 votes
1 answer
102 views

Why are some gameplay systems set up to `exist in the world`, with full collision and kinematics, whereas others seem like `complex event timelines`

I wanted to ask a question I've always wondered about to the larger crowd of gamedevs out there: Why is there often a disconnect between the locomotion / kinematic systems that a player controls vs. ...
  • 104
1 vote
1 answer
99 views

How to include cross cutting concerns like sound/graphics effects in an ECS?

It does not seem like a good idea to include this functionality in the game logic like that even if the concrete implementation of the sound or graphics effect is abstracted away. Ideally, the game ...
  • 334
0 votes
1 answer
46 views

Architecture advice: a combo manager with combo displayed on the GUI in Unity

I would like some advice on the architecture I am using, and if there's perhaps a better way to go about doing this / if I am over-complicating things. I have a combo meter go up on the screen based ...
0 votes
1 answer
76 views

proper items db design mysql

I'm working on a game using MySQL as the db. I'm struggling a bit on the database design, this is the part I'm struggling with: So basically exp_ups, mystery_boxes and weapons are entities in the ...
3 votes
1 answer
83 views

Proper way to build sensible object graphs?

The Context I'm currently working on a game and its engine using C# and MonoGame. The engine is data-driven and I want people to be able to mod the game or make their own using my engine. All the ...
0 votes
1 answer
34 views

First Person shooter look direction abstraction for InputController, AIController and NetworkController

The problem Suppose I have a game where there are multiple Input Controllers: LocalPlayerController: Reads inputs from the keyboard/mouse/gamepad. ...
  • 115
0 votes
1 answer
75 views

Scripting Language To Renderer Architecture

I am currently designing the scripting side of our engine. The idea is an entity-component system. That means most of the coding is done via jobs. The language we are using is compatible to C. The ...
0 votes
0 answers
38 views

Unity code design - Events

I am aiming to create a Unity project with a code structure similar to ECS. I want the code to be consistent, easy to integrate extend and expand if multiple developers will work with it. By that I ...
1 vote
2 answers
123 views

How do you break up or architect Unity scripts?

I have a player script that is turning into a bit of a monster. I don't know too much about Unity so I'm just jamming the whole game logic in there which does not seem right. The player is currently ...
  • 113
0 votes
0 answers
83 views

Best architecture for describing interaction between spells

Interactions serve as retroactions. I'm currently looking the best way to describe interactions between different abilities. For instance, if we take a fire ability and a water one, a lot of different ...
0 votes
0 answers
83 views

How to Pass Multiple VBOs to OpenGL for a voxel game

I'm trying to make a voxel engine (NOT based on an octree model). Currently I have a setup with a Chunk class, which stores the following: ...
0 votes
0 answers
208 views

Mini-games development like Wario Ware in Unity

I'm trying to develop a game that consists of multiple simple minigames, just like Wario Ware or Dumb Ways to Die, but in Unity. The problem is I'm not sure how the project should be structured. I've ...
0 votes
0 answers
28 views

What visual object should I use for a lot of for nonmoving objects in Unity?

The objects only need to mouse clicked but there are 1000 of them. They don't move- they have color modulation and text. I was thinking buttons, can Unity reliably handle so many of them? Or do I need ...
1 vote
1 answer
223 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
1 answer
259 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 ...
  • 1
0 votes
0 answers
53 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, ...
  • 684
2 votes
1 answer
264 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 ...
  • 145
3 votes
1 answer
100 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-...
0 votes
0 answers
99 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
2 answers
69 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 ...
  • 113
1 vote
2 answers
137 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
1 answer
75 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 ...
  • 25
2 votes
2 answers
287 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
2 answers
93 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
0 answers
75 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 ...
  • 343
1 vote
4 answers
383 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
2 answers
134 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
2 answers
309 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 ...
  • 66
0 votes
1 answer
84 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
1 answer
126 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
1 answer
222 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-...
  • 1,986
2 votes
1 answer
140 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
1 answer
88 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 ...

1
2 3 4 5
27