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

learn more… | top users | synonyms (5)

0
votes
0answers
24 views

Different types of game object systems [on hold]

When it comes to game programming we've (most likely) all heard of the basic OOP-based game object system which uses inheritance and similar to achieve a "hierarchy" of entities and functions. Some ...
4
votes
2answers
75 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, ...
0
votes
0answers
26 views

What gameengine to use for the purpose of modeling a 3d environment (with little game mechanics) [closed]

I have a project in mind, that is loosely tied to gaming and I wasn't able to find clear answers for my specifications online so far (or I failed at searching for the right topic due to lack of ...
0
votes
0answers
32 views

Single state tree

It's probably very silly question but I'm even not a newbie in gamedev. Because of pure curiosity, I wonder if in this amazing world (totally different than mine until I create things for web mostly) ...
1
vote
2answers
74 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 ...
0
votes
0answers
29 views

Best practices for indoor lighting for Archviz applications in Unity3D 5

I'm trying to develope an archviz application for a building and I'm not an expert at Unity but i managed to learn and build functionalty of scenes. My main problem is enlightening rooms that cannot ...
0
votes
0answers
34 views

Apparently Bizarre Behaviour of Instantiate() and if()

To begin, let me note that I have scoured this website for answers that may speak to my situation and have not found any that immediately satisfy my curiosity. In a very basic game, I have written a ...
0
votes
0answers
31 views

How to handle entities when switching scenes in an Entity Component System

I originally asked this question on Reddit, but it did not get much traction. I thought it might help if I tried another audience. https://www.reddit.com/r/gamedev/comments/5bnttf/...
0
votes
1answer
37 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
29 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? class Class { private: sf::Sprite ...
0
votes
1answer
51 views

Best practices for simple physics?

looking for most optimized ways of handling simple physics. By "simple" I mean not more than 1-2 actions per object, and most algorithms are linear. For example, I have an UI element that implements ...
0
votes
1answer
47 views

Interfacing Entity component systems with networking/saving/serialization

I have a game engine using ECS. I have figured out how could I serialize the data contained in the ECS. Simply Have a system that registers serializers for different component types. I want to create ...
0
votes
0answers
43 views

A central game controller responding to events vs global event system

Say you have combat mechanics and your projectile object fires an EnemyHit game event. You'd like to hook up a UI element indicating damage numbers. I've got two options: Receive that event in my ...
0
votes
1answer
39 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
60 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
1answer
52 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 ...
-5
votes
1answer
49 views

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

Why isn't this glsl program working ? #shader vertex #version 430 layout (location = 0) in vec4 position; layout (location = 1) in vec3 normal; layout (location = 2) in vec2 texture_coordinate; ...
0
votes
1answer
80 views

Access Violation on Application Exit

Currently I'm writing an Engine. How I have it right now is that, the engine is written in a project and exports a dll. On another project in the same solution as the engine, there is a sandbox ...
4
votes
2answers
162 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 ...
1
vote
0answers
174 views

ECS + QuadTree component storage

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
38 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
0answers
87 views

What techniques do MMOs use to support extremely large game worlds? [closed]

Most popular game engines available to public access like Cryengine , UE4 , unity etc have very small map size compared to MMO and MMORPG's out there. This question is specific to unreal engine 4 but ...
1
vote
1answer
45 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, Paddle, Board and Score. I want to structure my code so that each object doesn't have to ...
0
votes
4answers
54 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
33 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 ...
1
vote
1answer
103 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 ...
0
votes
4answers
65 views

Passing Globally View Matrix and Projection Matrix

This is a general question, and can have multiple answers. However, when doing engine development, what is the best method to share the projection matrix and view matrix with all graphic entity shader'...
0
votes
0answers
27 views

How to keep user logged in in web-based game

Imagine web-application (eventually game) built according to the following architecture: The Back-end consists of a service, that is loading the world and managing the world attributes and entities. ...
0
votes
1answer
39 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 ...
1
vote
1answer
88 views

Design API-agnostic classes

I don't know if the title is clear enough - well, i'll have to explain what i mean anyway. Suppose i am writing a "game engine", or rather a framework of reusable classes. What i've done so far was ...
1
vote
2answers
211 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 mode extends this base class. If any ...
1
vote
3answers
263 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
3answers
137 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
73 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
87 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 ...
2
votes
0answers
39 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 ...
0
votes
1answer
100 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
75 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
121 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
59 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 ...
0
votes
0answers
82 views

java server + javascript client via websocket

I'm thinking of 2D (with camera 'from the clouds', to earth - like civilization) MO, but easy to expand to MMO live game. I already have tomcat, and websocket connection to javascript and game must be ...
5
votes
3answers
135 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, 1.0, list -i) or simplistic arrays and maps (...
16
votes
6answers
7k 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 ...
-1
votes
1answer
147 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
92 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 (basically Java), heavily relying on Game ...
0
votes
0answers
89 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 (positions, velocities, projectiles, what ...
0
votes
1answer
51 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
181 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
56 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 ...
4
votes
2answers
277 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 ...