Questions tagged [architecture]

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

Filter by
Sorted by
Tagged with
3
votes
1answer
72 views

What is the cleanest way to code predictable client/server components

Lots of classic games that I've read the source code to do things like if (clientside) // ... or the same but with ...
0
votes
4answers
96 views

What is the best way to implement the story functionality (dialogue and cutscene management, etc.) in an RPG?

I would like to know what the best way to implement the story functionality of an RPG would be. I am writing the game in C++ using the SFML library for graphics, and I have implemented drawing tiles, ...
0
votes
2answers
92 views

AI Behaviour design pattern which handles lots of diverse behaviours and mechanics?

I'm working on an 2D overhead topdown game in Unity3D and I want the enemies to have lots of diverse behaviours. How should I design the architecture with this in mind? For example I want: A simple ...
0
votes
1answer
39 views

Moving cars on a tiled map

I'm writing a game which is situated on a tiled map. I have a PlayState on which there's a Board which cosists of Fields. My Board is an isometric map of a city, where each tile is a kind of road. ...
1
vote
0answers
38 views

Games that mix emulated old machine code with modern languages [closed]

Is there any example of game development in a "modern" multi-purpose language (C++, Python, Java, Go) that loads game binaries of an old platform (e.g. 8-bit, 16-bit or 20-bit DOS) and emulates it ...
0
votes
1answer
83 views

Multithreading: Each system on a different thread or a thread pool?

I'm building a fairly involved game using OpenGL and C++. I've been thinking about how to implement multithreading, and the two options are: 1) Each system (Graphics, Audio, Physics, et cetera) gets ...
2
votes
2answers
158 views

Entity Component System: where do I put containers?

I'm pretty new when it comes to the whole Entity Component System structure and I got some questions I just can't wrap my head around. I know that for example collisions, you'd have a ...
1
vote
1answer
36 views

How does one organize AI interactions with Local and Remote Players?

Scenario: In a first-person multiplayer game, an AI monster grabs a player. (This would be first-person player on the client's local machine, and a third-person remote player on the master and other ...
2
votes
1answer
46 views

Modeling complex requirements for populating loot/drop tables

I have a set of items and a data structure that describes where and how those items may be dropped. I'm looking to implement a roguelike/randomizer element to the game and want to include the special ...
0
votes
0answers
51 views

Serverless Multiplayer

I wanted to make a game with a "serverless" mobile multiplayer game. The idea was to have devices connect to each other automatically when they are within range. There would be no global game state ...
0
votes
0answers
16 views

TurnBased Server Design

I want to create turn based card game. Im currently writing server part in Java and I designed one little mechanism how it could work. On one server I want to be able to have lots of desks. So the ...
3
votes
1answer
84 views

Multiplayer oriented game engine object (C++)

for a personal project i started making a 2d game engine in C++ that uses sfml. The idea is having base "game object" classes from which a game will inherit. Right now i have: Game_engine class ...
0
votes
1answer
157 views

Why separate data from logic?

I don't understand the purpose of separate SystemClass for functions. My composition looks like this: ...
0
votes
2answers
78 views

How to load assets into the game engine editor fast?

I am making a game engine with C++ and OpenGL. Currently I'm stuck making the asset explorer. I would like to be able to import assets into an engine project and then when I open the project just use ...
0
votes
2answers
99 views

How can I implement versioning into a save system?

I currently have a crude save system in my game. When my game is first launched after download, it checks for three directories in a certain location on the client computer, ...
1
vote
1answer
208 views

Do I need a rendering system in my engine?

I am planning to create a cRPG game engine that would allow to easily create games like Baldur's Gate. I already tried to do that once, but my knowledge was vastly insufficient at the time. I settled ...
0
votes
1answer
52 views

How do I keep historical variable value tied to certain period of time?

I'm currently trying to figure out how I can keep ever-changing variable values and make it available for other classes to access the said variables. In my example, I have the following: ...
0
votes
1answer
131 views

How does a game like Minecraft handle block and entity updates?

I am not asking how Minecraft loads chunks or generates chunks, I am asking about individual blocks and entities and their behaviours. Suppose you have a dirt block: dirt block can be converted to a ...
1
vote
0answers
90 views

How to set up an architecture and a strategy allowing the persistence of the data of a MUD in a relational database?

How to set up an architecture and a strategy allowing the persistence of the data of a MUD in a relational database? Type of game: My question relates to the design of a Multi User Dungeon (MUD). ...
0
votes
1answer
138 views

stats or profit give away result of game

Think of a coinflip game, whose logic looks as follows: Server sends websocket message (RESULT_MESSAGE) to frontend with result of a game (won/lost) Server sends websocket message to frontend with ...
1
vote
1answer
87 views

Dynamic Game Server Architecture

I'm trying to find a way to design a game server architecture for a real time mobile game. The design should be cost effective but still to some extend scaleable (later on). Mobile client flow: ...
1
vote
3answers
246 views

Is it possible to avoid global data in a Multi User Dungeon (MUD)?

I am currently designing a Multi User Dungeon (MUD). For those who do not know what it is, they are the ancestors of MMORPGs. There is no graphics, everything is played in a console by typing commands....
6
votes
2answers
674 views

Architecture of networked game engine

So after working on my game engine for 2 years, I've decided to step into the networking environment. I just don't know if it's a good idea to rewrite the engine, or how much work it will take (but ...
0
votes
1answer
63 views

Synchronize points from UI and server

I am sorry in advance if it's not perfectly clear. I would like to make a game with let's say the following map (in real it will be a 3D globe). Now this map contain point, and each point is a place ...
0
votes
1answer
65 views

Possible patterns for Registering event listeners of game entities with an event queue

I'm trying to integrate the idea of an event queue with a game loop that creates entities and responds to input. Is it better practice to submit entity reaction functions to the queue during input ...
0
votes
0answers
30 views

Unity Client and Multiplayer Networking/Architecture

My background is in Enterprise and SaaS web infrastructure. Zero information about games and how their networking works. I only know about the world of browsers and RESTful APIs. I'm planning on ...
3
votes
1answer
234 views

Handling input in a custom ECS engine

I've been implementing an Entity Component System into my custom toy engine so I can learn more about it. Currently I have the following problem: I can't think of a way of implementing input as a ...
0
votes
1answer
75 views

What engine is used in an introductory game-development course? [closed]

I am preparing a course in game-development. It is a choice-coures for 3rd-year students of computer science, who have working knowledge of several programming languages (C, C++, Java), algorithms, ...
2
votes
1answer
104 views

Should the lobby and game room be database tables or arrays?

I'm designing a lobby which holds all game rooms If a room is empty, it gets deleted by the lobby If a room is full, a new room is created For now the lobby is an array of objects on a websockets ...
1
vote
1answer
83 views

How to make rhythm game long notes in Unity?

I'm making a rhythm game for a university course and I can't figure out a way to make the long/sustained notes. For reference, this is what I mean taken from Guitar Hero: I already have a system ...
1
vote
2answers
108 views

How do the systems find the entities they should operate on in Entity-Component-System pattern?

I have read many articles about ECS patterns. Many of them are clear on what the entity and components are but don't really talk about the system because it "varies" or just use plain English to ...
0
votes
0answers
23 views

How to code a lot of cards in a trading card game java [duplicate]

I want to make a trading card game like Yu-Gi-Oh or Magic. I have a lot of cards in my game and even the user can make new cards. Cards are objects and they have attributes like HP and Mana ,etc but ...
6
votes
3answers
274 views

How to store relations between NPCs?

For an RPG I want to generate a world with lots of NPCs, and the NPCs all have relations to eachother. They can be eachothers parents, children, siblings, friends, bosses, lovers, lieges, vassals, etc....
1
vote
0answers
177 views

Modern OpenGL, 2D only, should I be using uniforms or VBOs for sprite transformation?

I'm new to OpenGL, I'm currently building a 2D game engine. Right now I'm only using one shader as I only draw textured quads (basically sprites). The thing is... I don't know if should I be using ...
0
votes
1answer
49 views

Dividing Data and Logic in Unity

I am currently working on a small side project (as usual), and trying to build up from previous experiences. I have the following elements in the game: 1) Region: ...
-1
votes
2answers
59 views

Does game client size always grow in size after updates? [closed]

Games that are updated in course of their lifetime (through online updates), grow in size and I can understand that new textures, sounds and other stuff takes up space. What I'm interested in is - ...
0
votes
1answer
24 views

Uninitialized Variables with Deactivation of Objects in Game Maker Studio 2

I am currently working on some map generation for my GMS2 game, and I have run into an issue that I absolutely cannot figure out. (I am very new to GMS2, so bear with me). I am working on map ...
1
vote
2answers
181 views

How can I handle scripting-like tasks in my ECS?

So I have been getting more and more into ECS architecture, and I am having a bit of trouble wrapping my head around how to handle custom actions/callbacks. For instance, let’s say I want to have a ...
1
vote
1answer
73 views

What are some gameplay cases where knowing the Z as a result of the raycasting is useful in a 2D setting?

The context is an 3D engine with a 2.5D level format. Like a roller coaster tycoon level, with some other level features added, and layers removed. For example the tile functions have the following ...
0
votes
2answers
114 views

Project organization for a multiplayer client-server game

I'm programming a game 100% in Java but I'm having some issues concerning the final games architecture. I plan on having two separate projects: one that will hold the client side of communication ...
1
vote
1answer
78 views

Why would a game engine developer use both DirectX and OpenGL?

It's very common for cross-platform game engines to support both DirectX and OpenGL, and even Vulkan. Why would a studio want to write abstraction code 2, 3, or even 4 times? OpenGL/Vulkan are ...
0
votes
2answers
40 views

How can I evaluate varying conditions in a Scriptable Object?

I'm new to using Scriptable Objects, so this might just be a bit of confusion. Let's say we have a Scriptable Object that defines the abilities a character might have in the game, and a character ...
0
votes
1answer
59 views

How to manage complex mesh importing in to a game engine

A bit of context: I'm developing a 3D rendering engine and can't really make much more progress until I get some more interesting and complex meshes loaded in to the scene. So far I have been using ...
1
vote
0answers
124 views

How can I approach writing a GUI framework for my game? [closed]

The problem I want to write a simple GUI framework designed for a game, in order to learn the inner workings and nitty-gritty of how GUI 'engines' such as Unity3D's GUI work. I can't find any ...
0
votes
0answers
87 views

Where to create the vertex buffers?

Please note that this is purely an architectural/design question. And sorry for the long post, there are a lot of "thinking out loud" here. I'm working on a simple graphics engine (as a universtiy ...
1
vote
1answer
112 views

Game Metrics for Achievements

So I posted not too long ago looking for an alternative system to what I'm using for game metrics, meaning information I post each update when something specific happens (enemy damaged, killed, a wave ...
0
votes
1answer
112 views

Too many objects to update in db too often

We are creating a RTS mobile game and we face some problem dealing with updating a lot of object in db too often. Our game is a RTS in which players can attack enemies cities an take them. The world ...
1
vote
1answer
104 views

Handling localization strings in a performant game engine c++

I'm wondering what's the approach for handling localization in a modern game engine. Typically I'd reference a string that would serve as a tag (say: AURA_POISON_CLOUD) in the code and then later in ...
1
vote
4answers
116 views

Operating Expenses of Mathmetic Operations

I understand that math operations require more resources/take longer than others when being computed. (e.g. square roots take longer than divisions which takes longer than multiplications which takes ...
0
votes
0answers
85 views

Array-Backed Entity Component System with Component Polymorphism

I'm tinkering with an array-backed ECS in C++ along the lines of EnTT. Components are stored in a struct-of-array fashion where each component type lives in its own homogeneous contiguous memory block....