XNA is a game framework by Microsoft that allows deployment for Xbox Live Indie Games as well as Windows Phone 7.
0
votes
1answer
117 views
Let the Game (singleton) handles the Components to add to the game
I have a class 'Bullet' implementing the DrawableGameComponent. What I want is, that the Bullet add itself to the Game. My Game is a Singleton. So I thought I figured it out, but still getting errors. ...
2
votes
1answer
86 views
Get average tile color
In my 2D game I have TileSet class that loads the texture and creates Rectangle[] array which stores each tile coordinates. Pretty basic stuff. Now I'd like to also calculate and store the average ...
-2
votes
3answers
139 views
Can I use a list to spawn enemies? [closed]
I need to have about 10 enemies in my game, can I use a list to spawn them all in?
This is what I was working on but it only spawns 1 enemy in the coordinates of the last added to the list.
Here are ...
3
votes
1answer
120 views
How to draw sprite according to Player position when button is pressed? [closed]
How do I draw a sprite right at my Player sprite's position when I pressed Spacebar?
protected void playerInput() {
KeyboardState key = Keyboard.GetState();
if ...
0
votes
1answer
48 views
What is the point of the XNA.Input.Button enum?
I am trying to make an InputManager class that will let me basically bridge XNA's various input methods and do a corresponding action in my game. Part of this is designing different keybindings.
...
2
votes
0answers
69 views
Getting UV maps from UDK?
I have created a map using UDK and I am exporting it as a .fbx for use within an XNA project.
My question is, can I generate a UV map for texturing the map or is there an easier way to texture a map ...
1
vote
2answers
138 views
HLSL Multitexturing with more than 4 textures
I've come up with an idea that should work in multitexturing a terrain with more than 4 textures, up to a 64 if a supported ShaderModel is used.
I'm trying to use the RGBA color values as both values ...
1
vote
1answer
139 views
How can I make it so that my player object doesn't penetrate world collision when I'm holding down movement keys in that direction?
Right now I have a player object and an obstacle, both with bounding box rectangles around them. The issue is that when my player runs into this obstacle, as long as I'm holding down the movement key, ...
0
votes
0answers
70 views
Cocos2d-xna memory management for WP8
I recently upgraded to VS2012 and try my in dev game out on the new WP8 emulators but was dismayed to find out the emulator now crashes and throws an out of memory exception during my sprite loading ...
13
votes
6answers
1k views
Is C++ necessary to learn if I ever want to get a job in the game industry?
Is C++ necessary to learn if I ever want to get a job in the game industry? I am extremely familiar with C# and have a basic mastery of making 2D games in XNA 4.0. Right now I am only 13 years old and ...
0
votes
0answers
70 views
XNA Disable Mip-Mapping for good
I'm trying to render a plane mesh textured with a simple grid pattern, problem is, xna keeps mip-mapping the texture in horrible, horrible ways.
What i'm trying to achieve is to get this grid to look ...
0
votes
0answers
41 views
Render/Draw a Model in another class XNA [closed]
So, I have three classes . Game1,GameModel and GameCameraFPS
Here are the codes:
public class Game1 : Microsoft.Xna.Framework.Game
{
public static GameWindow window;
GraphicsDeviceManager ...
10
votes
2answers
343 views
Implementing a homing missile [duplicate]
I'm having some trouble implementing a homing missile that satisfies what I'm looking for. I have already tried the Seeking and Arrival behaviours described in this link, but none of them were what I ...
0
votes
1answer
146 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 ...
1
vote
1answer
92 views
XNA 3d model mesh.draw() throws TextureCoordinate0 is missing error
I've downloaded a bunch of 3d models from turbosquid.com. The majority of the one's I've downloaded are simply .fbx files. When I load the model into my game and run it, the following error is thrown ...
2
votes
0answers
101 views
Implementing Branching Conversation Dialogue in C# with XNA
How could I add logical branching conversation dialogue in C# with XNA? What I mean by this is a dialogue tree similar to this:
If the user is wearing red:
DisplayText "You're wearing a red ...
-1
votes
1answer
156 views
Creating physics in xna
I am creating a racing game using visual studio 2010 and xna 4.0. I'm trying to create some simple physics so my car sticks to the heightmap I have created within my game world and the model adjusts ...
4
votes
2answers
253 views
Changing game controls using .txt file
I'm using XNA to create a simple block breaker game. At the moment I have controls set in the standard way:
if (keystate.IsKeyDown(Keys.s))
I've figured out the file handling problems involved and ...
4
votes
1answer
223 views
Compiling a Monogame Game into a single .exe
Is it possible to compile a monogame game into a single .exe? I know if you go in the debug or release bin, there is in fact a .exe your game, except you move this .exe's file location or try to run ...
3
votes
1answer
70 views
Set a 2d camera's position so that a building is under the players feet
My issue is this: i am making a scrolling game in XNA, and the camera updates based on the players velocity, but the player never actually moves, he is always in the center of the screen. When he hits ...
0
votes
3answers
242 views
How do I create a 3rd person camera?
I currently have a camera class set up and have my model/player loaded but I can't get my camera in the correct position by changing the x,y,z coordinates.
I have set up my "game" with a separate ...
1
vote
0answers
101 views
tex2dlod and tex2d giving different values [closed]
I've been having trouble with vertex texture fetch for a terrain system I am implementing. I'm using C++/DirectX9.
I have already implemented exactly what I want as a prototype in C#/XNA and now ...
-1
votes
2answers
98 views
Jittery effects with collisions [closed]
I have been having some problems with my coding lately. I am trying to create a platform-based game and I have been having some troubles.
A friend of mine said that some update functions are out of ...
0
votes
2answers
122 views
How to scale a sprite with its center as origin?
I'm trying to zoom-in a sprite gradually from 0% to 100% (a sprite called SelectionBox), so it zooms from the middle of the sprite, not from the upper-left corner. I'm almost there, but I'm having ...
7
votes
0answers
266 views
Implementing water effects (splashes) into XNA 4.0 game
I am creating a 2D XNA game and came across a tutorial on adding water effects (splashes) to an XNA game but after implementing it into my game I can't get it to scale down. Currently it takes up the ...
0
votes
0answers
76 views
cocos2d-xna CCScale9Sprite usage
I'm trying to get a CCControlButton to render on my game. Using a basic CCScale9Sprite as the button's background works using the following:
var myScale9Sprite = ...
2
votes
1answer
117 views
Pixel Shader gradient problems
I have pretty much zero experience working with shaders as my first couple phone games were just 2d games that didn't use any sort of shaders. Now I'm working on a PC game that has a day and night ...
0
votes
2answers
143 views
Hex tile systems and the efficient use of classes
So I've built myself a system of classes for what I think is an efficient way to describe an entity that would live in my game.
Is this an effective approach or am I creating entities that are too ...
-1
votes
1answer
76 views
XNA Framework doesn't recognise controller [closed]
So just a little bit of XNA code:
if (this.IsActive && (Keyboard.GetState().GetPressedKeys().Length > 0 || Mouse.GetState().LeftButton == ButtonState.Pressed || ...
1
vote
1answer
127 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
94 views
XNA doesn't sometimes draw 3D models properly [closed]
I am developing an 3D platformer game with XNA framework and I am experimenting some errors in drawing. Here is some images of the errors, that appears in 3D models and in planes:
In the first ...
1
vote
0answers
81 views
Developing a simple platformer [closed]
I'm in uni and for coursework we're developing a simple platform game in C# using XNA. I've been looking forwards to starting this all year.
Does anyone have any advice on the best books to pick up ...
1
vote
2answers
182 views
Weird behavior with XNA SpriteBatch.Draw origin
I have a texture with 256x256 pixels.
Consider this piece of code:
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
...
1
vote
1answer
97 views
How to draw different textures on my cubes DrawUserIndexPrimitive with XNA?
I'm having some problem to draw textures with class "DrawUserIndexPrimitive" on Xna.
I can draw my cubes / models without problem. But I want to draw different textures on my cubes.
I loop on each ...
0
votes
0answers
97 views
HLSL Triplanar texturing and multi texturing performance
I'm stuck for my terrain rendering shader code for DX9. I'm looking to implement triplanar texturing, a texture atlas, and blending between different textures. Right now it's working. The problem is ...
1
vote
1answer
52 views
Windows Phone XNA guarding storage data
For a typical windows phone game where storage files could contain high scores or in-game currency data, how does one go about protecting these files from user tampering?
1
vote
2answers
163 views
Collision Detection - Slide Around Sprite
I'm creating an RPG using XNA/C# and am trying to add some complicated collision detection code. I have the playable character 'Wizard' and when it collides with something, a method gets called in his ...
0
votes
1answer
59 views
How to effectively check for object visibility prior to object creation?
I'm using pseudo-random noise to create a cube world a la Minecraft. So I've got my noise generators up and running, working great. Right now I'm just directly scaling the noise output to a height and ...
9
votes
1answer
249 views
How do I prevent XNA from pausing Updates while the window is being resized/moved?
XNA stops calling Update and Draw while the game window is being resized or moved.
Why? Is there a way to prevent this behaviour?
(It causes my network code to desynchronise, because network ...
3
votes
1answer
123 views
Weird stuttering with fixed-timestep, variable-framerate game loop
I've been trying to set up fixed-timestep loop for my game, using the technique from here. I have no need for the interpolation step as I intend to run the logic at or above vsync speed.
Here is a ...
0
votes
1answer
81 views
Changing textures on a Model messes up antialiasing? (XNA)
Here is a code sample:
blockModel = game.Content.Load<Model>("Models/Cubes/Cube"); //this is a .fbx file, made in blender
absoluteBlockTransforms = new ...
-2
votes
1answer
203 views
Game Editor - When screen is clicked, how do you identify what coordinate you clicked?
This is a follow-up to my earlier question:
Game Editor - When screen is clicked, how do you identify which object that is clicked?
Something I've noticed is that picking only calculates a ray and ...
0
votes
0answers
38 views
Fixture position
I want to apply force in center of specific fixture (engine of ship build from more fixtures), but I can't find any position property.
I looked at samples and I found this:
World.QueryAABB(fixture ...
-1
votes
1answer
71 views
XNA 2D Particle in 3D world [duplicate]
Is it possible to make 2D-sprite particles in a 3D world that always face towards the camera?
2
votes
2answers
147 views
World space and model space the dummies version [closed]
I'm by no means a 3d programmer but have recently taken it upon myself to build a Voxel based game and I'm having a little trouble understanding some of the concepts around matrices (what with my ...
-1
votes
2answers
94 views
3D turret tracking in XNA 4.0 [duplicate]
I've beeen going through Reimer's flightsim tutorial and wanted to expand it by adding anti air turrets shooting at the ship. Im still new to programming in c# and xna and also a bit horrible in maths ...
2
votes
2answers
128 views
Collision detection against large arbitrarily shaped textures
What is the most effecient way to do collision detection on strangely shaped textures in XNA? Here is an example texture:
As you can see, it is far from a perfect square. I want the player to ...
-1
votes
2answers
139 views
Draw 60,000 cubic with DrawUserPrimitives on xna with only 20 fps-buffer problem?
I'm working on a minecraft style games on xna. I know it is not easy to draw a lot of cube with a good ratio of fps. I use the method "DrawUserPrimitive" with a buffer to draw a floor 250X250 cubes. ...
0
votes
1answer
143 views
Is a HashTable the best way to store replay data in C#?
I'm looking to make a deterministic replay in my 2D game. I want to follow a similar approach to braid in storing the relevant information every frame (at 60 frames per second).
I wanted to know what ...
3
votes
1answer
123 views
'perfect' platformer base Xna
When a player touches a ground peice in a game, he seems to sink through the ground then slowly rise back up, and when he has risen back up, he is very jittery.
if (touchingTheGround())
{
...

