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

learn more… | top users | synonyms (5)

0
votes
1answer
80 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
24 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
31 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 ...
8
votes
1answer
262 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 ...
2
votes
1answer
72 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
0answers
35 views

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

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

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

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
76 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 ...
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
2answers
79 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 ...
3
votes
1answer
284 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 ...
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
47 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
41 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 ...
7
votes
2answers
330 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 ...
3
votes
2answers
243 views

How to organize level blocks in an Infinite runner

I'm working on an Infinite Runner game. I have created many level blocks(sections) with different obstacles and pick-ups for the player. They are positioned and placed manually, in such a way, to give ...
1
vote
1answer
111 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 ...
2
votes
2answers
151 views

Unity : callbacks in component based design

I am trying to use component based design in Unity3d v5. If I have 2 separate C# scripts attached to enemy ships like below: Script1.shipDead() - Remove game object and show explosion animation ...
3
votes
3answers
1k views

Visitor-pattern vs inheritance for rendering

I have a game engine that currently uses inheritance to provide a generic interface to do rendering: class renderable { public: void render(); }; Each class calls the gl_* functions itself, ...
11
votes
2answers
936 views

What are the benefits of using an entity ID system?

I'm currently reading the book Programming Game AI By Example. The book mentions assigning unique ID numbers to each entity in the game. Often when entity A needs to contact entity B, A gets a ...
0
votes
1answer
84 views

Resetting scene state

i was wondering what are the best practices for restarting the game, say for example in a platformer game when you die the game restarts and you have to reposition all the characters or reset the ...
2
votes
2answers
224 views

Data model design using Core Data and Spritekit

I have a entity called Item, and every item can have two or three bonuses... What would be a good model design in this situation. I can think of something like: To have many optional attributes ...
0
votes
2answers
269 views

Good design for skills (heal,dmg etc)

I'm trying to create a good designed "skill system" for my game, but curious if anybody knows a good design? Skills can Heal,Damage ofc, they can be single target,multiple(chain), AOE. Instant dmg/...
5
votes
3answers
671 views

How to handle collisions without ugly conditionals and type checking?

(I asked a similar question, but this one is far more specific). How can I handle collisions without having to do a lot of type checking and if statements? People here suggested that when spotting a ...
7
votes
2answers
213 views

Good techniques for syncing gameplay actions to specific animation timings?

So I've come across an issue in the game I'm working on, but it seems to be a pretty fundamental thing that probably comes up in a lot of games. My game requires that some gameplay function occurs ...
0
votes
1answer
56 views

FSM AI design with no accept states

I'm new to game development and design, I've been looking forward to doing FSM AI design as it seems interesting to me, but I have a question that I see no answer for in the internet. I've seen FSM ...
15
votes
4answers
545 views

Can I use feature creep to my advantage?

Can I use feature creep to my advantage? Every time I prototype a game, features are inadvertently added. This happens either through coincidence, or it happens to be easy to add based on existing ...
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 ...
1
vote
1answer
47 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
23 views

Component systems: No inheritance hierarchy at all, or a basic one? [duplicate]

(I asked a similar question, but it had more questions inside it and I feel it wasn't clear enough, so I'm opening a new one). Until recently I implemented all my games using an inheritance hierarchy....
3
votes
4answers
241 views

Architecture design in “buff-heavy” game? [duplicate]

I've been trying to wrap my head around this architectural design problem. Think of a game that has lots of spells and buffs (World of Warcraft, Diablo II etc), i.e. spells may cause buffs on ...
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 ...
8
votes
3answers
2k views

Is Domain Driven Design good for games?

I've just read about Domain models and it enlightened me since I've been developing a game that has a class which only holds data (few behaviors/methods). I assigned the job of handling these classes ...
2
votes
0answers
62 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
3answers
1k views

Rendering order in an Entity System

Say I use a basic ES approach, and also inside Systems I hold lists of all entities that Systems are required to process. How do I maintain this list of entities in desired rendering order, i.e. for ...
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 ...
3
votes
0answers
90 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 (...
0
votes
0answers
29 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
71 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, ...
1
vote
0answers
64 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
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....
7
votes
4answers
1k views

Any learning/studying material for C/C++ that use game programming as learning context out there? [closed]

As most of game programming is done - I read on this very site - in C/C++ I was wondering if there is any learning/studying material for C/C++ that would target specifically game programming. I am ...
4
votes
3answers
269 views

How to understand huge code bases? [closed]

I read about game loops, read tutorials of simple games like Asteroids and programmed them by myself. Nevertheless if I try to start reading code of a game with many many thousand lines of code, I ...
0
votes
2answers
83 views

How are Objects rendered or updated, when there's a Pool class?

I have a State (Title State for example), that has the ResourcePool (getImage();getSound(); etc.) and a list of the GameObjects. How do GameObjects get access to the Resources in the Pool they need? ...
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
70 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 ...