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

What are the advantages and disadvantages of using pointers to change data in my physics engine?

I am working on an entity-component system, and I am thinking about this communication protocol: The physics component of a game object sends an UpdateMyState ...
0
votes
3answers
151 views

Is it efficient to only store interface pointers for components in an entity-component system?

Let us say that I have a simple architecture, and I have implemented event-based communication between the objects and the components. In this architecture, Game ...
5
votes
2answers
4k views

Understanding Entity Component System

I'm new in game development and I'm struggling to implement Entity Component System (ECS) properly, I have no idea whether I'm doing it right or completely wrong. Basically, I try to implement ECS ...
0
votes
0answers
152 views

Do I need forward declaration for a good message based communication system?

I am thinking about a game engine like this: I am trying to implement message-based communication. Every ReceiveMessage() method processes the ...
0
votes
2answers
134 views

What are some basic zoning guidelines for designing game cities?

I am planning out a fictional game city. Based on the gameplay and story I have decided on several locations which will need to exist. I'm wondering though to what extent I need to take zoning into ...
3
votes
2answers
1k views

How do you store uniform data?

In a general purpose C++ rendering engine, one way of organizing data is to divide mesh data into two classes: the geometry and the material. The geometry class includes indices, vertices, normals, ...
1
vote
2answers
114 views

How can we test a section of a game?

I'm making a clone of an old atari 2600 game, so it's simple, only slightly more complex than the original. I'm realizing that even the simplest of games have different "parts", what is a good ...
1
vote
1answer
123 views

Combat System - Class Objects as Package and Listener

So I've been trying to map out a combat system and I have an idea I'm laying out that I'm looking for a sanity check on, as well as suggestions. The idea is that all things that can do damage (...
0
votes
1answer
49 views

Homing Fireball - Seiken Densetsu 3 style

I'd like to reproduce the fireball spell of Seiken Densetsu 3. The Fireballs don't follow the target directly, but encircle it more or less until they hit the target. I have no idea how to ...
0
votes
1answer
599 views

Drawing in SFML outside of the main function (passing the window over to other fuctions) doesn't work

Why does the drawn Sprite only appear in the Window when drawn from the main-function, but not when drawn from an external function and how can I change this? ...
0
votes
1answer
313 views

What system could I use to identify my entities, when sending data over network or storing them in file?

I have a game engine using an entity-component system (ECS). I serialize the data contained in the ECS by having a system that registers serializers for different component types. I want to create ...
0
votes
1answer
55 views

Class Structure for upgrades that depend on other upgrades

This game involves making buildings that can be upgraded. Sometimes a building's upgrade isn't available until another building is either created or upgraded to some specific level. For simplicity's ...
1
vote
1answer
98 views

Terrain and Path Architecture

I am trying to figure out how to not break the SOLID principles with a collection of classes I am writing. Currently, I have two stacks of classes that cater for editing and rendering Terrain and ...
0
votes
2answers
958 views

Is it a good idea to use a single sqlite database to store all occurring multiplayer matches?

I have a turn based strategy game for desktop and mobile, the game app uses a sqlite database to play local games. There's nothing special about the database design, I have tables to keep track of ...
-4
votes
1answer
78 views

Why isn't this glsl program working? [closed]

Why isn't this glsl program working ? ...
1
vote
1answer
2k views

How do I fix this access violation when I exit my custom OpenGL game engine?

I'm writing an game engine, where the engine is written in a project and exports a .dll file. In another project, in the same solution as the engine, there is a sandbox project which uses the engine. ...
5
votes
2answers
2k views

OpenGL threaded loading

I'd like to introduce seamless level loading which means I need multiple threads. The main thread is for rendering the current scene (or for non-seamless level loading a progress bar) while the other ...
2
votes
1answer
437 views

How should I arrange storage for components referenced in a quad tree?

I like the Unity's entity-component-system approach, I'm working on something similar. However I'm not sure where and how I should store the components. An easy answer would be: "store the components ...
0
votes
1answer
74 views

Separation of game logic - extending game state to include location information?

I'm currently making a conversion of a board game I have - I don't intend to release it, it's merely to sharpen up skills. I'm currently refactoring it to completely separate game logic from ...
1
vote
1answer
233 views

How could I implement origin re-base on my large world server?

I wish to make a game set in space where the world is empty space, mostly empty but continuous (i.e. no sectors with jump gates separating them) and extends to long distances like a few hundred or a ...
1
vote
1answer
292 views

How should renderer class relate to the class it renders?

I am working on making a Pong clone as a practice project. I have a PongState class with members like Ball, ...
0
votes
4answers
80 views

Track first time leveling up

Broad question, but I'm looking for some better ideas. Currently I have a Player class and booleans for hasSeenLevel2, hasSeenLevel3, etc. When I give a player exp I call a checkLevel method that ...
0
votes
0answers
40 views

What are the main reasons to use scripting in games? [duplicate]

I'm trying to understand the appeal to scripting in large games. Is it ease of development by avoiding lower level coding like C++? Thus avoiding the long compile times? It seems scripting doesn't ...
3
votes
1answer
854 views

Make a 2d top down game with round map

Currently, I am making a top down game using Unity. Here is the problem that I’m trying to solve: The player in my game is always centered on the screen, and the since the map is rounded, the agents ...
2
votes
4answers
864 views

What is the best method to share the projection matrix and view matrix with all graphic entity shaders in a custom game engine?

What is the best method to share the projection matrix and view matrix with all graphic entity shaders in a custom game engine? The refer graphic entities have ...
0
votes
1answer
61 views

Assigning jobs to in-game entities to carry out tasks (move object, build item etc.)

I'm not really sure what to call this so I'm struggling to Google for solutions. Basically my game will have resources (wood, stone, etc) that are "delivered" to a point on the map. I want worker ...
2
votes
1answer
537 views

How do I design API-agnostic classes?

I am writing a game engine in C++, or rather, a framework of reusable classes. So far, I have created low-level wrappers for OpenGL constructs. For example, a VBO class, a VAO class, and a texture ...
4
votes
3answers
758 views

Good way to manage multiple game modes?

/UPDATE: I took one of the suggested solutions and tried to implement them. I implemented a BaseGameWorld class that contains the basic tetris gameplay. Every game ...
1
vote
3answers
4k views

Multiplayer game servers architecture

I'm trying to create MMORPG with huge world divided by chunks. I was thinking a lot about servers architecture. I don't want my main game server to have direct access from clients and I do want to ...
1
vote
2answers
175 views

What is a cheap (better free) way to make multiplayer in a shooter?

I'm a newbie indie, so I don't have a budget for a game. But I'm making a 3rd person shooter and I need multiplayer for it. It's a mech shooter, so it won't have very fast movements, meaning I don't ...
1
vote
0answers
427 views

Create a stack driven coroutine based state machine for Unity

I am working on a game where I am using a coroutine based state machine which is mostly a multi class implementation of this link. I am using it because it allows me to create multi frame sequences. ...
0
votes
1answer
147 views

How should you structure your graphics system around your logic system?

C++ & Cocos2d-x, but I think the issue is language-independent. I just recently finished up writing the foundational logic for my game. The way I've decided to keep my logic and my graphics ...
3
votes
0answers
94 views

Design pattern for allowing components to interact with main state machine

I am making a game using Unity in which I have a main game state machine that controls the current game scenario. My question is how do I handle communication between different components of the game ...
1
vote
2answers
677 views

How can I architecture the cards and boards of this board game?

I want to create a board game (at least it's structure and engine, not the graphics), and since It's the first time I do this I don't know where to start. It's a turn based strategy card game where ...
1
vote
2answers
312 views

How to create an API for event-based, modular Java game?

I don't really know how to explain what I am trying to do that well, but yeah I'll try my best. I'm currently creating a game with LWJGL 3, and I hope to make it event based and rather abstract as to ...
0
votes
1answer
685 views

Finite State Machines for Enemies (AI vs. Entity States)

Finite State Machines are a great tool for simplifying a system where an Entity has many states it can be in with different conditions that determine what state to transition to. This works well for ...
0
votes
1answer
96 views

How do I go about implementing different behaviors on items?

How do I go about implementing different items with different behaviors? I plan on having an inventory where those items are stored, but I can't figure out how do I go about implementing different ...
0
votes
1answer
168 views

How could I implement programming as a mechanic?

I am wondering how I could manage to execute programs made by players in my game via some sort of in-game computer. I have been trying to figure it out but I have no idea how it is even possible. ...
2
votes
1answer
158 views

How to stop diagonally in an event driven input system?

Example scenario: Assume 2 dimensional top down movement system. Given that I have 4 directional keys ( UP / DOWN / LEFT / RIGHT ), I am able to move in 8 different directions 4 perpendicular and 4 ...
5
votes
3answers
555 views

Alternative in-game dev console implementations

I'm developing a dev console for my game. Currently I have a simple parser which is basically a regex which accepts words with dashes and dots (ie. list, ...
16
votes
6answers
8k views

How do videogames store information offscreen?

I'm trying to make a videogame from scratch, but I'm really new to this and keep running into basic issues. Most importantly, how do videogames store offscreen information? What I mean is, how does ...
0
votes
1answer
893 views

Game engine + editor + gameplay dependency

I've tried to find my answer here but the other "similar topics" were different or just wasn't able to find the right one. This is mainly a design (and some c++) question about the dependency between ...
1
vote
1answer
108 views

What architecture should I use to support extensions in my game?

What is the proper architecture for the game, that support extension modules, written in other languages? I mean I have a simple game - written in Groovy (...
0
votes
0answers
360 views

Sharing game code between client and server

I'm having a code design problem involving synchronization between the server and clients. I have a class GameWorld that handles all of the simulation details (...
0
votes
1answer
66 views

Values or Struct-Like Location Class?

I'm currently working on a 2D RPG, where the player character moves on a tilemap but is not constrained to the individual tiles. Every tile in a room is referred to by x and y coordinates to an Array. ...
4
votes
2answers
1k views

Implementing Story and Quests in RPG

This question in very similar to this question, however I am still confused about how one would implement a story and quests in a finite state automaton RPG. This is my first game that I am making (...
2
votes
1answer
66 views

Behaviours: Should I always return a reference to the behaviour on its methods? [closed]

I'm writing a small game to sharpen my programming skills, and I've chosen to use behaviors (that basically is a class that modifies its parent, to do things like movement, damage and stuff) to avoid ...
5
votes
2answers
2k views

Separating game logic and rendering

I know this has been asked before but I would like some things cleared up. I understand that game logic and rendering should be separated but my problem is more or less how? For instance, should the ...
7
votes
2answers
2k views

How to design a multi-step game menu system?

I am getting started with game programming. I am designing a game that starts by taking you through a series of menu screens. I am interested in learning how this is typically structured in ...
4
votes
0answers
105 views

How can I bundle assets into an executable from my Game Maker-like editor?

I am attempting to implement a simple "game-maker" solution. I'm working with Visual Studio, in C#, using MonoGame. I'd like the games my editor creates to be stand-alone executables, with their art ...

1
5 6
7
8 9
25