Questions tagged [architecture]

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

Filter by
Sorted by
Tagged with
4
votes
2answers
1k views

Multiplayer architecture in games like Diablo 2

So I've been wondering, what kind of architecture would games like world of warcraft, diablo 2 (which is most probably a different beast than WoW) use? As far as I know, RTS games state-syncs every ...
9
votes
3answers
753 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 ...
21
votes
3answers
1k views

Do I, and how, separate the concerns of input and game objects?

In probably every game a developer has to somehow deal with input, may it be simple keyboard and mouse events, touch events or something as accelerometer input. This input directly of indirectly ...
5
votes
3answers
359 views

Should I store game settings in my game data class?

I'm working on a small-ish 2d fixed shoot 'em up for iPhone. I have a master Game object that stores lives, score, current level, etc... The game will have some other persistent attributes like ...
14
votes
1answer
2k views

Why is is so hard to develop a game console emulator?

I have always found emulators rather fascinating. I would seriously like to create an emulator for an older ganeration console or handheld. It would help me gain a greater appreciation of the hardware ...
16
votes
4answers
6k views

Alternatives to Singletons / globals

I've heard countless times about the pitfalls of Singletons / globals, and I understand why they're so often frowned upon. What I don't understand is what the elegant, non-messy alternative is. It ...
4
votes
2answers
886 views

Server-client communication: Quick and verbose or involved and compact?

TL;DR: Does the short development time required for HTTP/XML offset its size issues compared to developing a custom protocol? As some of you might have divined; I'm currently working on a turn-based ...
20
votes
5answers
11k views

noSQL - Is it a valid option for web based game? [closed]

Out of an opportunity and boredom, a friend and I decided to make a web based game. This is the first 'game' I will be making, since usually I program web apps in django. I've opted to use the same ...
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 ...
8
votes
5answers
1k views

Managing multiple references of the same game entity in different places using IDs

I've seen great questions on similar topics, but none that addressed this particular method: Given that I have multiple collections of game entities in my [XNA Game Studio] game, with many entities ...
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 ...
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 ...
26
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
764 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
19k 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
562 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 ...
156
votes
8answers
50k 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
12k 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
942 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
6k 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
838 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
318 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 ...
21
votes
4answers
15k 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
13k 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
21k 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
14k 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 ...
12
votes
5answers
4k 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
37k 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
551 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
472 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 ...