1
vote
1answer
121 views

Sever Structure for a Turn Based Game (Chess) [closed]

I am working on a Turn-based Game (Chess) I have done the client part and single player mode so AI is no problem here. But the only problem is now I want to make my project multiplayer. I have done ...
7
votes
1answer
211 views

Optimize state changes within a render queue

I am refactoring some parts of the game engine I am working on. This engine is made in C# with XNA. The part I have trouble with is shader/material and the render queue. In the new version I will ...
2
votes
3answers
680 views

Event/Trigger System Architecture

The Plan I am up to write write an own Trigger/Event System, an event engine or how you call it. I would like to achive something similar to Blizzard's most level editors, like Starcraft 1-2, ...
13
votes
2answers
3k views

What is the standard C# / Windows Forms game loop?

When writing a game in C# that uses plain-old Windows Forms and some graphics API wrapper like SlimDX or OpenTK, how should the main game loop be structured? A canonical Windows Forms application has ...
2
votes
2answers
235 views

In a ES system, how one would implement/ deal with Modifiers?

Given the normal entity-component-system architecture, lets say we a component that give the entity Strength. Now on the game flow I want to give +4 strength do to the wielded weapon. What would be ...
4
votes
1answer
592 views

Material System

I'm designing Material/Shader System (target API DX10+ and may be OpenGL3+, now only DX10). I know, there was a lot of topics about this, but i can't find what i need. I don't want to do some kind of ...
1
vote
1answer
186 views

When to use GameComponents?

I know what it is and I'm using it as a frame counter for example. But when should I use it? Does it make sense to say "I make all the input handling happen in a gamecomponent"? Is it flexible enough ...
0
votes
1answer
195 views

xna creating game stage management contrls

I am under planning stage of my game where I am creating controls for my game. I have create below control for stages but have no idea how this we can achieve in xna. Please also help me with your ...
0
votes
1answer
238 views

Xna “Game.Run” method appears to be using up a lot of resources in my game, is this normal?

The question really is in the heading, but i have been using the visual studio profiler to optmisie my game, i have noticed that the game.run method is eating through 93.6% of the overall game ...
1
vote
2answers
281 views

How to store different abilities in player class?

So, I have a player class with basic actions. During the gameplay he unlocks new abilities. I don't know how to store new actions within the player class. To be precise - I know how, but my method ...
1
vote
4answers
621 views

What is a good way to load more than a million images for a collectible card game?

I'm using C# with MonoGame and I'm wondering what would be an efficient way to load more than a million card images for a collectible card game. More cards would be continuously added in future ...
6
votes
4answers
2k 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 ...
4
votes
1answer
458 views

XNA Moddable Game - Architecture Design and Reflection

I've decided to embark on an XNA moddable game project of a simple rogue style. For all purposes of this question, I'm going to not be using a scripting engine, but rather allow modders to directly ...
4
votes
3answers
254 views

Efficient Algorithm for Recording gameplay's objects positions

So, I have a game idea in mind, and for that I need to record the game around the player. I'me not talking about recording it as video, but rather recording the scene objects, and their positions ...
2
votes
3answers
1k views

Snake Game Help

I am making a snake game and learning XNA at the same time. I have 3 classes : Game.cs, Snake.cs and Apple.cs My problem is more of a conceptual problem, I want to know which class is really ...
1
vote
2answers
208 views

Is 2 lines of push/pop code for each pre-draw-state too many?

I'm trying to simplify vector graphics management in XNA; currently by incorporating state preservation. 2X lines of push/pop code for X states feels like too many, and it just feels wrong to have 2 ...
2
votes
1answer
300 views

2D scene graph not transforming relative to parent

I am currently in the process of coding my own 2D Scene graph, which is basically a port of flash's render engine. The problem I have right now is my rendering doesn't seem to be working properly. ...
0
votes
2answers
315 views

Designing a “Grid” like object that contains game objects

I am working on a 2D game, where there's a game "board" on which other game objects are placed. This this is 2D, my starting point was to design a class that will internally use a 2d array for the ...
2
votes
2answers
163 views

Handling of data sharing between framework module

I am currently developping a 3D game using C# / XNA 4.0 and i am currently thinking about how i should structure my game. The actual game is in fact not really important as the framework i am working ...
3
votes
0answers
532 views

Any recommended books/resources on component-based design? [closed]

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 ...
1
vote
2answers
467 views

Best practices, extending classes

I'm developing a game in XNA(C#) and I wonder what are the best practices for having different types of pads. For example I have 2 types of pads: Pad that just moves left (decreasing X coordinate) ...
3
votes
3answers
2k views

How to access SpriteBatch, Input, and ContentManager from all game screens?

I'm trying to make a Game State Manager and I'm using the Microsoft Game State Management Sample as guidance. However, I want a more simplistic design (no transitions, reflection, or support for ...
4
votes
2answers
2k views

Performance/architectural implications of calling SpriteBatch.Begin/End in many different places?

I notice some code samples only call SpriteBatch.Begin and SpriteBatch.End in the game's main draw method and then draw everything within that method through direct SpriteBatch.Draw calls or indirect ...
10
votes
3answers
543 views

Good way to play a sound when something happens? How does this sound?

So I was thinking about how monolithic my classes get a lot of the time. For example, in the Character class's Jump method, one may have a reference to a sound effect object and play that. By itself ...
5
votes
1answer
882 views

What are the drawbacks of this messaging system implementation?

So I've just been thinking about component and messaging systems recently for simple C# XNA games and came up with this. How extensible would this implementation be and what are the drawbacks? Example ...
1
vote
4answers
238 views

Designing a game that allows for selectable perks/customization

Call of Duty games all have the core functionality of any FPS (walking around, killing, dying and repeat). Layered on top are various stuff. Of interest to me is during pre-game when you pick your ...
2
votes
3answers
2k views

Building an XNA Game Engine: Loading Sprites outside of LoadContent()

I'd like to build an engine in XNA, primarily for a 2D RPG. At first, I began abstracting out some classes and built a Sprite class which wrapped a Vector2 and a Texture2D, and tried loading in ...
3
votes
3answers
651 views

Why large builder classes rather than separate clases in component-based entity systems?

I was reading about component-based entity systems and I was wondering why there is usually a large EntityBuilder class with methods like CreatePlayer(), CreateEnemySpaceship(), and CreatePowerup(), ...
10
votes
5answers
3k views

How to properly handle collision in a component-based game?

Trying to wrap my head around the ways to properly handle collision in a game designed around components. I see many examples have some sort of PhysicsComponent that gets added to the entity's list ...
9
votes
2answers
2k views

What's the difference between XNA Game Services and glorified global variables?

The Microsoft.Xna.Framework.Game class has a Services property that allows the programmer to add a service to their game by providing the type of the class and an instance of the class to the Add ...
12
votes
2answers
3k views

Inheritance vs Composition

I make my money in C# Generally in that language I like to decouple everything to the high heavens using interfaces. This has served me well in enterprise code but in writing games in C# I find myself ...
16
votes
4answers
1k views

Game engine: a decent way, architecture-wise, to implement scripting support?

I am developing a simple game engine (in C#, if it matters), and I can't think of a decent enough way to implement scripting in terms of architecture. It's a simple turn-based strategy with custom, ...
11
votes
3answers
686 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: ...
10
votes
5answers
803 views

Nested input in an event-driven system

I am using an event-based input handling system with events and delegates. An example: InputHander.AddEvent(Keys.LeftArrow, player.MoveLeft); //Very simplified code However, I started wondering ...
5
votes
6answers
2k views

Making classes available to others

I'm currently working on a 2D game engine in XNA, and I am very interested in architecture, and how best to let my game objects communicate. I know a lot of people use a Singleton design but I ...
21
votes
6answers
5k views

What designs are there for a component based entity system that are user friendly but still flexible?

I've been interested in the component based entity system for a while, and read countless articles on it (The Insomiac games, the pretty standard Evolve Your Hierarchy, the T-Machine, Chronoclast ... ...
6
votes
1answer
2k views

Developing a card game framework

What sort of design patterns and ideas might one use to build a somewhat general purpose card game framework? This stems from I made an attempt to build a clone of the popular Steve Jackson game ...
3
votes
2answers
374 views

Where should input be used?

I'm working on an input system (in C#) and now I'm wondering, what is the best place to put input functionality? Currently what I was coding was a bunch of delegates which act as callbacks (i.e. ...
10
votes
6answers
892 views

Is it a bad idea to have Game1 static in XNA?

Is it a really bad idea to have my Game1 class as static? As at the moment in my Game1 class I have a class called TileHandler which handles everything to do with my current set of tiles, and ...
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 ...
12
votes
4answers
2k 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 ...