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

learn more… | top users | synonyms (5)

3
votes
2answers
208 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
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 ...
1
vote
1answer
101 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 ...
0
votes
1answer
50 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
1answer
173 views

Database for a diablo 2 like item system?

Diablo 2 has a very sophisticated item system and I want to create something similar. But I am having a hard time getting the architecture right. In Diablo 2 most different kind of gear has different ...
7
votes
0answers
244 views

How to cache resources in my homebrew rendering system

Background: I am designing a simple 3D render system for an entity component system type architecture using C++ and OpenGL. The system consists of a renderer and a scene graph. When I finish the ...
6
votes
0answers
197 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 ...
3
votes
0answers
73 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 ...
2
votes
0answers
51 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
33 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 ...
1
vote
0answers
32 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 ...
1
vote
0answers
94 views

Drawing objects in view of camera only in XNA/MonoGame

I am working on a Tower defense style game on mobile that uses a tile map and I am trying to determine the best way to draw overlays of those tiles. In my game, I go into build mode to build towers. ...
1
vote
0answers
43 views

Facebook Canvas (web) Game for Desktop & Mobile Browsers

as the title suggests - I am about to develop a game for FB canvas. Will the game support mobile and desktop or do I have to create two different project/game setups for this? thanks
1
vote
0answers
75 views

Browser Game - Model or not Model

I'm planing on making a browser game just for fun and to improve my skills, but I have an issue regarding the Software Architecture of the game: I will be using an ORM to communicate with my ...
0
votes
0answers
10 views

RTS layers management design

So in case you didn't know, RTS games designed in such way, that there are two separate game loops, or layers, each running at different frequency. These layers are: logical layer, or simulation ...
0
votes
0answers
22 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 ...
0
votes
0answers
28 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 ...
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
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 ...
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 ...
0
votes
0answers
51 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 ...
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
152 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(), ...
0
votes
0answers
96 views

What is a good way of handling shaders?

I'm currently reading this book and are at the chapter about the rendering subsystem of a game engine. Now, the book suggests that a material is a structure that provides information on how to shade ...
0
votes
0answers
39 views

Implement Special Effects triggered at certain moments in game

In my turn based RPG/Puzzle game I planned to have different Special effects, which enemies, weapons and armory can have. So for example an enemy can have a "poison" effect, which has a certain ...
0
votes
0answers
34 views

Deal with double coordinates and graphics

I want to draw some vectors and few sprites in a 2D world.Problem is that they should be precise. For example a vector has position (5000000.65,556666). That depends on user. He might want to add ...
0
votes
0answers
87 views

2D Drawing architecture

I want to create something like a game but I am going to use Direct2D and GDI for drawing API.My problem is that I want to separate drawing code from objects. For example lets say I have conduit ...
0
votes
0answers
44 views

How can I trick or see how the source engine knows if the process is in focus or not.

The source engine does not support split screen so I am trying to run two borderless windows side by side but the source engine automatically limits the cpu utilization of any window not in focus. Any ...
0
votes
0answers
109 views

Data structure to store map layers in each Tile while keeping the order of terrain, items and monsters intact

My game represents its map as a 2D array of tiles, each of which stores a stack of layers. I'm looking for a data structure to efficiently represent this . I want to be able to add layers ...
0
votes
0answers
57 views

Organization of world/eye/clip bounding volumes for ray picking

I currently have objects defined in world coordinates and also other "overlay" type objects defined in eye or clip space. I want to be able to select objects (ray picking) from both the overlay or ...
0
votes
0answers
21 views

How can I avoid duplication of jBox2D physics attributes?

I'm using jBox2D for physics and collision detection in a game engine with an entity-component system. It works, but I'm unsure how to structure my code with respect to the values represented in the ...
0
votes
0answers
69 views

How can I position different size creatures in a group automaticly

I'm doing a game (in xna) on my free time, as I'm not in the game market, I'm pretty sure I'm missing something that would help me get this right. Think of Ogre Battle. A group of unit moves, and ...