Tagged Questions
1
vote
1answer
100 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 ...
1
vote
1answer
130 views
General Sequence of Events for a 2D shooter
I'm having some trouble understanding ways to sequence events in my game. Assume the game is data driven, what is the best way to control the events?
Do I have some sort of EventSequencer that loads ...
0
votes
1answer
113 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
149 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 ...
0
votes
2answers
106 views
XNA Game arhitecture, sharing vertices between objects
I'm practicing primitives rendering in XNA and I want to create something like pipe or tunnel.
I have base class called PipeSegment from which I inherit classes like RotatingSegment and NormalSegment ...
1
vote
2answers
176 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 ...
5
votes
4answers
677 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 ...
1
vote
1answer
173 views
Game design and SoC
I've been working on a little game for the last few months, trying to approach it as a software engineer and employ best patterns and practices in my coding. I have gotten to the point where I have to ...
3
votes
1answer
252 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 ...
1
vote
1answer
150 views
How should I organise classes for a space simulator?
I have pretty much taught myself everything I know about programming, so while I know how to teach myself (books, internet and reading API's), I'm finding that there hasn't been a whole lot in the way ...
3
votes
3answers
537 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
178 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
176 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. ...
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 ...
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
1answer
217 views
Class design for instantly switching between free-roaming world to/from battle world?
I plan to have an isometric world, which can be freely roam around. However, I desire the system to instantly apply the grid onto isometric world for battling system on any random encounter. ...
2
votes
2answers
282 views
Scroller game level map advice
I'm started a XNA project to make a game similar in gameplay to Super Spy Hunter on a NES, which is used as a feature reference. The first thing I thought of is how to store and display level. ...
2
votes
2answers
184 views
Debug data visualization best practices
I found debugging games especially hard for some obvious reasons. It's hard to monitor some internal values in dynamic, conditional breakpoints helps somehow, but only to detect some specific ...
1
vote
2answers
293 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)
...
5
votes
2answers
362 views
Changing background texture by drawing on it?
Actually I'm sorry for the title, I'm not sure which short phrase will describe situation best. I'm porting (or remastering, I don't know which word suits better, maybe both) a Win32, pure C, DirectX ...
6
votes
1answer
387 views
Global keyboard states
I have following idea about processing keyboard input. We capture input in "main" Game class like this:
protected override void Update(GameTime gameTime)
{
this.CurrentKeyboardState = ...
3
votes
3answers
1k 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
1k 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 ...
4
votes
1answer
604 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 ...
0
votes
4answers
205 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 ...
0
votes
5answers
2k views
Need opinions: is it worth making component based entity system? [closed]
I've been reading about component based entity-system for couple days now and I'm not quite sure if it is worth implementing in my next game. I haven't started making the game yet, but I have bunch of ...
2
votes
3answers
1k 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 ...
6
votes
1answer
387 views
First Steps. Windows Phone game development
I'm pretty new in game development. Have a couple ideas wich could be cool. First that comes to mind is to develop a 2D game (kinda puzzles) for Windows Phone Mango. You may ask: "Why Windows Phone?". ...
3
votes
3answers
548 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
2k 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 ...
6
votes
4answers
574 views
How should I go about abstracting away the graphics device?
I would like to be able to move my game from using a XNA graphics device to possibly an OpenGL device in the future. So I'd like to have a somewhat abstract interface to submit polygons to. Its ok if ...
12
votes
2answers
696 views
XNA: Questions regarding games architecture
So I've finally got around to playing around with XNA and have been toying around with making a 2D game (I have a bunch of art assets from a friend who developed it on iOS)
A lot of things seem to be ...
1
vote
3answers
1k views
XNA Entity Component Design: Lost on how to include Sprite Animation
I've been reading about Entity Component design and thought it's pretty neat.
I've been trying to write a quick 2D engine in XNA.
I think I've laid the proper groundwork for registering and updating ...
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 ...
9
votes
6answers
712 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 ...
3
votes
2answers
551 views
Designing the Update system (read very basic game engine) for an XNA game
I am trying to determine the best way to implement the "update" system or engine for a simple XNA game.
Description of situation
I have a few classes, lets call them
Player [will be an ...
8
votes
5answers
859 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 ...
7
votes
1answer
779 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 ...
11
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 ...
