Engine-design related questions. How code is structured.

learn more… | top users | synonyms (2)

7
votes
1answer
472 views

Global keyboard states

I have following idea about processing keyboard input. We capture input in "main" Game class like this: protected override void Update(GameTime gameTime) { this.CurrentKeyboardState = ...
3
votes
1answer
177 views

Using allocators for different systems

I am going over the memory architecture for my game and even though I know my memory budgets may not be final, I at the point where I can start using them in a general sense. I know that I will need ...
2
votes
4answers
1k views

Templates and game consoles

I have overhead in several times that templates should not be used on video game consoles, however, I never heard why or understood why. Why shouldn't templates be used on video game consoles, and if ...
2
votes
1answer
377 views

Attributes and Behaviours in game object design

Recently I have read interesting slides about game object design written by Marcin Chady Theory and Practice of the Game Object Component Architecture. I have prototyped quick sample that utilize all ...
2
votes
1answer
407 views

Distributing an Android game with plugins via the market

I'm new to Android development, and was wondering how the following could be achieved within the confines of the Android market as a distribution channel: One main application, which handles the ...
5
votes
1answer
298 views

Where to store shaders

I have an OpenGL renderer which has a Scene member variable. The Scene object can contain N SceneObjects. I use these SceneObjects for storing the vertex position and any transforms. My question is, ...
5
votes
3answers
2k views

GameState management hierarchical FSM vs stack based FSM

I'm reading a bit on Finite State Machines to handle game states (or screens). I would like to build a rather decent FSM that can handle multiple screens. e.g. while the game is running I want to be ...
10
votes
3answers
4k views

Custom allocators used in game development

I have been researching creating my own allocator methods (that will support things such as a memory pool and profiling), however, as I continue my research I have been looking for how this was done ...
6
votes
4answers
5k views

Object-Oriented OpenGL

I have been using OpenGL for a while and have read a large number of tutorials. Aside from the fact that a lot of them still use the fixed pipeline, they usually throw all the initialisation, state ...
4
votes
3answers
1k views

Implementing a “tech tree”

Writing for android, but this is an abstract question for any OO language. Is there a "best-practice" for implementing a TechTree? Here is an example: Vegetation ->v Strawberries ...
7
votes
3answers
458 views

Profiling and containing memory per system

I have been interesting in profiling and keeping a managed memory pool for each subsystem, so I could get statistic on how much memory was being used in something such as sounds or graphics. However, ...
0
votes
0answers
124 views

Where should I put my drawing code [duplicate]

Possible Duplicate: Should actors in a game be responsible for drawing themselves? How can I refractor the following, to move my drawing functions from the h-file into a GraphicsManager ...
4
votes
1answer
1k views

In a component/entity system, what's the correct way to implement entity-specific components?

I'm trying to create a basic C/E game engine for Android, and I'm trying to re-create pong as a basic warm-up. I currently have a EntityManager class that contains a list of all the UUIDs for its ...
2
votes
2answers
230 views

Why does my win32 call, contained in a Class method, fail?

Using a Direct3D Tutorial, I took the knowledge and encapsulated it into a class. The code builds in MSVC 2010 fine, and I've handled all compiler warnings pertaining to my project with the highest ...
3
votes
3answers
477 views

What are the techniques used to save space with very large levels?

Some days ago I was thinking "how would I store the real world into a continuous game level ?". I guess it must have been some challenge for RockStar engineers (for GTA 4 or Red Dead Redemption) or ...
4
votes
1answer
2k views

Managing Shaders and Objects in DirectX 11

The title explains my two biggest logical problems with developing a game. It's something I sit up at night thinking about, and that is "What is the most effective way to manage shaders" and "What is ...
4
votes
3answers
419 views

Calculating game map changes overtime when user is not even online e.g. farmville

With a game like farville, there is both processing during gameplay and when the user is offline (plants are growing, etc.) So many of the elements on the game map depend on time. Is there a trick ...
5
votes
1answer
332 views

How should I structure moving from overworld to menu system / combat?

I'm making a text-based "Arena" game where the player is the owner of 5 creatures that battle other teams for loot, experience and glory. The game is very simple, using Python and a curses emulator. ...
3
votes
1answer
547 views

Browser game architecture considerations

I am currently working on a browser game. It's not my first one, but it is the most complex I have worked on to date. In the past, I would code everything in PHP, and have functions checking whether ...
3
votes
3answers
2k views

How to access SpriteBatch, Input, and ContentManager from all game screens?

I'm trying to make a Game State Manager and I'm using the Microsoft Game State Management Sample as guidance. However, I want a more simplistic design (no transitions, reflection, or support for ...
4
votes
2answers
2k views

Performance/architectural implications of calling SpriteBatch.Begin/End in many different places?

I notice some code samples only call SpriteBatch.Begin and SpriteBatch.End in the game's main draw method and then draw everything within that method through direct SpriteBatch.Draw calls or indirect ...
7
votes
2answers
2k views

Book about Entity System?

I'm really interested about the capabilities of Entity System. I'm trying to search for a good book on this one, but failed. I don't want to get lost on learning this paradigm so a book will be a big ...
5
votes
1answer
296 views

What's the right/standard way of achieving separation of concerns?

Some background: I want to start developing games, and taking some of the advice given in this site, I've started with something simple and familiar, such as pong, tetris, etc. I want to take as much ...
0
votes
3answers
1k views

For learning purposes only, is creating a game engine or using one such as Unity3D or UDK better?

Alright, let me start off by saying this: I've seen multiple threads comparing creating custom game engines to already created game engines such as Unity3D or UDK, but none of the threads I've found ...
1
vote
2answers
478 views

Implementing Power-Ups in a game

I'm making an Arkanoid or Brick Breaker game, but I got confused when I wanted to implement power-ups. The idea is that when you destroy a brick, a powerup-block falls down, and if you catch it you'll ...
0
votes
3answers
209 views

A question regarding how to respond to 'events'

What is the best practice to use when events happen in a game? For example: You have a sensor. When a particular game actor is near that sensor, a sound must be played and a door must be closed. ...
2
votes
2answers
1k views

Roguelike Class Structure Makes Everything Effectively Global

A brief rundown of the hierarchy of the game data objects: Configuration - loaded from XML files, has Descriptors, among other things Atlas - has a Configuration, has a CreatureInstance(represents ...
10
votes
3answers
577 views

Good way to play a sound when something happens? How does this sound?

So I was thinking about how monolithic my classes get a lot of the time. For example, in the Character class's Jump method, one may have a reference to a sound effect object and play that. By itself ...
8
votes
2answers
5k views

Interaction between engine parts

I want to ask a question about how the information exchange between game engine parts should be implemented. The engine is separated in four parts: logic, data, UI, graphics. In the beginning I made ...
5
votes
1answer
910 views

What are the drawbacks of this messaging system implementation?

So I've just been thinking about component and messaging systems recently for simple C# XNA games and came up with this. How extensible would this implementation be and what are the drawbacks? Example ...
3
votes
2answers
185 views

Is my StatisticManager idea overkill?

I'm writing a shmup and I'm working on implementing things like level design and achievements. I have a trigger system that I've implemented which allows me to do basic things and can assist the basic ...
2
votes
1answer
319 views

Implementing Object Composition

I'm trying to structure my game object classes similar to how it is done in this article. One way to implement this strategy is discussed in this StackOverflow question. Following the strategy ...
9
votes
2answers
725 views

Implementing behavior in a simple adventure game

I've been entertaining myself lately by programming a simple text-based adventure game, and I'm stuck on what seems like a very simple design issue. To give a brief overview: the game is broken down ...
3
votes
1answer
574 views

How are collision and collision callback systems usually implemented?

I'm writing my own game engine for learning purposes and was wondering about common ways to handle collision callbacks/responses. I'm NOT looking for ways to resolve collisions (no math needed here), ...
10
votes
3answers
5k views

How to organize a game engine in C++? Is my use of inheritance a good idea?

I'm a beginner both in game developping and programming. I'm trying to learn some principle in the building of a game engine. I want to create a simple game, I'm at the point where I'm trying to ...
1
vote
4answers
243 views

Designing a game that allows for selectable perks/customization

Call of Duty games all have the core functionality of any FPS (walking around, killing, dying and repeat). Layered on top are various stuff. Of interest to me is during pre-game when you pick your ...
2
votes
2answers
1k views

Sparse Voxel Octrees which parts on GPU or CPU?

I'm currently doing research into building my own voxel engine and found a lot of articles mentioning SVOs as the best mechanism. I just wanted to know that I understood the algorithm correctly, ...
2
votes
5answers
2k views

Need opinions: is it worth making component based entity system? [closed]

I've been reading about component based entity-system for couple days now and I'm not quite sure if it is worth implementing in my next game. I haven't started making the game yet, but I have bunch of ...
19
votes
4answers
3k views

“The Game Object” - and component-based design

I've been working on some hobby projects the last 3-4 years. Just simple 2d and 3d games. But lately I have started a bigger project. Soo in the last couple of months I've been trying to design a game ...
8
votes
1answer
809 views

Processing component pools problem - Entity Subsystem

Architecture description I'm creating (designing) an entity system and I ran into many problems. I'm trying to keep it Data-Oriented and efficient as much as possible. My components are POD ...
5
votes
2answers
1k views

Should I use inheritance or composition for modelling game objects?

In terms of game engine modeling, please give your pros and cons for two types of interfacing: class MySceneObject_Model1 : public IRenderable, public IScriptable, public IAnimatable { ... } class ...
3
votes
3answers
2k views

Is “pure” OpenGL productive enough?

I know that this is a difficult question and I hope I can convey my meaning. Over time I've used many different engines from XNA over Unity to Panda3d and even tried native directX once. My final ...
2
votes
2answers
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 ...
2
votes
1answer
720 views

What threading strategy does a game like Transport Tycoon use?

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
2answers
2k views

I need an enemy spawning algorithm for a 2D tower defense

I need an enemies spawning algorithm for a 2D tower defense game. I have 4 maps, each has 4 stages and each stage has 40 rounds. I need to create an algorithm which will instantiate waves, increase ...
0
votes
0answers
69 views

What are the responsibilities of a game engine, and which of these things need to especially be efficient? [duplicate]

Possible Duplicate: What should a game engine do? What are the usual responsibilities of a game engine, and which of these things especially need to be efficient (performance-wise)? Can I ...
3
votes
3answers
287 views

Should each UI screen contain the list of screens on the stack or should I use a manager class?

I have a Screen class that encapsulates the updating and rendering of several distinct states, such as the menu, gameplay, and credits. A stack of screens exists on which the screens themselves need ...
13
votes
2answers
718 views

How should I check if a player has completed an achievement?

I'm making an MMO game and I just got to a point where I need to implement achievements... How do I do that? The most straight forward thing to do would be to run this once every 100ms,: for a in ...
1
vote
2answers
593 views

Entity manager loop opinions

This days I'm refactoring code and one of the things I want to improve is my entity manager code. More precisely, the update funcion where entities are updated. My engine is a 2D tile based engine ...
11
votes
2answers
6k views

how should i develop my android game efficiently?

I have attached a image of a flow chart that i made in paint. The image shows how i want to develop my game. I want a game that runs great with smart coding that is easy to update and ad features ...