Engine-design related questions. How code is structured.
4
votes
3answers
200 views
Efficient Algorithm for Recording gameplay's objects positions
So, I have a game idea in mind, and for that I need to record the game around the player. I'me not talking about recording it as video, but rather recording the scene objects, and their positions ...
5
votes
1answer
217 views
How to track many in-game statistics
I am looking to track many in-game events, e.g. the score of each move, how many moves are taken, what types of moves, etc. A lot of stats can simply be tracked with a counter. In some cases I need to ...
1
vote
1answer
259 views
Is component-based design an architectural pattern or design pattern?
When using the component-based paradigm in game development with engines like Unity, is component-based design an architectural pattern, or a design pattern?
Can I even say that component-based ...
1
vote
3answers
195 views
OOP implementation of BUFFS and Stats. Suggestion
I am developing an MMORPG server using NodeJS.
I am not sure how to implement Buffs, i mean, equipped objects or used skills have effects on the Player() which has many Stats(), some of them have a ...
7
votes
3answers
402 views
Collision Detection Game Design and Architecture
I've reading some articles about collision detection. My question here is about ideas on the design for it.
Baically I have a C++ game that has a main loop with entities with an update method. Based ...
8
votes
1answer
331 views
How can I cleanly and elegantly handle data and dependancies between classes
I'm working on 2d topdown game in SFML 2, and need to find an elegant way in which everything will work and fit together.
Allow me to explain. I have a number of classes that inherit from an abstract ...
2
votes
1answer
118 views
How to manage my model
I have in my model, a list of Classes : Player, NonPlayerCharacter, Monster, Item, NonMovableItem etc
With AndEngine I've a list of sprite for each piece of my model,
How can I manage the ...
1
vote
1answer
192 views
How can I refactor my code to use fewer singletons?
I started a component based, networked game (so far only working on the server). I know why singletons can be bad, but I can't think of another way to implement the same thing. So far I have:
A ...
0
votes
2answers
108 views
Where to implement storable items
I'm creating a multiplayer online trading game. The things that are traded range from raw items to complex products. For example Steel is a raw item. Mechanical Assembly is a more complex item that ...
3
votes
2answers
138 views
knowing all available entity types
I'm making a game where at some point the game will create enemies of random types. Each type of enemy available is defined on its own class derived from an enemy superclass. To do this, obviously the ...
3
votes
1answer
259 views
Should components have sub-components in a component-based system like Artemis?
I am designing a game using Artemis, although this is more of philosophical question about component-based design in general. Let's say I have non-primitive data which applies to a given component (a ...
1
vote
1answer
106 views
How to model / where to store relational data between classes
I'm trying to figure out the best design here, and I can see multiple approaches, but none that seems "right."
There are three relevant classes here: Base, TradingPost, and Resource. Each Base has a ...
7
votes
1answer
217 views
Architectural approaches to creating a game menu/shell overlay on PC/Linux?
I'm am working on a collection of games for a custom digital tabletop installation (similar to Microsoft Surface tables). Each game will be an individual executable that runs full-screen. In addition, ...
2
votes
2answers
428 views
References about Game Engine Architecture in AAA Games
Last weeks I focused on game engine architecture and learned a lot about different approaches like component based, data driven, and so on. I used them in test applications and understand their ...
3
votes
3answers
525 views
Snake Game Help
I am making a snake game and learning XNA at the same time. I have 3 classes :
Game.cs, Snake.cs and Apple.cs
My problem is more of a conceptual problem, I want to know which class is really ...
3
votes
2answers
545 views
Use a SQL Database for a Desktop Game
Developing a Game Engine
I am planning a computer game and its engine. There will be a 3 dimensional world with first person view and it will be single player for now. The programming language is C++ ...
8
votes
4answers
487 views
How can I use multiple meshes per entity without breaking one component of a single type per entity?
We are just switching from a hierarchy based game engine to a component based game engine. My problem is that when I load a model which has has a hierarchy of meshes and the way I understand is that a ...
14
votes
6answers
1k views
Should Vector3 inherit from Vector2?
I'm creating a couple of classes Vector2 (X & Y) and Vector3 (X, Y & Z), but I don't know whether to make Vector3 inherit from Vector2, or whether to re-implement the member variables m_x and ...
3
votes
4answers
167 views
Debugging-Setting Consoles in Games
Right now I have the graphical and input portions of a console for my game (command parsing hasn't been implemented yet). I was wondering how you would go about making changes to properties in game ...
7
votes
4answers
805 views
Game Messaging System Design
I'm making a simple game, and have decided to try to implement a messaging system.
The system basically looks like this:
Entity generates message -> message is posted to global message queue -> ...
3
votes
1answer
156 views
Music Rhythm Game Difficulty Question
I have curious question about music rhythm based genre while I'm making a code for the game. Is it really better if I set a random pattern encountered on every music played or there is a specific ...
5
votes
1answer
201 views
Dynamic Components
I am attempting to design a component-based architecture that allows Components to be dynamically enabled and disabled, much like the system employed by Unity3D. For example, all Components are ...
6
votes
4answers
530 views
Pros and cons of using dlls
I wonder about create every game engine module (render, input, sound, etc...) into dlls (renderer.dll, input.dll, etc...). What are pros and cons in your opinion of divide game into set of dlls ? I ...
1
vote
2answers
176 views
Is 2 lines of push/pop code for each pre-draw-state too many?
I'm trying to simplify vector graphics management in XNA; currently by incorporating state preservation. 2X lines of push/pop code for X states feels like too many, and it just feels wrong to have 2 ...
15
votes
4answers
1k views
How does one save a procedural world?
I have recently read about how to create procedural worlds... but how do I save one?
In games like Terraria or Minecraft users can freely modify the landscape, but that world can't be recreated from ...
-2
votes
3answers
987 views
C++ Game Engine Book/Tutorial/Anything recent? [closed]
Before I get flamed, please understand that I have been looking for a while now. Yes, I have found a good amount of game engine tutorials...except filled with errors, out of date syntax, missing ...
6
votes
4answers
1k views
Entity System and rendering
Okey, what I know so far;
The entity contains a component(data-storage) which holds information like;
- Texture/sprite
- Shader
- etc
And then I have a renderer system which draws all this. But ...
2
votes
1answer
96 views
Managing different utility classes between engine and libraries
I'm currently in updating some engine code (which does not work, so it is more like creating a engine).
I've decided to swap over to SFML (instead of my own crappy renderer, window manager, and ...
2
votes
1answer
175 views
2D scene graph not transforming relative to parent
I am currently in the process of coding my own 2D Scene graph, which is basically a port of flash's render engine.
The problem I have right now is my rendering doesn't seem to be working properly. ...
0
votes
4answers
344 views
Programming Paradigm for Games [closed]
Which programming paradigm resembles or best suits the Game design or game engine programming?
by paradigm I mean the Imperative, Object oriented, Functional, etc. I came to know that functional ...
0
votes
2answers
257 views
Designing a “Grid” like object that contains game objects
I am working on a 2D game, where there's a game "board" on which other game objects are placed.
This this is 2D, my starting point was to design a class that will internally use a 2d array for the ...
1
vote
2answers
245 views
Best practice for designing a risk-style board game
I'm just trying to figure out how to set up the code for a game like risk...
I would like it to be extensible, so that I can have multiple maps (ie- World, North America, Eurasia, Africa) so ...
2
votes
1answer
226 views
Techniques for separating game model from presentation
I am creating a simple 2D game using XNA.
The elements that make up the game world are what i refer to as the "model".
For instance, in a board game, i would have a GameBoard class that stores ...
9
votes
3answers
668 views
How to code UI / HUD in Entity System?
I think I already got the idea of the Entity System inspired by Adam Martin (t-machine). I want to start using this for my next project.
I already know the basic of Entity, Components, and Systems. ...
3
votes
2answers
301 views
Adding sub-entities to existing entities. Should it be done in the Entity and Component classes?
I'm in a situation where a player can be given the control of small parts of an entity (i.e. Left missile battery). Therefore I started implementing sub entities as follow.
Entities are Objects with ...
1
vote
4answers
688 views
SDL - Getting a single keypress event instead of a keystate?
Right now I'm working on a simple SDL project, but I've hit an issue when trying to get a single keypress event to skip past a splash screen. Right now, there are 4 start-up splash screens that I ...
-4
votes
1answer
180 views
What technologies are used for Game development now days? [closed]
Whenever I ask a question about game development in an online forum I always get suggestions like learning line drawing algorithms, bit level image manipulation and video decompression etc.
However ...
2
votes
2answers
2k views
Entity System with C++
I'm working on a game engine using the Entity System and I have some questions.
How I see Entity System :
Components : A class with attributs, set and get.
Sprite
Physicbody
SpaceShip
...
System ...
3
votes
1answer
155 views
Using MVC with a retained mode renderer
I am using a retained mode renderer similar to the display lists in Flash. In other words, I have a scene graph data structure called the Stage to which I add the graphical primitives I would like to ...
6
votes
2answers
663 views
Low-level game engine renderer design
I'm piecing together the beginnings of an extremely basic engine which will let me draw arbitrary objects (SceneObject). I've got to the point where I'm creating a few sensible sounding classes, but ...
1
vote
2answers
268 views
Sharing VBO with multiple objects and fixed size buffer data
I'm just messing around with OpenGL and getting some basic structures in place and my first attempt resulted in each SceneObject class (just contains vertex information right now) having it's own VBO ...
10
votes
3answers
703 views
The reasons behind Unity3D engine design (game object/transform component)
I'm trying to understand the reasoning behind Unity3D engine design and this is something I can't get my head around yet: why is transform data stored in a separate component, instead of being a part ...
1
vote
1answer
192 views
Adjusting server-side tickrate dynamically
I know nothing of game development/this site, so I apologise if this is completely foobar.
Today I experimented with building a small game loop for a network game (think MW3, CSGO etc). I was ...
9
votes
3answers
1k views
Component-based design: handling objects interaction
I'm not sure how exactly objects do things to other objects in a component based design.
Say I have an Obj class. I do:
Obj obj;
obj.add(new Position());
obj.add(new Physics());
How could I then ...
0
votes
1answer
193 views
How to make smooth animations
Say I want to write a card game. I have a hand of cards and I want to be able to draw a smooth animation of a card moving from the hand to the table. I am looking for suggestions on how to elegantly ...
0
votes
2answers
130 views
Java applet game design no keyboard focus
THIS IS PROBABLY THE WRONG PLACE. POSTED ITHERE (STACKOVERFLOW)
I'm making an applet game and it is rendering, the game loop is running, the animations are updating, but the keyboard input is not ...
4
votes
4answers
2k views
Why has the industry switched from C to C++?
First of all i would like to have a real answer, i'm always trying to get more from various sources and articles, and when I read things like C++ is slow because it has virtual functions and because ...
-4
votes
1answer
173 views
Should I use reference counting on entities in component-based entity system?
In component-based entity system, should game objects be reference counted? What about components? Tell me please your pro and contra. Thanks in advance
0
votes
0answers
81 views
Saving/loading code structure
I have a tree of game entities composed of components. I want to save/load everything to xml file, where my saving/loading code must be located:
Scene class containing root node and functions ...
2
votes
1answer
516 views
Managing the user input
I'm studying a good number of articles about this topic and seems to me that there is just one way to do this: a signal/slot design.
I was also looking at some more complex async examples but I don't ...