Engine-design related questions. How code is structured.

learn more… | top users | synonyms (2)

22
votes
4answers
2k 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 ...
30
votes
7answers
2k 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 ...
11
votes
5answers
4k 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 ...
9
votes
2answers
734 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 ...
20
votes
4answers
2k 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
815 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
1k 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
1k 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 ...
13
votes
3answers
3k 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
679 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 ...
28
votes
10answers
4k 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", ...
5
votes
6answers
285 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
670 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 ...
17
votes
4answers
5k 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] typedef shared_ptr<Resource> ResourcePtr;// for ease ResourcePtr sound1 = ...
10
votes
9answers
5k views

GUI Elements - How to go about them?

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: ...
42
votes
10answers
10k 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 ...
18
votes
4answers
3k 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 ...
10
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 ...
9
votes
5answers
762 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 ...
8
votes
5answers
1k 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"); ... you should use a manifest file ...
32
votes
7answers
14k views

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

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 ...
-4
votes
2answers
525 views

How to make connection between entities?

UML diagram + explanations. bonus if I can make it happen in Java. Also killing panda is bad =)
12
votes
6answers
398 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
589 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 ...
90
votes
9answers
10k views

Entity communication: Message queue vs Publish/Subscribe vs Signal/Slots

How do game engine entities communicate? Two use cases: How would entity_A send a take-damage message to entity_B? How would entity_A query entity_B's HP? Here's what I've encountered so far: ...
41
votes
7answers
4k 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 ...
9
votes
4answers
303 views

Same game logic on two seperate graphics libraries

What code philosophy/structure of abstraction/program design would allow a game to be used with both 2D and 3D graphics (seperately) WITHOUT having to re-code the Game logic? We're talking taking ...
10
votes
3answers
413 views

64-bit platform for game?

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 O/S? why is it? if the reason is for getting larger audience ...
10
votes
5answers
1k 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
265 views

How to handle game states for a 1/2-player game?

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 ...
84
votes
3answers
27k views

Tips for writing the main game loop? [closed]

Can anyone recommend some good tips, articles, sites, etc. for writing the 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 ...
6
votes
2answers
303 views

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

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 ...
6
votes
3answers
4k 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 ...
8
votes
2answers
4k 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 ...
89
votes
11answers
15k views

Good resources for learning about game architecture? [closed]

Are there any good resources for learning about game architectures? I am looking for high level overviews of different architectures. I tend to find information about the various pieces of a game such ...
10
votes
3answers
788 views

How do I make complex AI manageable? [closed]

In the past, I've used simple systems like finite state machines (FSMs) and hierarchical FSMs to control AI behavior. This pattern falls apart very quickly or any complex system. I've heard about ...