Questions tagged [architecture]

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

Filter by
Sorted by
Tagged with
7
votes
1answer
1k views

In XNA, should I use the built-in game component classes?

I'm just getting started on an XNA game for Window Phone 7. For my Flash games I have my own framework that I was just going to port from AS3, but I have just found the built-in game component stuff ...
25
votes
3answers
3k views

What can cause ALT-TAB to be 'annoying'/slow/glitchy?

This is more of an open ended question, but I hope to get some good insight on how to avoid the issue. When playing Games on Windows, I might want to ALT-TAB out of it. Some games have no problems, ...
6
votes
5answers
760 views

How should I isolate game entities with their concrete Drawable components (in C#)?

I've designed my game entities using a common pattern of separating the entity from its components. In my case, I've used the Strategy pattern to give each of my entities an IDrawable component. I ...
12
votes
2answers
2k views

What are effective strategies for a small game development team? [closed]

What are language/platform-agnostic best practices for a small game development team of intermediate to advanced developers? High-level strategies (as well as suggestions in terms of frameworks, ...
20
votes
6answers
18k views

How do I build a 2D physics engine? [closed]

The most advanced games I've made are a 8-ball pool game made with the physics engine Box2dFlashAS3 and a platform game with levels. When I did platform games, I've always wished to know how to make ...
11
votes
1answer
3k views

Register Game Object Components in Game Subsystems? (Component-based Game Object design)

I'm creating a component-based game object system. Some tips: GameObject is simply a list of Components. There are ...
8
votes
4answers
548 views

What's the best practice to have NPC enemies taking cover in an FPS game?

My question is about the data structure (and logical way to use this structure) behind this type of comportment of NPC enemy : How does he computes the place where he can take cover when the player is ...
2
votes
3answers
2k views

Game state sharing data

A game is a set of Game States. Each Game State contains game objects, may be list, may be scene graph or any other data structure. We can use Game States as Game Locations, too. How do you share ...
14
votes
4answers
4k views

How can I design an effective game object interaction scheme with a component-based architecture?

This is a design question... I'm sure this could be generalized more, but I'm having a hard time with it. I am wondering about design for game object interactions - here is my example (2D puzzle-...
20
votes
2answers
3k views

Component-Based System online resources [closed]

I've been considering moving to a more component-based approach in my games. Does anyone else have any decent reference material or sample implementations that would help make this transition a little ...
5
votes
3answers
2k views

Deal with mini states in game

Hi :) I want to ask what is the best way to deal with "mini-states" in game? For example I making game like Simcity, i can build buildings, roads, rails, or I can change something in economy. I am ...
4
votes
5answers
2k views

What is the best approach to resource management in game design?

I studied computer engineering before but have been lagging in the technical aspects as of late. Seeing as I think it would be to my advantage as a designer to understand how resources are used and ...
155
votes
8answers
48k views

Why are MVC & TDD not employed more in game architecture? [closed]

I will preface this by saying I haven't looked a huge amount of game source, nor built much in the way of games. But coming from trying to employ 'enterprise' coding practices in web apps, looking at ...
22
votes
4answers
3k views

Architecture a for a central renderer rather than self-rendering [duplicate]

For the architectural side of rendering, there's two main ways: having each object render itself, and having a single renderer which renders everything. I'm currently aiming for the second idea, for ...
33
votes
7answers
3k views

Elegant way to simulate large amounts of entities within a game world

Assume you have a game in which there are many (many many) entities serving some functions, not all of which are constantly needed or need to be considered in every frame. The concrete problem I am ...
13
votes
5answers
11k views

Keyboard input system handling

Note: I have to poll, rather than do callbacks because of API limitations (SFML). I also apologize for the lack of a 'decent' title. I think I have two questions here; how to register the input I'm ...
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 ...
25
votes
4answers
4k views

How to design a game's software such that it is easy to unit test?

Is it practical to use a testing framework like JUnit in a game development situation? What sort of design considerations can you follow in order to make your game more testable? What parts of a game ...
17
votes
5answers
916 views

Getting It Done vs Solid Software Design?

With barely enough time at our hands to complete the games we craft, how can you strike a good balance between solid software architecture and making good progress to get it all done? My personal ...
4
votes
2answers
2k views

Simple scene graph in 2D, without matrices?

First of all, I think I roughly know how a scene graph works. Please correct me if I'm wrong. It is a tree based structure, with each branch/leaf being a node. It means you can better organise ...
3
votes
8answers
3k views

What is today's target platform?

The question came randomly and I think it will really help to know from everyone's experience. It all started from this article on gamedev.net http://www.gamedev.net/reference/programming/features/...
14
votes
2answers
5k views

Tips for implementing MMO quest mechanics?

What tools, patterns, or best practices would you recommend to implement the quest mechanics given below listed requirements? I am talking about software architecture (how generic should you be) and ...
7
votes
3answers
831 views

Storing game objects in multiple containers

In the light of DRY, it seems desirable to store a collection of related game objects in one container only. However, one might need sub-collections of these objects in various contexts. It might be ...
30
votes
11answers
8k views

Alternative to Game State System?

As far as I can tell, most games have some sort of "game state system" which switches between the different game states; these might be things like "Intro", "MainMenu", "CharacterSelect", "Loading", ...
6
votes
6answers
316 views

Where are the requirements documents for console game software?

I hear that the console game platforms have strict requirements for their games. For example I just read an answer that stated loading screens must have an animation on them so that the game doesn't ...
2
votes
2answers
1k views

Audio Design and XAudio2 Performance Issues

I have a very basic understanding of audio and was hoping I could get some help to resolve a problem with the audio design in my engine. Let me give you a run-down of how I've currently got it fitting ...
20
votes
4answers
13k views

Resource Managers - Are they any good?

I've seen many a time in source code, things like this [well, this is more of a pseudo C++ idea of mine] ...
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 ...
12
votes
9answers
12k views

How to go about GUI elements?

Note: I plan on making my own GUI system. It will be good for learning, lightweight, only have bits I need, ties in with the game, etc. I was thinking about how to do it. The elements I mean are: ...
52
votes
10answers
20k views

Game State 'Stack'?

I was thinking about how to implement game states into my game. The main things I want for it are: Semi-transparent top states-being able to see through a pause menu to the game behind Something OO-I ...
26
votes
5answers
13k views

How to design an AssetManager?

What is the best approach to designing an AssestManager that will hold references to graphics, sounds, etc. of a game? Should these assets be stored in a key/value Map pair? I.e. I ask for "...
17
votes
4answers
2k views

What is involved for a simple UDP game?

I once tried to write a simple game with UDP in a week as a throwaway test. It went horribly. I threw it away early. The main problem i had was restoring the game state of all players/enemies/objects ...
11
votes
5answers
1k views

Should beginning/indie game developers target multiple platforms initially?

Partially as a response to How do game developers target multiple platforms (Xbox 360, PS3, PC and Linux)? but mainly because there are people on here with published games, should cross platform be ...
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 ...
11
votes
5answers
3k views

Why use asset manifest files?

Sometimes you'll see people recommend that rather than using graphics/sound files/etc. like this... // Game code Image myImage = new Image("path/to/image.png"); ....
42
votes
7answers
36k views

Where can I find good (well organized) examples of game code? [closed]

Where can I find good (well organized) examples of game code? I'm hoping that I can pick up some organizational tips. Most examples in books are too short and leave out lots of detail for the sake of ...
-5
votes
2answers
547 views

How do I make connection between entities? [closed]

UML diagram + explanations. Bonus if I can make it happen in Java. Also killing panda is bad =)
12
votes
6answers
451 views

Should I put a soundtrack behind my strategy game? Which games need music and sound

Shuffling cards and impact noises are cool (it is a card based game), but should I invest the time/effort in hooking up background music? I have found Play Audio from Stream Using C# which could be ...
4
votes
3answers
2k views

Player sprite animation in 2D platform game

It's pretty easy to get animations rolling from a sprite sheet. Though which ways there are on combining the animations with player dynamics and motion? I've figured there's two starting points ...
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 ...
116
votes
9answers
18k views

How does entity communication work?

I have two user cases: How would entity_A send a take-damage message to entity_B? How ...
54
votes
7answers
7k views

How can I set up a flexible framework for handling achievements?

Specifically, what is the best way to implement an achievement system flexible enough to handle going beyond simple statistics-driven achievements such as "kill x enemies." I'm looking for something ...
11
votes
4answers
421 views

Same game logic on two separate graphic libraries

What code philosophy/structure of abstraction/program design would allow a game to be used with both 2D and 3D graphics (separately) WITHOUT having to re-code the Game logic? We're talking taking ...
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
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 ...
5
votes
2answers
384 views

How to handle game states for a single-player / multiplayer game? [closed]

I'm developing a little simon-like game and I'd like to know what the best approach is when it comes down to game states. What would be the best approach? Creating different states/screens for 1-...
130
votes
3answers
82k views

How should I write a main game loop? [closed]

How should I write a main game loop? What are some things that you should do in the game loop, and what are some things that you shouldn't do in the game loop? I've written plenty of them, but I've ...
6
votes
2answers
379 views

Tips for developing 3D games on newer engines targeting old hardware [closed]

I see a lot of examples and tutorials for 3D engines like Unity3D, UDK, Source etc. They all seem to be under the assumption that you are making a game for current(ish) hardware. I would like some ...
8
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
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 ...