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

learn more… | top users | synonyms (2)

0
votes
0answers
21 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
14 views

Project architecture for Android games [on hold]

I have some experience developing Android apps and I'm trying to develop a game now. When developing an app I usualy use a MVP (Model View Presenter) architecture, I was wondering if there is any ...
0
votes
0answers
17 views

unity component architecture [on hold]

Would it be sensible to split components into domains, then further by behaviour, and have behaviour component scripts act as an interface between OOP code and the Unity engine? domain > components ...
0
votes
0answers
22 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
20 views

unity game dev - Tanks tutorial - how would you do it differently [closed]

I would like to use good practices when working with Unity, but I'm finding it difficult deciding on what good practices are. In order to address that, could you describe what you would do differently ...
0
votes
0answers
44 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
1answer
25 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 ...
14
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 ...
1
vote
1answer
63 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 ...
2
votes
1answer
177 views

Should I implement Entity Component System in all my projects?

I'm not here to ask for any specific code implementation, I'm here just to make my ideas clearer. But let me explain the situation: I have already developed some little and amatorial game projects ...
4
votes
2answers
222 views

Complex system-component dependencies in entity-component system?

I am trying to design a typical (data-oriented) ECS engine. The issue I am struggling with is that my rendering system have to rely on two different sets of entities to actually do rendering. My ...
0
votes
1answer
31 views

Storing player data for multiple players in libGDX

I'm working on a game (in libGDX) that would allow multiple player accounts. I need to store some simple user data (several key-value pairs). I think JSON is the best for my needs, but I'm wondering ...
2
votes
0answers
37 views

Strategies to make it difficult to cheat + easier to identify cheaters in Javascript/HTML5 game [duplicate]

I intend to have a Javascript/HTML5 game with a global leaderboard. I have devised a very simple system for submitting highscores as follow: When the game finishes, the game client makes a POST ...
0
votes
1answer
60 views

Organizing Setup(), Update() and Draw() function in a game engine

I'm creating my first game engine and I want help with organizing the Setup(), Update() and Draw() functions in the correct way. Here is how my main() function looks like /* BEGIN main() Function */ ...
2
votes
1answer
57 views

How to store renderer vertex / index data in scene graph objects?

I have a SceneNode class which contains a Mesh instance. The Mesh class stores client side information such as vertex and index arrays (before they're uploaded to the GPU). I also have an abstracted ...
3
votes
1answer
58 views

Ideal draw order - sort primarily by distance or material?

When it comes to pre-sorting the draw calls for a given frame, I am aware of two different methods for optimising. The first is to batch draw calls by their material. This minimises shader changes ...
3
votes
3answers
107 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 ...
1
vote
1answer
68 views

How do I structure AI that uses both Behavior Trees and Pathfinding?

Architecturally, what are the best practices for how these two concepts interact with each other? For instance, say I have an asteroids like game where the AI player must dodge floating asteroids ...
4
votes
1answer
189 views

When to use a blend tree vs state machine for animation

Im an experienced game dev hobbiest making my first game with 3d animated characters (in Unity) and am struggling to figure out when to use blend trees vs animation state machines. I understand both ...
1
vote
0answers
30 views

Help with building a platformer engine on top of cocos2d [closed]

I am a C# programmer making a transition to game programming and hence C++. I want to make a reusable platformer engine (for now I want to start small) on top of cocos2d/box2d to make prototyping of ...
2
votes
2answers
98 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 ...
0
votes
0answers
54 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. ...
2
votes
1answer
72 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
0answers
28 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
2
votes
0answers
64 views

What is the best abilities modding system that you encounter in games? [closed]

I'm thinking about designing an abilities system (as in a moba game). Most important goal is to be able to easily create new abilities in the editor, with a low learning curve (ultimate goal: simple ...
1
vote
1answer
67 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 ...
3
votes
1answer
154 views

Is there a way to bypass Directx Effect Files?

I am now trying to abstract my rendering pipeline, and I've been able to abstract OpenGL fairly easily. But now I have ran into a rather ugly problem with Directx. Most of my knowledge about Dx9, 10, ...
5
votes
3answers
244 views

Is a custom coordinate system possible in Unity

Is it possible to create a custom coordinate system (i.e the one using double for coordinates or the one dividing the world into 'chunks' of safe size) not constrained by the floating point precision ...
6
votes
3answers
237 views

Overcoming float limitations for planet-sized worlds in Unity

As far as I know, going further than 1M units from the world origin in Unity is hardly possible due to floating point precision issues. Making a world more than 1M units in radius would require ...
3
votes
1answer
71 views

Separating rendering from HWND

I'm considering separating my game simulation from the message loop. It seems odd to me to have other systems tied directly to the window in which my game is running. Most examples I see are ...
1
vote
2answers
70 views

Interaction between GUI and character(s)

This is more a question about architecture. Not sure if there's a right or wrong: Let's assume I have some gameobjects: GUI: A menu containing some elements like "Go to position". It's opened when ...
2
votes
1answer
80 views

How to test the effectiveness of a game engine?

A few friends and I are working on a home-brewed engine for a selection of games we wish to produce in the future. We're making it to satisfy a few key requirements that we haven't found were properly ...
1
vote
1answer
134 views

Resource streaming with job threading system

I am currently researching resource streaming for my current game engine. To add a bit of context, I am doing a contiguous world for a Baulder's Gate style CRPG. So while the camera is usually looking ...
3
votes
0answers
100 views

World scene graph questions [closed]

I am going through the process of rethinking my current game engine's design. And I'd like to ask about some information from other's experiences about scene graph. Before we begin, this graph is in ...
1
vote
2answers
89 views

How to find resources location regardless of working directory?

I am working on a resources loader for my personal C++/OpenGL ES engine. My resources are in a resources folder separated trough different sub-folders (shaders, textures, etc). I am currently giving ...
0
votes
0answers
94 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 ...
15
votes
3answers
2k views

Separating Game Engine from game code in similar games, with versioning

I have a finished game, that I want to decline in other versions. These would be similar games, with more or less the same kind of design, but not always, basically things might change, sometimes ...
0
votes
1answer
130 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 ...
1
vote
1answer
94 views

Getting a Specific Component in an Entity Component System

I've got component class: class Component { public: Component(); ... }; then my various components derive from the base Component class class VelocityCom : public Component { public: ...
1
vote
1answer
53 views

Animations with Model View Controller

I'm currently wondering how to properly structure game code. I have come across MVC (Model View Controller) method/approach, which seams to be a decent way to get a good extendable structure. ...
2
votes
1answer
36 views

How does a “debug console” handle dependencies/access objects?

I'm trying to get my head around how to create a debug console and have a hard problem to figure out how it access different objects in my game. Say for example I want the console to be able to: ...
6
votes
2answers
152 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 ...
6
votes
3answers
181 views

Which parts of game should belong to engine and which should belong to scripts?

Often, the game is splitted into engine code (i.e. C++) and scripts (i.e. Lua). The question is which parts / modules of game code should typically belong to engine, and wchich should belong ...
0
votes
1answer
235 views

Scene management [closed]

I viewed sources of rendering engines (ogre, irrlicht, openscenegraph) but I can't really grasp the the main ideas of their scene management systems. I also read many articles (including Game Engine ...
5
votes
0answers
192 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 ...
2
votes
1answer
128 views

How to avoid lots of ugly math code and constants-hoarding?

In a lot of the games I've (tried) making in the past, I often run into the problem of the code getting really heavy on ugly mathematical code. This happens especially frequently in setting up ...
2
votes
1answer
209 views

What type of networking archtitecture does Unreal Engine 4 have?

I am working on online multiplayer FPS on UE 4 with up to 16 players. I am now at the making architecture model, stage. I am doing research on possible server architecture model with respect for ...
0
votes
1answer
57 views

Inventory system does not behave correctly

I have a game with an inventory, you can pick up items by walking on them. When you walk on an item and if it isn't already in your inventory it is added to the next free slot. If it is already in ...
1
vote
1answer
165 views

Setting up an efficient OpenGL rendering loop

This is the code that I use to setup my shader char* vertexShaderSource = getResource("vert.shad"); char* fragmentShaderSource = getResource("frag.shad"); vshad = readFile(vertexShaderSource); fshad ...
1
vote
2answers
114 views

Using hard coded values for Items?

Is it a bad idea to use hard coded values for things like items (static data) that would change infrequently in an online game? I'm designing an online game in node js, and I'm trying to decide if it ...