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

learn more… | top users | synonyms (2)

-1
votes
0answers
21 views

Endless runner with left, right and 180 turns

Let's say there is an endless runner. Player moves from control point(CP) to CP, each CP has a pointer to the next one. I want to add an ability to make 180° turns at any moment, and, from some CPs, ...
0
votes
0answers
31 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
16 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 ...
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 ...
1
vote
1answer
215 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
17 views

unity component architecture [closed]

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
24 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
48 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(), ...
1
vote
1answer
68 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
26 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 ...
21
votes
2answers
11k 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 ...
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
1answer
65 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 ...
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 ...
5
votes
3answers
300 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 ...
2
votes
1answer
182 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
224 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 ...
3
votes
2answers
855 views

What threading strategy does a game like Transport Tycoon use? [closed]

Transport Tycoon is a simulation game where you control a transport company, place railroad tracks and trains, airports, bus depots, boats etc. Now the game is about 15 years old and I remember ...
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 ...
5
votes
1answer
847 views

Character Movement in 3D games

I'm either not searching correctly or there is really not a lot of material on Character Movement in 3D games. I'm mostly interested in how people usually implement character movement in games like ...
2
votes
0answers
38 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
61 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 ...
116
votes
1answer
23k views

What is the role of “systems” in a component-based entity architecture?

I've been reading a lot about entity components and systems and have thought that the idea of an entity just being an ID is quite interesting. However I don't know how this completely works with the ...
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 ...
0
votes
2answers
171 views

Double buffer - Managing Collision

I'm thinking about how I should manage collisions in my game. I'm thinking about having a "Collision" class that checks for collision, and in case takes actions to resolve them. My problem is this: ...
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 ...
47
votes
8answers
8k views

How can I avoid having many singletons in my game architecture?

I use cocos2d-x game engine for creating games. The engine already uses many singletons. If someone used it, then they should be familiar with some of them: Director SimpleAudioEngine ...
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 ...
4
votes
1answer
191 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 ...
0
votes
0answers
56 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
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 ...
6
votes
3answers
238 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
3answers
2k views

NoSQL (CouchDB) database design for MMORPGs

Are there any pratical examples of database implementation for an MMORPG in CouchDB? Even a detailed thesis? I've looked but found very little on practical examples and not even find any good UML ...
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
250 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 ...
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 ...
2
votes
2answers
2k views

How should I handle animation states in Mecanim?

I did a tutorial which associated an integer to each state and manually set transitions from one state to another based on that integer, but that seems really sloppy. Is there a more elegant way? I ...
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 ...
23
votes
4answers
3k views

How to design a game's software such that it is easy to unit test?

Is it practical to use a testing framework like JUnit in a game development situation? What sort of design considerations can you follow in order to make your game more testable? What parts of a game ...
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 ...
7
votes
3answers
1k views

Entity Component System for HUD and GUI

This is a very rough sketch of how I currently have things designed. It should, at least, give an idea of how my ECS is currently designed. If you notice in that diagram, I have basically split ...
2
votes
1answer
211 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 ...
22
votes
5answers
4k views

Game architecture / design question - building an efficient engine while avoiding global instances (C++ game)

I had a question about game architecture: What is the best way to have different components communicate with each other? I do really apologize if this question has already been asked a million times, ...
1
vote
1answer
135 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 ...
0
votes
1answer
115 views

How to make “Events”/ Scripted Scenes

I want to make cutscenes etc, in my game. I thought of a similar System like in the RPG Maker: If you enter a certain Area, a list of commands and arguments is played. E.g. like this: [Move ...
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 ...