The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [architecture]

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

Filter by
Sorted by
Tagged with
1
vote
2answers
103 views

How do you make sure that a component can be applied to very different entities?

I know there's lots of posts about this sort of thing, and I've read a lot of them, but there's some gaps that I can't seem to fill in my head. Specifically, I've been reading about the SOLID ...
2
votes
2answers
1k views

How to manage state in a component-based game engine?

I'm working on a small, data-driven game engine with some friends. We use GameObjects (a.k.a. Entities, Actors, or whatever it is called in your favorite engine) to represent every entity in the game....
3
votes
0answers
45 views

How to Store AI Knowledge about the Game-World for AI Decision Making

I have a game-world with a fair amount of AI that have some Senses, like vision, hearing, touch, smell, etc. But I'm not sure how to put that information in a single place for the individual AI to ...
0
votes
0answers
11 views

Asset Duplication in AssetForge

Is it possible to duplicate assets in AssetForge? For instance, if I build a house and want to duplicate the entire house to another spot withti
0
votes
2answers
64 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. ...
0
votes
0answers
31 views

Abstraction for dialogue and quests in web game

I'm not very experienced with web languages, but I know a little bit of JavaScript. I'm working on creating a text-based rpg in HTML and need a way to modify dialogues for main story or quest ...
-1
votes
0answers
35 views

Looking for some specific Item id's [closed]

I'm trying to find id's to certain items, I've found a ton of useful id's in the forums. but some items i am looking for are Roof id's Bridge id's Sqare post frame id's Wall id's for solitude, ...
1
vote
1answer
59 views

Where should I put units and items in a squad-combat ECS-based game?

So I'm working on a game where squads of varied units would explore, fight, trade and build on an overworld map. Combat would be automated more or less, and happen on the overworld. Basically, ...
0
votes
0answers
19 views

Scripting's relations to RAM

So I'm still new to making games that have a baseline for computer resource usage and I'm confused with my question. I can't find an answer anywhere on the internet so I'm here. Simple Question: <...
3
votes
1answer
67 views

How to make the player unable to change some of the game elements?

I am making a text turn based RPG fighting game in which you create your own spells. You also share them as JSON files with your friends. Sharing is required to win. The game is designed so that it ...
1
vote
1answer
77 views

What's an acceptable delay between a player's action and the effects of the action being visible?

So, I'm creating a game where all the systems push events onto the event queue. Those events are then dispatched at the start of the next frame. This works fine, but there are some situations where ...
8
votes
1answer
990 views

Use floats or doubles when writing mobile games

I know for shaders, floats should be used because they are the optimal choice for performance. Doubles are slow and use more memory which isn't ideal for shaders. While floats are less accurate and ...
0
votes
1answer
43 views

Is it bad to store other memory in a system, alongside the components buffer using an Entity-Component-System architecture (ECS)?

I'm currently writing a simple ECS architecture for an engine and I have the fundamentals in place but after reading up on this architecture, it is designed in such a way that the memory is contiguous ...
2
votes
1answer
63 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
1answer
32 views

Can Mobile Games use Fragments instead of SurfaceViews?

All the tutorials of mobile games for android (such as this one), use the to display game objects. Most other applications tend to use an ...
0
votes
1answer
36 views

Does a thread in a mobile game serve the same purpose as a view model in a mobile application?

I'm trying to confirm up my understanding of the coding differences and similarities between mobile game design and mobile app design for Android devices using Java/Kotlin. ~~ ~~ ~~ In mobile app ...
0
votes
0answers
27 views

Software Architecture to link several individual projects with one menu/lobby? Please critique my planned architecture

I'm working on a project with a large and spread out team. Think of the project as like a way to showcase different people's work. Each person is working on an individual experience that will need to ...
4
votes
1answer
140 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
130 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
111 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
2answers
122 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 ...
4
votes
2answers
203 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 ...
0
votes
1answer
91 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 ...
1
vote
1answer
215 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 ...
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 ...
1
vote
1answer
40 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 ...
0
votes
2answers
140 views

How do i manage skill collision target in Unity?

I wanted to make a skill that can be used by both Player & Enemy. How do I make it such that the skill will not be colliding with the owner/caster or colliding with both? One stupid way I have ...
0
votes
0answers
56 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
17 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 ...
1
vote
1answer
621 views

Libgdx: Check collisions in Stage among actors

My goal is to check collisions among the actors that are in the Stage. My question is: is it necessary to maintain a list for each type of actor I have? Doing that I get 3 problems, 2 bad design ...
1
vote
1answer
168 views

Box2D simulation running slower on lower FPS(even when the desired FPS is lower than the actual)

I´m playing around and trying to make myself an easy platformer using the Box2D physics, before that I was not using it and was using my own physics implementation(just simple movements with timestep)....
3
votes
1answer
85 views

Encapsulating parameterised prefabs

I'm currently using the following general pattern for most of my configurable components (i.e. MonoBehaviours): ...
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
162 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
84 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
105 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, ...
0
votes
1answer
55 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
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
1answer
135 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). ...
6
votes
2answers
687 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 ...
1
vote
3answers
251 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....
0
votes
1answer
142 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
89 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: ...
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 ...
1
vote
1answer
109 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 ...
12
votes
3answers
5k views

Pure functional programming and game state

Is there a common technique to handle state (in general) in a functional programming language? There are solutions in every (functional) programming language to handle global state, but I want to ...
30
votes
11answers
8k views

Alternative to Game State System?

As far as I can tell, most games have some sort of "game state system" which switches between the different game states; these might be things like "Intro", "MainMenu", "CharacterSelect", "Loading", ...
0
votes
0answers
34 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
291 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 ...