We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [architecture]

How code is structured. For questions on the internal design of a game engine.

Filter by
Sorted by
Tagged with
10
votes
4answers
6k views

Per-Frame Function Calls versus Event Driven Messaging in Game Design

The traditional game design, as I know it, uses polymorphism and virtual functions to update game objects states. In other words, the same set of virtual functions are called in regular(ex: per-frame) ...
10
votes
11answers
2k views

How to model multiple “uses” (e.g. weapon) for usable-inventory/object/items (e.g. katana) within a relational database

So I'm working on expanding the uses of items over at www.ninjawars.net, and I'm not exactly sure how to represent them flexibly in the relational database that we use. I may be barking up the wrong ...
10
votes
3answers
1k views

Why aren't more games 64-bit executables? [closed]

Until now I've seen that many games are still compiled in 32-bit architecture although nearly 50% of current Windows users are on 64-bit OS? Why is this? If the reason is for getting larger audience (...
10
votes
5answers
10k views

How to handle netcode?

I'm interested in evaluating the different ways that the netcode can "hook into" a game engine. I am designing a multiplayer game now, and so far I have determined that I need to (at the very least) ...
10
votes
4answers
11k 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 ...
10
votes
6answers
1k views

Is it a bad idea to have Game1 static in XNA?

Is it a really bad idea to have my Game1 class as static? As at the moment in my Game1 class I have a class called ...
10
votes
3answers
5k 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 ...
10
votes
6answers
1k views

Networking Pong Clone

I have the fundamentals of TCP sockets, UDP communication etc, but can't find much on how to apply these to a real time game environment. I have a Pong clone, with 4 players, and need to synchronise ...
10
votes
2answers
1k views

Should the content pipeline tools be embedded in the engine?

How minimal should a games engine be? How much of the content pipeline should be embedded in the engine? Some use cases where the super engine might be useful: When loading user content, the user ...
10
votes
2answers
7k views

What should be contained in a game scene graph?

Would you help me to clarify, please, what what exactly should be contained within a game scene graph? See the following list, please: Game Actors? (obviously yes, all the objects changing state ...
10
votes
5answers
2k views

Cross platform low level graphic API

When creating a system abstraction is better to have the platform different APIs hidden by a common interface at the lowest level that makes sense. Taking in account the different modern (with no ...
10
votes
2answers
3k views

What's the difference between XNA Game Services and glorified global variables?

The Microsoft.Xna.Framework.Game class has a Services property that allows the programmer to add a service to their game by providing the type of the class and an ...
10
votes
1answer
4k views

To scene graph or not to scene graph?

I've been struggling with a decision regarding whether or not to implement a scene graph in my game. I have some use cases that call for such a tool, but I haven't been able to get through some of the ...
10
votes
3answers
1k views

Implementing match-making & community system for multiplayer games [closed]

These days, games often have multiplayer portals with chat channels & match making system for the multiplayer aspects of the game. An example would be battle.net, magic the gathering online's ...
10
votes
2answers
2k 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: ...
10
votes
3answers
3k views

Creating Entity as an aggregation

I recently asked about how to separate entities from their behaviour and the main answer linked to this article: http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/ The ultimate concept ...
10
votes
3answers
1k views

How should I model an economy-based game in code?

I'd like to create an economy game based on an ancient civilization. I'm not sure how to design it. If I were working on a smaller game, like a copy of "Space Invaders," I'd have no problem ...
10
votes
2answers
566 views

Should the engine for an eventual web-based game start as a web-service?

I've recently decided to start writing an engine for a card game. I'm not a big "cards" player, but a friend introduced me to the game (it's a spin on the game Danish), and I fell in love. I want to ...
10
votes
2answers
1k views

Good techniques for syncing gameplay actions to specific animation timings?

So I've come across an issue in the game I'm working on, but it seems to be a pretty fundamental thing that probably comes up in a lot of games. My game requires that some gameplay function occurs ...
10
votes
1answer
299 views

Efficient solution for multiplayer space partioning?

This question is a little tricky, but I will try to make it clear. Lets say I am building an online game (not MMO-scale), but that supports as many players as possible, in a authoritative server ...
10
votes
2answers
7k views

How to structure game states in an entity/component-based system

I'm making a game designed with the entity-component paradigm that uses systems to communicate between components as explained here. I've reached the point in my development that I need to add game ...
10
votes
3answers
959 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 ...
10
votes
1answer
628 views

How to cache resources in my homebrew rendering system

Background: I am designing a simple 3D render system for an entity component system type architecture using C++ and OpenGL. The system consists of a renderer and a scene graph. When I finish the ...
9
votes
4answers
3k views

Why should I use separate initialization and clean up methods instead of putting logic in the constructor and destructor for engine components?

I'm working on my own game engine, and I am currently designing my managers. I've read that for memory management, using Init() and ...
9
votes
4answers
4k views

Is Domain Driven Design good for games?

I've just read about Domain models and it enlightened me since I've been developing a game that has a class which only holds data (few behaviors/methods). I assigned the job of handling these classes ...
9
votes
4answers
1k views

“Time Control” in a 2d Platformer

I am making a 2d platformer where the player can press a button, and restart the level, only their previous character will also run the level at the same time, like they are traveling back in time. I ...
9
votes
3answers
1k views

Android threads trouble wrapping my head around design

I am having trouble wrapping my head around game design. On the android platform, I have an activity and set its content view with a custom surface view. The custom surface view acts as my panel and I ...
9
votes
4answers
2k views

Should I be sharing data between graphics and physics engine in the game?

I'm writing the game engine that consists of few modules. Two of them are the graphics engine and the physics engine. I wonder if it's a good solution to share data between them? Two ways (sharing ...
9
votes
3answers
1k views

Using “friend” classes in game development

Typically in C++ game development speed is valued over encapsulation, you therefore see a ton of publicly accessible class members which really shouldn't be public. I seem to find in most cases that ...
9
votes
3answers
4k 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: ...
9
votes
3answers
3k views

MVC or Components, or both?

I'm an experienced developer but recently I've been wanting to get into game programming but as you know game development is an entirely different beast from most other forms of programming (perhaps ...
9
votes
2answers
6k views

How to structure a simple game server for a multiplayer game?

I would like to create a simple multiplayer game server for a simple game: The game is supposed to be similar to Command & Conquer, you have a few tanks and a few soldiers. You can select one ...
9
votes
5answers
711 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 ...
9
votes
3answers
877 views

How do AI agents access information about their environment?

This might be kind of a trivial question, but I am having trouble understanding this. Would very much appreciate your help. In game development using object oriented design, I want to understand how ...
9
votes
1answer
4k views

Game programming: common methods and design patterns [closed]

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 ...
9
votes
3answers
405 views

Is it a good idea to simplify a character-driven game engine to the point where it's unnecessary to learn scripting/programming?

I remember, and I still think, that one cannot even make a prototyped 3D game to test just simple behaviors without using gigantic tools like unity or knowing extensive C++ programming, design ...
9
votes
4answers
1k views

Using idle time in turn-based (RPG) games for updating

If you take any turn based RPG game there will be large periods of time when nothing is happening because the game is looping over 'wait_for_player_input'. Naturally it seems sensible to use this time ...
9
votes
3answers
734 views

What pattern is this, and should I do it?

I'm making a game in as3 using flash develop and flash cs5. Everything is object oriented. I was wondering, should I have one "gateway" class that has a property-reference to all instantiations of ...
9
votes
3answers
12k views

Synchronizing clients with a server and with each other

What is the best way for keeping all clients synchronized with a server and with each other? Currently, we have two approaches in mind: When a client sends something to the server, the server ...
9
votes
3answers
464 views

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

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 ...
9
votes
1answer
6k 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 ...
9
votes
2answers
668 views

What role does developing with events have in games?

Most application development is based around developing with events, but considering the game-loop style of developing games and the (often) need for high performance/throughput, what role does ...
9
votes
1answer
1k views

Am I on the right track with this component architecture?

I've recently decided to revamp my game architecture to get rid of deep class hierarchies and replace them with configurable components. The first hierarchy I'm replacing is the Item hierarchy and I ...
9
votes
2answers
5k views

Information on seamless MMO server architecture

I'm looking for any material on seamless MMO servers! I do have a few articles in the "Massively Multiplayer Game Development" books and "Game Programming Gems 5." Has anyone experience on that topic ...
9
votes
2answers
1k views

Many sources of movement in an entity system

I'm fairly new to the idea of entity systems, having read a bunch of stuff (most usefully, this great blog and this answer). Though I'm having a little trouble understanding how something as simple ...
9
votes
5answers
1k views

How can I update Display settings from an Options screen without restarting?

I'm currently creating a 2D RPG in C++11 with Allegro 5 and boost. My goal is to somehow update my game settings when an option is changed in the Options Menu. I don't want to force the user to ...
9
votes
1answer
171 views

Broad topics needed for teaching game development [closed]

I am going to be doing a presentation on game development to an iPhone user group in the near(ish) future. My audience are iPhone developers, but not necessarily very experienced ones, and this is ...
9
votes
3answers
840 views

Flexible alternatives to many many small polymorphic classes (for use as properties or messages or events) C++

There are two classes in my game that are really useful, but slowly becoming a pain. Message and Property (property is essentially a component). They both derive from a base class and contain a ...
8
votes
6answers
2k views

Game Engine framework or library [closed]

I'm on the planning stages for an internal game engine I am about to start creating, which will be used for all my games going forward. But I'm struggling a bit with how it should be built. The ...
8
votes
4answers
4k 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 -> ...