Design pattern is a general reusable solution to a commonly occurring problem within a given context in software design.
2
votes
1answer
88 views
Where to put common System functionality in Entity-System Design?
I am working on an Entity System design based largely off of Adam Martin's design and Ray Wenderlich's Objective-C Implementation.
I am working on the AI system using a state machine with a System ...
0
votes
0answers
43 views
inheritance and state machine with flyweight pattern
I everyone, i'm working on an indie game and i'm stuck with two problems
I have many similar units on screen so i decided to implement the flightWeight pattern so there is intrinsic and extrinsic ...
0
votes
1answer
154 views
Ideas wich design patterns apply in my school assignment [closed]
For a assignment for school i've to develop a game in Microsoft XNA 4. Let me first clear out that my intention of this post is NOT to give me codes. I want to figure out things by my self. The ...
4
votes
2answers
361 views
Component based game engine and dependencies - singletons [closed]
I am thinking about how to create component based game engine.
I understand that all things should be very similar as in Data Oriented Design (each object is a collection of various structures as ...
2
votes
1answer
124 views
What is the best design pattern to apply effects and abilities?
What would be the best design pattern to apply effects and abilities in a game. For example:
I have a unit that has base stats like attack power, defense etc. The unit can hold several items that ...
4
votes
2answers
484 views
Game Editor plugin architecture
I'm creating 3D Game Editor for my own use. As rendering i took Ogre3D and MFC as UI.
I faced with architecture problem.
I am using Document/View architecture and for each Doc. i create new ...
1
vote
0answers
80 views
What is the right way to use a QStateMachine for a text adventure game?
I have seen a couple topics about this already but they were a bit vague for me so I decided to make this. I'm working on a little adventure game just for fun in Qt, its basically just text on the ...
13
votes
5answers
736 views
Dictionary of common names for code objects
I'm looking for a common dictionary of terms (much like design patterns have a common language for how things interact) that are specific to games.
For instance, if I'm making a game of pong with a ...
6
votes
1answer
225 views
Rule / validation design pattern
What design patterns can be used to create a rule / validation system for a game like chess (this is just a simple example, the actual game needs more difficult sets of rules)
I've read several ...
12
votes
2answers
596 views
Design of a turn-based game where actions have side-effects
I am writing a computer version of the game Dominion. It is a turn-based card game where action cards, treasure cards, and victory point cards are accumulated into a player's personal deck. I have the ...
3
votes
2answers
260 views
Making character's skills and abilities as commands, good practice?
I am designing for a game that consist of characters who have unique offensive skills and other abilities such as building, repairing, etc. Players can control multiple of such characters.
I'm ...
5
votes
4answers
661 views
Retrieving components from game objects (entities)
Using C# and XNA 4, I've made the decision to go for an entity-component based design for my game after reading such posts as this and this, but I'm now struggling to find how to retrieve components ...
8
votes
3answers
251 views
How to have operations with character/items in binary with concrete operations?
I have the next problem.
A item can have a lot of states:
NORMAL = 0000000
DRY = 0000001
HOT = 0000010
BURNING = 0000100
WET = 0001000
COLD = 0010000
FROZEN = 0100000
POISONED= ...
1
vote
1answer
192 views
How can I refactor my code to use fewer singletons?
I started a component based, networked game (so far only working on the server). I know why singletons can be bad, but I can't think of another way to implement the same thing. So far I have:
A ...
-1
votes
3answers
200 views
correct pattern to handle a lot of entities in a game
In my game I usually have every NPC / items etc being derived from a base class "entity".
Then they all basically have a virtual method called "update" that I would class for each entity in my game at ...
1
vote
1answer
108 views
How to model / where to store relational data between classes
I'm trying to figure out the best design here, and I can see multiple approaches, but none that seems "right."
There are three relevant classes here: Base, TradingPost, and Resource. Each Base has a ...
2
votes
2answers
434 views
References about Game Engine Architecture in AAA Games
Last weeks I focused on game engine architecture and learned a lot about different approaches like component based, data driven, and so on. I used them in test applications and understand their ...
1
vote
2answers
174 views
Which are the cons of using only non-member functions and POD?
I'm creating my own game engine. I've read these articles and this question about DOD and it was written to not use member functions and classes. I also heard some criticism to this idea.
I can ...
3
votes
1answer
180 views
Settings object with singleton pattern
I need to build an object that will have only one instance because this Object is dedicated to the storage of vital settings for my application and I would like to avoid a misuse of this type or a ...
5
votes
1answer
201 views
Dynamic Components
I am attempting to design a component-based architecture that allows Components to be dynamically enabled and disabled, much like the system employed by Unity3D. For example, all Components are ...
4
votes
3answers
570 views
How can be data oriented programming applied for GUI system?
I've just learned basics of Data oriented programming design, but I'm not very familiar with that yet. I've also read
Pitfalls of Object Oriented Programming GCAP 09. It seems that data oriented ...
7
votes
1answer
349 views
Pattern for performing game actions
Is there a generally accepted pattern for performing various actions within a game? A way a player can perform actions and also that an AI might perform actions, such as move, attack, self-destruct, ...
2
votes
1answer
227 views
Techniques for separating game model from presentation
I am creating a simple 2D game using XNA.
The elements that make up the game world are what i refer to as the "model".
For instance, in a board game, i would have a GameBoard class that stores ...
3
votes
2answers
682 views
Monster's AI in an Action-RPG
I'm developing an action rpg with some University colleagues. We've gotton to the monsters' AI design and we would like to implement a sort of "utility-based AI" so we have a "thinker" that assigns a ...
-2
votes
1answer
360 views
The most popular pattern for game-related programming in C++ [closed]
As the title says, what are the most popular design solutions when creating a new game or a new game engine?
3
votes
2answers
458 views
Design pattern for creating multiple enemies
I'm currently attempting to implement a factory method pattern for creating multiple different enemies after loading data from a file. But I'm having second thoughts on what would be the best design ...
0
votes
1answer
282 views
Trouble with the State of things in XNA
I'd decided to break the mold and make my first game based on RPG mechanics (note sarcasm). An RPG style action bar would be a reasonable and fun way to get started as it's limited in scope but still ...
6
votes
1answer
158 views
Applicability of Business Architectures in XNA 4
I've done a lot of C# programming and the architecture we use of late is a MVC => PresentationService => Domain Service And/OR DataService => Repository with a UnitOfWork and a messaging bus. In web ...
1
vote
0answers
195 views
State Machine with State per Entity [closed]
I have a generic state machine implementation like this:
public abstract class State<TOwner>
{
public virtual void OnEnter(TOwner owner) { ... }
public virtual void OnExit(TOwner ...
0
votes
1answer
141 views
Design patterns for effects between actors and technology
I'm working on my first game, and taking the opportunity to brush up my C++ (I want to make as much of it as portable as I can.)
Whilst working on the technology tree and how it affects actors ...
0
votes
1answer
164 views
How to keep balance / Unlock items / achievement rules
I'm working on an engine for a game, too learn javascript and just because its fun. I'm a flashdeveloper, I know how to build websites. Now making games is a different challenge, javascript is a ...
3
votes
0answers
360 views
Any recommended books/resources on component-based design?
I come from a background with heavy use of the classical object-oriented paradigm for software development.
The company I am a part of switched to Unity not too long ago, and we're all very excited ...
0
votes
4answers
488 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 ...
3
votes
1answer
382 views
Design patterns in Game Physics
In the frames of a number crunching compatible programming language (say.. C++), what would be an elegant solution for adding self collision, external collision and integration step (Euler, etc.) ...
2
votes
2answers
259 views
AS3: Using singletons for sound managers [duplicate]
Is it necessarily a bad thing to use a singleton for a sound manager?
I am having a really tough time determining whether or not I should go ahead and use a singleton (which is easy/it works) or if I ...
1
vote
1answer
204 views
Where in code to for collision? In object class? Mainline code?
Making a simple game in Love 2D framework where if I click on an object then it disappears.
Do I check to see if I've clicked the enemy inside a function in the enemy object? Or just in my main.lua? ...
1
vote
1answer
203 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 ...
1
vote
3answers
406 views
How to expose game data in the game without a singelton?
I'm quite new to cocos2d and games programming, and am currently I am writing a game that is currently in Prototype stage. Everything is going okay, but I've realized a potentially big problem and I ...
29
votes
4answers
2k 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 ...
0
votes
1answer
473 views
In some games, we just let the main() loop be the Player object or Table object?
I was thinking that let's say if there is a game of Blackjack or MasterMind, then we should have a class called Dealer or ComputerPal, which is how the computer interact with us (as a dealer for ...
3
votes
1answer
164 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
651 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 ...
8
votes
3answers
2k 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 ...
7
votes
3answers
386 views
Profiling and containing memory per system
I have been interesting in profiling and keeping a managed memory pool for each subsystem, so I could get statistic on how much memory was being used in something such as sounds or graphics. However, ...
9
votes
1answer
363 views
Is it worthwhile to use particle pools in managed languages?
I was going to implement an object pool for my particle system in Java, then I found this on Wikipedia. To rephrase, it says that object pools aren't worth using in managed languages like Java and C#, ...
0
votes
1answer
48 views
What is the best way to implement host-migration application design?
I'm trying to wrap my head around how any one of the clients could become a new host should the current host leave the game. I'm not looking for any code, but more of a high level application design ...
5
votes
2answers
347 views
Software engineering theory for hobbyist developers
In playing around with my hobby projects in various object oriented languages, I have realized that creating good class structure and program architecture is both crucial and not straightforward to ...
3
votes
3answers
680 views
How to refactor and improve this XNA mouse input code?
Currently I have something like this:
public bool IsLeftMouseButtonDown()
{
return currentMouseState.LeftButton == ButtonState.Pressed && previousMouseSate.LeftButton == ...
1
vote
3answers
297 views
What is the ideal way to separate presentation and logic, and when is it OK to combine them?
I'm still somewhat new to "proper" design, but I'm trying to keep with it as much as possible. I thought I was OK but I've run across a slight dilemma: how should I be implementing the actual drawing ...
12
votes
3answers
562 views
Design patterns for rules systems?
As a quick fun project, I tried writing a solitaire game. But when getting to writing up the rules systems, I felt dirty, because my code felt completely unstructured and inextensible, mainly because ...
