Tagged Questions
11
votes
3answers
598 views
I want to get rid of my make-everything-static-and-global design pattern, but how?
I'm making a little dungeon crawler in space, and I'd like to hear some advice on how to make the backend of the engine nicer. Basically, currently everything is based on a crapload of managers:
...
9
votes
3answers
2k views
Creating Entity as an aggregation
I recently asked about how to separate entities from their behaviour and the main answer linked to this article: http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/
The ultimate concept ...
5
votes
4answers
769 views
Database structure for a trading cards video game (TCG)
Just started and after pondering with registered users' table everything came to a halt.
So far I've got:
+----------------------+
| tblUsers |
+----------------------+
| ...
5
votes
4answers
602 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 ...
3
votes
3answers
675 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 == ...
3
votes
2answers
629 views
Receiving user commands in a text based console game
I'm working on a little text based console game for a bit of fun and am starting work on the user commands entered into the console.
Are there some good design patterns for deciding what to do with ...
3
votes
0answers
357 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 ...
2
votes
2answers
1k views
How do I get access to the SpriteBatch service in my Sprite class using XNA?
I have the following Sprite class (leaving out everything that doesn't pertain to my question):
public class Sprite
{
public Texture2D Texture { get; set; }
public Vector2 Position { get; ...
1
vote
0answers
194 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 ...