Engine-design related questions. How code is structured.

learn more… | top users | synonyms (2)

7
votes
4answers
2k 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 -> ...
4
votes
1answer
288 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
268 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
1k 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
210 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
2k 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
3k 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
125 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
332 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
579 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
364 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
364 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
335 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 ...
11
votes
3answers
1k 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
633 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
2k 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 ...
-3
votes
1answer
223 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
3answers
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
186 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
1k 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
615 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 ...
11
votes
3answers
2k 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
322 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
2k 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
237 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
233 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 ...
7
votes
4answers
5k 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 ...
-5
votes
1answer
229 views

Should I use reference counting on entities in component-based entity system? [closed]

In component-based entity system, should game objects be reference counted? What about components? Tell me please your pro and contra.
1
vote
0answers
133 views

Saving/loading code structure [closed]

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
1k 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 ...
1
vote
1answer
212 views

Game Engine Collision Handler

I'm making a collision handler for a Java game engine. I made an interface called Collidable. I have a method called onCollision which takes the parameter of my Engine Game Object. public void ...
2
votes
2answers
327 views

Should a 4x game use one class per planet type?

I'm try to make a small 4x game for my own educational purposes. Currently I have interfaces like IStarSystem which contains a list of IPlanets. My next step was to make classes implementing those ...
1
vote
2answers
718 views

Is there any option other than Component Based for game architecture?

Having read a lot recently on Component Based systems (for games), i find it hard to go back to my earlier state of mind. If static object hierarchies fail to model "objects with a dynamic set of ...
16
votes
1answer
2k views

How should I structure an extensible asset loading system?

For a hobby game engine in Java, I want to code a simple but flexible asset/resource manager. Assets are sounds, images, animation, models, textures, et cetera. After a few hours of browsing and some ...
7
votes
4answers
7k views

What is the most efficient container to store dynamic game objects in? [closed]

I am making a first person shooter and I know about about a lot of different container types but I would like to find the container that is the most efficient for storing dynamic objects that will be ...
0
votes
3answers
308 views

Central renderer for a given scene

When creating a central rendering system for all game objects in a given scene I am trying to work out the best way to go about passing the scene to the render system to be rendered. If I have a ...
2
votes
1answer
390 views

Efficient manager/controller for uniform and/or attribute variables in a rendering engine

Most engines on the market have their drawbacks and it's difficult to find a simple/light-weight one that's open-source and doesn't have to put you through a rather complex learning process. Writing ...
4
votes
0answers
246 views

What engine/technology should I work with to accomplish my unique design goal? [closed]

I'm looking to begin a procedurally generated open-ended sandbox game and would like some educated opinions on a good starting point. (Take a look at the "Engine Specifications" if you don't want to ...
0
votes
2answers
244 views

Logic / Render phases with a single thread

The question I have may generate different opinions from different developers, but I'd still like to have an answer on this. Its all about the updating and rendering steps of the game loop, and their ...
4
votes
2answers
796 views

Book on designing game architecture?

I would like to make nice games with good architecture that are easy to support and extend. But when i write code it all gets messy and hardcoded, so when I want to add a feature it becomes a huge ...
7
votes
4answers
461 views

Grouping game objects

I'm trying to create a simple turn based console (command line) game but I'm confused of what approach to use when creating classes for objects. My concern is maintainability and flexibility. First ...
3
votes
2answers
685 views

Design pattern for creating multiple enemies

I'm currently attempting to implement a factory method pattern for creating multiple different enemies after loading data from a file. But I'm having second thoughts on what would be the best design ...
8
votes
3answers
384 views

Are there any narrative (or at least non-spatiotemporal) focused engines/frameworks?

EDIT (2): Since there are two answers and I haven't accepted any of them I figured I'd motivate what I'd consider an answer here: Either something strongly suggesting any such approach would be ...
2
votes
2answers
170 views

Handling of data sharing between framework module

I am currently developping a 3D game using C# / XNA 4.0 and i am currently thinking about how i should structure my game. The actual game is in fact not really important as the framework i am working ...
4
votes
3answers
593 views

Finding the right directory structure for version control

Recently I've started thinking about how to layout the directory structure for my game engine. And well, I kinda hit a little snag. There's going to be 2 people working on this project. Me and one ...
6
votes
1answer
191 views

Applicability of Business Architectures in XNA 4

I've done a lot of C# programming and the architecture we use of late is a MVC => PresentationService => Domain Service And/OR DataService => Repository with a UnitOfWork and a messaging bus. In web ...
1
vote
2answers
101 views

Refresh a single view

The game I'm working on is based on different levels. I can use different activities or only one activity with different layouts ( or maybe only one layout, you have to apologize me but I'm studying ...
0
votes
1answer
207 views

Handling Latency in Multiplayer Shoot-em-ups

I had an idea for an architecture, and I was wondering if anyone has implemented something like this or has used AWS or some other service to help? I thought about using NodeJS + SocketIO to handle ...
3
votes
1answer
553 views

C++ game architecture

I'm trying to make a game, but I'm not sure of the best way to set up the main loop and classes. For really small games, I could put everything in the main() loop, including event handling, collision ...