Engine-design related questions. How code is structured.

learn more… | top users | synonyms (2)

8
votes
3answers
2k views

Best peer-to-peer game architecture

Consider a setup where game clients: have quite small computing resources (mobile devices, smartphones) are all connected to a common router (LAN, hotspot etc) The users want to play a multiplayer ...
6
votes
1answer
2k views

Game editor integration with the engine?

What I am trying to figure out is what is the best way to integrate the editor(level, effects, model, etc...) in the most effective way? Now the first thing I thought would be to create the game ...
0
votes
3answers
165 views

How can I save state from script in a multithreaded engine?

We are building a multithreaded game engine and we've encountered some problems as described below. The engine have 3 threads in total: script, render, and audio. Each frame, we update these 3 ...
52
votes
7answers
18k views

Why don't more games use vector art?

It would seem to me that vector art is more efficient in terms of resources/scalability; however, in most cases I have seen artists using bitmap/rasterized art. Is this a limitation put on the artists ...
10
votes
4answers
1k views

Circular class dependency

Is it bad design to have 2 classes which need each other? I'm writing a small game in which I have a GameEngine class which has got a few GameState objects. To access several rendering methods, these ...
0
votes
4answers
788 views

Separating game logic from animation

For non-game applications the model-view-controller pattern is typical where data, logic, and visuals are separated. But for a game how would you architect the game logic and the animation system in ...
1
vote
1answer
164 views

How do I keep user input and rendering independent of the implementation environment?

I'm writing a Tetris clone in JavaScript. I have a fair amount of experience in programming in general, but am rather new to game development. I want to separate the core game code from the code that ...
0
votes
2answers
874 views

Game Logic - Tree Based Game Design

I'm trying to write an easy to use and extremely modifiable game engine in C++. I was thinking about using a tree to store game data. All objects would inherit a from the Node class and would have ...
7
votes
2answers
1k views

Tactics for moving the render logic out of the GameObject class

When making games you often create the following game object from which all entities inherit: public class GameObject{ abstract void Update(...); abstract void Draw(...); } So in you update ...
8
votes
5answers
556 views

Managing lists of different types of entities - is there a better way?

I am developing a 2D space game for mobile devices, but it gets realy complex and my solution is realy confusing and produces lots of repeated code segments. I hava a world class in which i have ...
1
vote
1answer
276 views

Class design for instantly switching between free-roaming world to/from battle world?

I plan to have an isometric world, which can be freely roam around. However, I desire the system to instantly apply the grid onto isometric world for battling system on any random encounter. ...
7
votes
1answer
2k views

Game programming: common methods and design patterns

I begun writing a very simple game engine so that I can learn OpenGL 3.x better but since my inexperience and my sparse knowledge of how a 3D game should be designed, I usually get into problems where ...
1
vote
2answers
251 views

Game states affecting each other's objects

If I had given this question any other title it would have immediately looked like a dupe of this one. Although that has some nice ideas none of the answers actually address what I need. I'm ...
2
votes
2answers
322 views

Scroller game level map advice

I'm started a XNA project to make a game similar in gameplay to Super Spy Hunter on a NES, which is used as a feature reference. The first thing I thought of is how to store and display level. ...
2
votes
3answers
398 views

C++ Namespace vs Reference passed around like crazy - Implement a quest journal

May sound funny, but that's what the question is about. Suppose you have this situation: http://i48.tinypic.com/whl6pk.jpg Red squares are data types. Hexagons are methods and Journal is the main ...
1
vote
0answers
63 views

Implementing Tools in a Toolkit

I've been building a toolkit for my game and recently decided I needed a history system as well as clean out the mountain of event handlers building up in my code. To do this, I've started using ...
2
votes
2answers
244 views

How can I store a set of concrete components and implement “GetComponent<T>()?”

I would like an abstract class, AbstractComponentAggregate, which has many AbstractComponents. Users of my framework will create their components by extending AbstractComponent and appending the ...
3
votes
3answers
310 views

Loadbalancing Questions

I have been learning networking for about 4 months. Wrote a single standalone Multiplayer server and succeeded with authoritative approach. Now I want to extend it by splitting the single server into ...
3
votes
1answer
484 views

How to design a character animation system?

I'm searching for suggestions and resources on the possible ways to design a character animation system. I mean a system built on top of the graphics engine (as graphics engine I use Ogre3D, that ...
2
votes
2answers
231 views

Debug data visualization best practices

I found debugging games especially hard for some obvious reasons. It's hard to monitor some internal values in dynamic, conditional breakpoints helps somehow, but only to detect some specific ...
0
votes
1answer
2k views

GameObject and Components

I am creating a relatively simple game engine in C++ and Qt. I am using Irrlicht for graphics, and as of now, I will not be using any physics or audio libraries. For time's sake, I am using ...
7
votes
1answer
2k views

Turn-based JRPG battle system architecture resources

The past months I've been busy programming a 2D JRPG (Japanese-style RPG) in C++ using the SDL library. The exploration mode is more or less done. Now I'm tackling the battle mode. I have been unable ...
7
votes
2answers
1k views

How should I structure my turn based engine to allow flexibility for players/AI and observation?

I've just started making a Turn Based Strategy engine in GameMaker's GML language... And I was cruising along nicely until it came time to handle the turn cycle, and determining who is controlling ...
1
vote
2answers
490 views

Best practices, extending classes

I'm developing a game in XNA(C#) and I wonder what are the best practices for having different types of pads. For example I have 2 types of pads: Pad that just moves left (decreasing X coordinate) ...
5
votes
2answers
3k views

What are the disadvantages of using multiple inheritance to implement components?

I've been doing research on component-based game engines and would like to use that model for future game projects. From what I gather, objects in a component-based system are just collections of ...
10
votes
3answers
3k views

How to implement the logic of a trading card game's “special effects cards”?

I am trying to write a kind of a trading card game here, in some way, it is similar to Magic The Gathering, or the Yu-Gi-Oh! card game. For those of you who are not familiar with it, basically, in ...
2
votes
2answers
378 views

Would it be too much overhead to keep a HashMap of variables on a server per object for the purpose of syncing object changes with the client?

I am currently writing a server for a multiplayer game. I am trying to find a good solution for synchronizing GameObjects across the server. The server sends each client a snapshot of every object in ...
1
vote
1answer
276 views

Unit selection - logic & screen communication

I'm building a game using SFML, with disconnected logic & screen systems that run on different threads and communicate through synchronised buffers. Now, this system worked perfectly well when I ...
5
votes
2answers
606 views

Changing background texture by drawing on it?

Actually I'm sorry for the title, I'm not sure which short phrase will describe situation best. I'm porting (or remastering, I don't know which word suits better, maybe both) a Win32, pure C, DirectX ...
3
votes
2answers
168 views

Making online battles take time

Let's say I have an account on an MMORTS and I send my 10,000 strong army to a location on the map. I then shut off my computer. Another player gives orders to his 10,000 strong army to walk to the ...
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
4k 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
823 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 ...
2
votes
2answers
923 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
288 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
600 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
325 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
297 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
815 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
684 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
471 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
383 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
293 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
987 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 ...