Engine-design related questions. How code is structured.

learn more… | top users | synonyms (2)

1
vote
5answers
1k views

Most efficient language for rewriting a tile-based board game as a video game? [closed]

I've been working on a hex-based board game. Every time I make changes, especially changes that require redesigning the map, it takes a good chunk of time and money. It might be more efficient to ...
35
votes
5answers
3k views

How to avoid the GameManager god object?

I just read an answer to a question about structuring game code. It made me wonder about the ubiquitous GameManager class, and how it often becomes an issue in a production environment. Let me ...
2
votes
2answers
752 views

Writing a dynamic achievement system without hardcoding rules into the application

I really enjoyed the solution provided here for groundwork on writing an achievement framework. The problem I have is I have game designers that would like to be able to insert achievements into a CMS ...
1
vote
2answers
865 views

Basic game architechture best practices in Cocos2D on iOS

Consider the following simple game: 20 squares floating around an iPhone's screen. Tapping a square causes that square to disappear. What's the "best practices" way to set this up in Cocos2D? Here's ...
3
votes
1answer
284 views

Architecture of an action multiplayer game from scratch

Not sure whether it's a good place to ask (do point me to a better one if it's not), but since what we're developing is a game - here it goes. So this is a "real-time" action multiplayer game. I have ...
9
votes
1answer
560 views

How to keep a data structure synchronized over a network?

Context In the game I'm working on (a sort of a point and click graphic adventure), pretty much everything that happens in the game world is controlled by an action manager that is structured a bit ...
-1
votes
1answer
303 views

When should one use the Abstract, Implements, or extends keywords? [closed]

I'm just now moving from a beginner to intermediate level android programmer in the java language. i can successfully write a game framework of classes that work together to accomplish a task beyond ...
0
votes
1answer
296 views

How far do I take Composition?

(Although I'm sure this is a common problem I really don't know what to search for. Composition is the only thing I could come up with.) I've read over and over that multiple inheritance and ...
1
vote
1answer
742 views

Frustum culling code architecture

I'm adding frustum culling into my game engine, but I have some design issues regarding the frustum and the cameras. Should the frustum be a member of the camera, or vice versa ? Should a camera be ...
10
votes
3answers
593 views

Does Unity have existing support for Timelines?

I am planning the development of a game in Unity3D, and trying to come to terms with what the engine has already provided, and what I must code myself. The game itself is going to be a rhythm game, ...
7
votes
1answer
457 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
918 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
367 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
302 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
281 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
3k 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
4k 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 ...
3
votes
3answers
866 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
443 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
219 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
454 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
399 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 ...
4
votes
1answer
314 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
506 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
293 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
419 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
208 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
540 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
4k 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
871 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
180 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
308 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
641 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
550 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
238 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
976 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, ...
1
vote
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 ...
17
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
765 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 ...