How code is structured. For questions on the internal design of a game engine.
1
vote
1answer
37 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
52 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
35 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 ...
1
vote
0answers
22 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
46 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
30 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
106 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
84 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", ...
3
votes
2answers
87 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
47 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, ...
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
0answers
31 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
126 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 ...
4
votes
4answers
178 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 ...
0
votes
1answer
42 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 ...
1
vote
1answer
58 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
0answers
31 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
4answers
587 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 ...
0
votes
3answers
167 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 ...
0
votes
0answers
48 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
36 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
120 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
48 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 ...
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 ...
1
vote
1answer
93 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
234 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
310 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
37 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
40 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
85 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 */
...
3
votes
1answer
68 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
76 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
128 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
76 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
544 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
36 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
171 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
0answers
88 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
87 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
37 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
68 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
88 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
164 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
454 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
300 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
77 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
71 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
83 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
196 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
113 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 ...