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

learn more… | top users | synonyms (2)

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
89 views
+50

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
59 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
1answer
47 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
18 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
47 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, ...
6
votes
0answers
187 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 ...
0
votes
0answers
34 views

How to handle rooms in a lobby based MMO server architecture?

I'm planning to develop a room based MMO server for an HTML 5 game. The architecture is easy to figure out how to handle things when the server is a whole, and not seperated to rooms. But I can't ...
1
vote
0answers
40 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 ...
1
vote
0answers
36 views

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

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 ...
3
votes
2answers
206 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 ...
2
votes
0answers
32 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 ...
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 ...
0
votes
0answers
27 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
99 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
42 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
61 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
36 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 ...
8
votes
2answers
4k views

What should be contained in a game scene graph?

Would you help me to clarify, please, what what exactly should be contained within a game scene graph? See the following list, please: Game Actors? (obviously yes, all the objects changing state ...
1
vote
0answers
30 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
52 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 ...
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
121 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 ...
0
votes
1answer
91 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", ...
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 ...
0
votes
3answers
181 views

Correct architecture for weapon class in RPG

So, I'm a little stuck on what the best way to implement weapons is. The problem I'm running into is, what exactly is a weapon. I have a Player Class that has an attack method. public class ...
4
votes
4answers
189 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 ...
3
votes
2answers
100 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
52 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, ...
23
votes
2answers
13k views

What is the standard C# / Windows Forms game loop?

When writing a game in C# that uses plain-old Windows Forms and some graphics API wrapper like SlimDX or OpenTK, how should the main game loop be structured? A canonical Windows Forms application has ...
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
130 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 ...
3
votes
3answers
131 views

Is it a bad practice to add helper methods if the class is intended only for data? [closed]

For example, if I have something like: class ItemData { public int cost; public int level; ... public List<ItemData> childItems; } And I'm aiming to separate ...
48
votes
10answers
14k views

Game State 'Stack'?

I was thinking about how to implement game states into my game. The main things I want for it are: Semi-transparent top states-being able to see through a pause menu to the game behind Something ...
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 ...
9
votes
4answers
1k views

“Time Control” in a 2d Platformer

I am making a 2d platformer where the player can press a button, and restart the level, only their previous character will also run the level at the same time, like they are traveling back in time. I ...
3
votes
4answers
606 views

How do I deal with scale of the universe when generating a simulated universe?

I have a dataset of 100,000 actual stars. I wish to create a game where I can fly between the stars and fly up to them and click on them etc. How do I go about dealing with the problem of the scaling ...
1
vote
1answer
62 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 ...
0
votes
1answer
49 views

Can Soomla directories be safely moved one directory down in Unity?

I'm integrating in-app purchases in my game. To do so, I chose to use Soomla (http:soom.la) asset. I use the free version registering for the grow bundle. I've downloaded a unitypackage named ...
0
votes
0answers
32 views

Unity State machine behavior practice

I have few scripting design question regarding the SMB. I am excited to apply the state machine pattern after learning about it to my players and monsters alike and was so happy that SMB is exactly ...
3
votes
2answers
1k views

Does it make sense to use Lua scripting in a game developed in Python? [closed]

Well for C++ written games using Lua scripts for easy changing ai, quets etc is very reasonable and it's common. However now I'm going to write a game in pure python and I don't know if I should use ...
1
vote
5answers
2k views

Most efficient language for rewriting a tile-based board game as a video game? [closed]

I've been working on a hex-based board game. Every time I make changes, especially changes that require redesigning the map, it takes a good chunk of time and money. It might be more efficient to ...
0
votes
0answers
50 views

What is the best way to represent a large field of objects while using minimal resources?

I have recently started to plan a project in Unity that will be for android. I have a database that consists of over 150,000 stars (may trim this down if I/O cripples the overhead). The game will ...
1
vote
1answer
225 views

Client/Server best way of telling client which player it is

I'm making a client/server, everything works grand its very simple, a simple login system, ID, empty variable and the X and Y positions of the player. Should my server tell my client who it is? and ...
0
votes
0answers
40 views

Java - Component Based Architecture applied to Entities

I've recently been getting my game a lot more of functions for the entities: growing, IA, colours depending of season, position, magic, teleportation an d a lot more. The problem was that for ...
0
votes
0answers
146 views

Game loop architecture using WPF(MVVM) and C#

Could i get some suggestions on how to implement a game loop whilst using WPF(MVVM) and C#, I am a professional developer and understand the technology well. The game loop usually contains a Init(), ...
2
votes
1answer
90 views

Websocket Scalability w/ Player Skills

About 8 months ago I made this thread. And received a lot of valuable information from the community. I have switched to nodejs since then and am finishing up my game, but am deeply concerned about ...
1
vote
1answer
112 views

Relation between game systems and components in a component-based architecture?

Based on a question I previously asked here regarding to decoupling input from other components of an entity I developed a small component architecture on top of XNA to understand how everything works ...
16
votes
2answers
2k views

RTS game unit structure

I want a way to make a lot of different units without having to program stuff like moveTo and Attack actions more than once The way I see it, there are 2 ways I can do this. A single generic Unit ...
5
votes
3answers
303 views

Should I store game settings in my game data class?

I'm working on a small-ish 2d fixed shoot 'em up for iPhone. I have a master Game object that stores lives, score, current level, etc... The game will have some other persistent attributes like ...