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

learn more… | top users | synonyms (5)

0
votes
1answer
36 views

Proper system architecture in a game engine?

This is my first time attempting to create a game engine. I came across a theoretical problem and would like to solve it before implementation. Right now I have a WindowSystem, which opens the window, ...
1
vote
0answers
21 views

Renderable object abstraction

In my engine I have 2 types of 2D renderables: sprites and groups (and maybe primitives later). Sprites are just textured quads and groups are multiple renderables grouped in a single object. I have ...
3
votes
0answers
21 views

How to imbed one Unity project into another?

I'm creating an AI course in Unity. With regard to my question, there are two important properties of the course: Each tutorial is a separate Unity project that can be loaded up, allowing the ...
0
votes
0answers
35 views

How is a game's object data loaded in a game engine? [on hold]

In a Game engine like unity with Editor support how excatly are game objects like scenes, cameras, math objects created and loaded? I have only ever worked with libgdx as a game engine, where we need ...
0
votes
0answers
19 views

What's the best book to give you the math and physics background to make your own game engine? [on hold]

I want to make my own game engine, but could use a refresher on math and physics. I already know some stuff (like how to multiply matrices, integrals, differential calculus etc.). I've narrowed my ...
0
votes
2answers
73 views

How do I make a game over screen like Temple Run or Subway Surfer?

When you die in one of these 2 games I took screenshots of (Temple Run and Subway Surfers), what exactly comes up to say "Game Over" and posts your score and all-time high score? Is it a different ...
2
votes
1answer
63 views

How to code a multi level isometric map?

I have already worked with isometric grids in the past, but in my current project I found an issue I am not sure on how to solve. I am trying to produce something similar to what's in the below screen:...
0
votes
2answers
77 views

2D top down RPG animation architecture problem

I have a problem with my sprite animations right now. I have different animations and sequences for each character so an specific archer might do a ranged attack in which he just plays one animation ...
-7
votes
0answers
68 views

How to jump straight into 3D game development without any prior knowledge [closed]

I want to know how can i directly get into the game development world. Currently I've exactly "no" knowledge of developing games. I've never even built a 2D game; and I wanna jump start right into 3d ...
2
votes
2answers
35 views

Handling input through callbacks or through game loop?

I've tried to figure out how to handle player input properly, but without luck so far. As far as I have figured out, I can either: Call the respective methods directly through the callback fired ...
0
votes
0answers
11 views

How should I structure power ups if they come in all shapes and sizes? [duplicate]

There are Items. These Items can hold multiple enchantments. These enchantments can do widely varying things. A few examples: Boots: Double Jump Sword: Poison Damage Helmet: Increased Experience ...
-1
votes
1answer
44 views

How can I handling rendering of entities with an entity/component system?

I'm implementing an entity system in a game engine which is based on the Artemis framework. My question is, how can I wrap an existing rendering engine (like Ogre or Irrlicht) under this framework? ...
1
vote
0answers
40 views

Modern examples of Multiplayer Network Architecture [closed]

There's a lot of documentation on Multiplayer Network Models for games from the early 2000's (Quake3, Unreal, Counter-Strike, Source Engine) which go through concepts such as client-server ...
3
votes
1answer
283 views

Data structure to store breakable parts of a mesh

I have a wall mesh that is divided into destructible pieces. As it gets destroyed, the wall can collapse into separate objects with physics that can be destroyed as well. (Cut the wall in half ...
7
votes
2answers
325 views

How do I avoid writing Manager classes?

I seem to keep reading it's a bad idea to use XxxManager style classes in game engine programming, yet even when I try to avoid their use I always end up with something that holds all the actors/...
1
vote
0answers
25 views

Instanced based game with multiple node instances

I have a nginx load balancer with 4 nodejs instances behind it, and one Redis server to share certain memory. My game is an instance game, similar to Diablo 2. Players can create "games" if you will ...
1
vote
1answer
67 views

Entity-components pattern and memory management

I indent to use a level-entity-components hierarchy in my c++ game engine where level is just a placeholder for entities. However, since I'd like to setup all the levels at once (and thus entities and ...
3
votes
0answers
89 views

Tick frame: update order problems

Sorry, it's a bit long story but I hope you can help me. First of all: I have an entity class called SceneObject. The SceneObject has components (eg. RenderableMesh, Camera) and transformation data (...
1
vote
1answer
83 views

Targeting logic for 100.000 units army

I am making an army fight for my website armyfight. There can be fights of hundreds of thousands units. I am looking for better unit targeting. in jsfiddle is an example. var enemy = { 2: { ...
0
votes
0answers
28 views

Platformer command queue - not sure how to proceed

While trying to figure out how to implement platform agnostic input handling for a platformer, I've discovered the command pattern and I liked the idea so I wanted to take it a step further. I got ...
3
votes
1answer
70 views

Ability/Skill Data and Method Structure (C#, Unity3D)

So I've come to design my game which players will be having a unique set of skill or ability to come with. I can store skill name, mana cost, cooldown, etc in database which each skill have in common, ...
0
votes
2answers
132 views

TCG Board Architecture

While I was, sort of, studying the various TCGs around, concepts, similarities, differences and how they could be implemented, if designed to be in a virtual environment (e.g. PC game) I obviously ...
8
votes
1answer
260 views

Entity component system - game progression

I'm quite new to game development (but not to programming) and I'm trying to figure out what would be the best way to handle inter-world communication. What I mean is this: I've been reading about ...
1
vote
0answers
63 views

When NOT to use ECS architecture? [closed]

I'm familiar with the notion of entity-component-system architecture, and its advantages over traditional class trees. That being said, are there scenarios where one wouldn't want to use entity-...
2
votes
0answers
61 views

How can I connect multiple explorable regions into one large map?

I am planning a 2-D science fiction game involving spaceships. A major thing that I am having trouble figuring out is how to create a 2-d array of smaller maps that the player can explore. My ...
2
votes
0answers
38 views

Moving Draw functions out of GameObjects

This is basically the issue as in Tactics for moving the render logic out of the GameObject class with the topic already discussed here and here However I'm not really satisfied with the given answers....
1
vote
1answer
46 views

Global variables in a multiplayer environment

I would like to know what's the best approach to solve this problem. In a racing game, i need to create the final result chart. In a single environment i've tought something like: private string [] ...
0
votes
0answers
30 views

NodeJS timed update approach

My game has users building buildings, recruiting units, trading resources and sending attacks. All of this functionality takes a certain amount of time to happen and I'd like help with deciding on the ...
1
vote
1answer
44 views

game server - fault tolerant

If you have for example an MMO with 2000 players, and players are constantly removing / creating / swapping items (and doing some other important things that can't be lost). If the updates are saved ...
0
votes
1answer
69 views

Is window creation decoupled from game engine?

I'm new to game development, and I was wondering about a architecture question. The window creation code in C++ is given by doing the following: Fill out a WNDCLASS struct Register the window class ...
1
vote
1answer
39 views

How can I reduce writes-per-second when saving player data to a database?

Consider a game where the player has some profile or save data stored in a database. What I want to understand is, for things that effect the users score or level, there could be so many factors that ...
1
vote
0answers
40 views

How could I achieve an iOS high detailed level design for a platformer?

I'm seeing a lot of games that use a predefined and repeating set of tiles for their level (like FlappyBird or the Super Mario game series). I'm a graphics designer so I would like to create levels ...
0
votes
1answer
59 views

How to desing an RPG system with regard to PVP [closed]

When you design a RPG system focused on PVE, one usually goes "mob of level X has Y hp and Z damage". How about when we do PVP with multiple classes? Lets say we go Diablo, so we have STR/DEX/INT/VIT,...
0
votes
0answers
36 views

What are the benefits of decoupling the input system from the gameplay system?

I want to decouple as many systems as possible from the main loop. Probably the most beneficial would be to decouple the renderer and the gameplay system. But I am wondering about what I should do ...
0
votes
2answers
140 views

Backend for data-driven multiplayer game

I am working on a match-based (5v5) multiplayer steam game that is similar to TF2, LoL, Dota 2, etc. I am planning a data-driven approach where character/abilities/items/etc are defined in data (JSON)...
0
votes
1answer
96 views

How should my engine Identify objects

I'm making a fairly basic openGL 3D engine, at the moment, when you load an object, you would write manager->LoadObjFile("cube.obj"); manager->AddParent("uvmap.bmp", "cube.obj", "cube", glm::...
3
votes
2answers
108 views

Designing ability interaction system

I am making a turn based game where player chooses a team of heroes with specific abilities for each of them. (ex. stun one enemy, deal 20 damage to all enemies, heal 10 HP to one ally,...) The design ...
0
votes
1answer
59 views

What is the exact difference between the game and game engine? [duplicate]

I thought game engine are something like Unity or Unreal. They have a editor with scene editor, some Physics library, some scripting editor and tools to improve the workflow of developer. Furthermore, ...
18
votes
11answers
4k views

How do I ensure a piece of code runs only once?

I have some code that I only want to run once, even though the circumstances that trigger that code could happen multiple times. For example, when the user clicks the mouse, I want to click the thing:...
3
votes
5answers
368 views

How can I make this day/night cycle computation repeat?

Here's my code for a day/night cycle. I have it set up so that when time (Statistics.duration) is the right number, the light levels switch. It works great, but I'm at a loss for how to make it work ...
0
votes
0answers
33 views

what is an elegant way to add a border to a hexagonal grid

At the moment in my hexagonal map generator, I am working from the idea of generating the grid, doing some nasty conditional logic to check if grid position is within the scope of the border and ...
1
vote
1answer
133 views

How to implement specific custom events in an Event Condition Action (ECA) game system?

A while ago I implemented a simple event-condition-action system for my game trying to emulate the Warcaft 3 trigger system (in a small scale, of course): So far, it works fine, but there is ...
4
votes
4answers
214 views

How decoupled should game logic and rendering be?

From a data perspective, how decoupled should game logic and rendering be? How much does it have to know about each other? Take a look at the following example. I'm going to use javascript because ...
1
vote
1answer
49 views

Allowing a unit to equip only certain types of weapons

I'm making a FireEmblem style game, and I am working on items at the moment. I have a Weapon class from which Sword, Axe, etc. are derived. I also have character classes like Swordsman, Mage, etc. I ...
0
votes
1answer
43 views

How to efficiently organize different game zones with different functionality?

For now I have a list of basic data class like position in game world, dimensions, type and stuff like that, but since I am starting to implement their functionality it seems kind of a bad pattern, I ...
0
votes
1answer
118 views

Best way to structure SDL2/C++ game? [closed]

I was reading some SDL2 tutorials and I noticed that you need to pass your window surface handle to any drawRect calls. Should I create a global surface handle or pass the handle by reference into ...
1
vote
1answer
70 views

Managing game states (states flow, controlling the state machine…)

I am currently struggling really bad to make the game states management. Before we dig into the problem, I must point out that I do know about state machines, I do have both implemented (states and ...
3
votes
1answer
147 views

Smooth Scene transitions with SceneManager and additive scene in Unity

I'm trying to work with the new SceneManager class with Unity, I'd like to have smooth transitions between scenes. Currently I suppose that the only way to do those transitions is to manually ...