Design pattern is a general reusable solution to a commonly occurring problem within a given context in software design.
8
votes
3answers
227 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
153 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
137 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
68 views
Design: 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 ...
0
votes
2answers
220 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
159 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
133 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
150 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
278 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 ...
6
votes
1answer
239 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
172 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 ...
2
votes
2answers
423 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
295 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
305 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
184 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 ...
5
votes
1answer
128 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
147 views
State Machine with State per Entity
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
122 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
118 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 ...
2
votes
0answers
259 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
381 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 ...
2
votes
1answer
316 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.) ...
1
vote
1answer
161 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
158 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
364 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 ...
26
votes
4answers
1k 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
372 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
156 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
510 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 ...
7
votes
2answers
866 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 ...