C# is a multiparadigm, managed, garbage-collected, object-oriented programming language created by Microsoft in conjunction with the .NET platform.

learn more… | top users | synonyms

1
vote
1answer
395 views

I'm having trouble with collision detection in XNA [closed]

I've written a tile editor and game in XNA, with velocities and gravity, and am having trouble with some of my collision detection things. It works okay, but seems to glitch between just inside and ...
0
votes
2answers
155 views

Grouped enemy movement out of sync after changing directions [closed]

Im working on a Galaxian/Space Invaders Inspired game. Im working on the enemy movement and am running into an issue where the enemies get out of sync when changing direction. My setup is that I ...
0
votes
1answer
418 views

How to load a custom SpriteFont?

Is there any possible option where you can open a custom SpriteFont? Because I need to add to my game a font that is not in Windows already. I saw this page Custom Sprite Fonts and it's like I want ...
1
vote
1answer
119 views

synchronizing view state between nodes in a rendering cluster

I'm building a display wall demo application. The environment: N machines, each driving up to six displays Wired gigabit switch OpenTK application to draw the pretty pictures, running 1 copy on ...
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 ...
21
votes
2answers
1k views

Atmospheric scattering sky from space artifacts

I am in the process of implementing atmospheric scattering of a planets from space. I have been using Sean O'Neil's shaders from http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter16.html as a ...
1
vote
2answers
516 views

How to set multiple times, in a single spritebatch, the same pixel shader parameter

I make a test with Effect class in XNA and I want to set multiple times the same parameters (MyParameter in below code). My code is : [...] //In Engine class Effect ShaderEffect = ...
2
votes
1answer
381 views

How can I create a 2D camera with upscaling and translation?

I've computed a Viewport that is fair in size (a proper aspect ratio to the given device) and then I calculate my ScaleMatrix like so: scaleMatrix = Matrix.CreateScale( (float) ...
4
votes
3answers
2k views

Loading levels in XNA from XML

I'm trying to load levels in XNA from XML files. I have currently got a system to do this working, but it looks like it might get horribly complex as I add more objects later on. My world currently ...
1
vote
1answer
264 views

Xna custom mouse not allowing me to move its sprite past certain bounds

I have written a Custom mouse, with a Custom sprite, using MouseState, and getting the X and Y variables. However i also have a camera that i wrote, and this allows me to leave the initial box. One ...
2
votes
1answer
260 views

Sketchup model renders wrong in XNA

My XNA model renders wrong. It should render like that: But it renders like that: The background doesn't matter. It's just the model that renders wrong. Here is the drawing code: protected ...
-2
votes
1answer
99 views

Help me debug my 3-d collision code [closed]

I have been havaing a problem doing 3-d collision in a game i have been trying to make for several weeks now. What i am trying to do is prevent a PlayerModel object from colliding with Obstacle(cube) ...
2
votes
1answer
366 views

Shooting Bullets Around a Sphere

I currently have a ship that can orbit around a sphere freely controlled by a joystick. There is a separate joystick that controls the gun and starts shooting when it is touched. Right now the ...
5
votes
3answers
795 views

How to create simple acceleration in a 2D sprite? [duplicate]

So here's what I thought might work but half the time I press the 'Right' key, it results in a crash and the rest of the time seems to produce no acceleration at all. if ...
2
votes
2answers
421 views

Farseer Physics: How to create shape from Vertices?

As you can understand from the title, I'm pretty new to game development. I'm doing this for fun. Anyway here's my question. I have this Farseer Physics samples and i've been studying them for a few ...
2
votes
1answer
64 views

Saving model image

How can I get a top-down,side view of the model imported into XNA and then save that view as an image, that can be used later in the program? Thank you for your time
5
votes
2answers
966 views

Unlocking XNA game update rate and preventing unnecessary Draw calls and heavy logic Updates

I had some input problems which can be partially solved by unlocking game update rate. Now the input updates as fast as possible, but the game also calls the main Draw method a lot too. I believe ...
1
vote
1answer
211 views

Alternative to soundeffect.play()?

I have been using a profiler to optimize my game for the Xbox, my aim is as with any optimization to reduce excess CPU and memory usage. I have managed to cut down a lot of the processor time and ...
-1
votes
1answer
124 views

Bullets Spawning in same direction [closed]

I'm using XNA to make a Bullet Hell Shooter game, and I'm running into some troubles when I try to change the direction in which the bullets move. Been trying to debug for awhile, but haven't gotten ...
0
votes
1answer
239 views

SpriteBatch.end() Issue because of a thread

While playing, I use a thread to Load() and Unload() Texture2D. I have multiple ContentManager to only Unload() Texture2D I want to unload. But sometimes, I have this issue on the SpriteBatch.End() : ...
3
votes
1answer
305 views

Unity3D Camera constantly moving

I'm trying to make my own first person camera controls in unity that use both thumbsticks on a joypad. I have this working fine. However, when I move the right thumb stick (the one uses to look left / ...
0
votes
1answer
590 views

Creating A Bounding Box around each item in a list XNA 4.0

I have asked a similar question before except i am more experienced and have more understanding of XNA. I have bullets that shoot whenever you press RightTrigger. I am having trouble though creating ...
5
votes
1answer
1k views

How do I set up in-app purchasing in iOS?

I am using Unity and I developing an app for iOS. How do I implement in-app purchases that work world-wide?
5
votes
2answers
277 views

How can I normalize a vector if I am handling movment of each axis seperatley?

I am writing a 2D tile based game engine in XNA, and I've recently fine-tuned my collision detection using the answers provided here and more specifically here. The tile based collision detection now ...
3
votes
1answer
1k views

Proper use of Dynamic Vertex Buffers for rapid update

I am creating a C#/SharpDx/DirectX10 application to plot line charts in a fast way. I have a prototype which uses Dynamic Vertex Buffers and fills a fixed-size buffer, say 1M vertices, with new data ...
0
votes
1answer
455 views

Performace benchmark between a C++ and a C# renderer engine? [closed]

I want to create a performant 3d renderer for a tech demo at the university workshop. The engine will basically render a forested backdrop, in a small octrant. I am thinking of writing the engine in ...
2
votes
1answer
127 views

Extending ModelProcessor

How can one extend a model processor inside Windows Forms. In a normal XNA game you would simply create a new class like so(I think...): [ContentProcessor] public class ExtendedModelProcessor : ...
-1
votes
1answer
90 views

Class Responsibility [closed]

I have some head pain with putting some functionality in correct class. For example I have an operation like this: player selects world space tile game detects which tile is selected game detects ...
1
vote
3answers
538 views

Unity3D smooth movement with joypad button press

First off, I'm sorry this is such a silly question, but for the life of me I can't seem to get it to work. And I've just spent the last hour trying to do so. All I want to do is have my camera move ...
3
votes
1answer
460 views

How rotate a 3D cube at its center XNA?

I try to rotate a 3D cube on itself from its center, not the edge. Here is my code used. public rotatemyCube() { ... Matrix newTransform = Matrix.CreateScale(scale) * ...
1
vote
2answers
762 views

Mobile game textures sizes

I am developing a Windows Phone 7 game using XNA 4.0 which I plan to later port to iOS and android using Monotouch and Monodroid. My question is how to determine what texture size should I include? ...
6
votes
2answers
455 views

A big light with shadows

To have better texture2D quality in my 2D game, I had to recreate every textures with 300% of their original size. But the lights have to bright 3 times more. For lights, I'm using this : Catalin's ...
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
4answers
222 views

Selecting and moving vertices

How can I identify the correct vertecis and move them in XNA using VertexBuffer? Let's say I have a simple cuboid in my project and want to move one face of it. How would I loop thru vertices, get ...
0
votes
2answers
205 views

Better quality texture when zooming

Is there any way to have better quality textures ? I thought that creating huge textures will improve their quality in game, that's why I draw textures with 0.25f or 0.5f scale. I understand that ...
2
votes
2answers
459 views

3D Collision Detection with XNA

So I'm trying to implement some collision detection in XNA. I'm aware of the Bounding Spheres, but I worry with the accuracy, most items in my game are cubic in nature, so it seems very square-peg in ...
3
votes
1answer
296 views

Can you suggest ways to store and track lots of objects in a turn based strategy game?

I know just enough about programming to be dangerous, so please be gentle. I've created and released few simple apps for android and do some powershell scripting at work, but that's about the extent ...
0
votes
1answer
380 views

XNA drawing textures on random positions

I'm trying to reproduce this tutorial, but each time I try to implement it into my code, I always get a lot of errors. Now I finally managed to code something like this, the game runs, but nothing ...
1
vote
2answers
291 views

How to do FoV similiar to Nethack? [duplicate]

I am currently writing a little roguelike and wondered how Nethack/other games do the FoV of the player. I had a look at Nethacks source code, but since it's C it's pretty hard to read. For people ...
2
votes
2answers
161 views

How might I script the creation of CLR objects?

I am looking for a method to script the creation of entities (arrays of components) for delivery through my entity factory, i.e scripted creation of .net objects. I have looked into Lua but it seems ...
2
votes
1answer
257 views

Sound activated particlesystem

I am trying to make a particle system that is activated by sound. Like emitting on the beat resizing on the beat and such things. I found some nice tutorials on how to make things like ...
0
votes
0answers
95 views

Sceneview Lags when using Arrays

I'm getting a strange behavior here - when i create a simple C# script which holds an Array of classes, where both, the script class and the array classes, are marked as Serializable, my sceneview ...
-1
votes
1answer
141 views

Animation: mid-state

At the moment I have a simple static texture. Now I want to animate my sprite. The texture is a simple human. When the user press the enter button, the human gets into state2. This is the standart ...
-1
votes
2answers
398 views

moving from XNA to LWJGL [closed]

Hi StackOverflow people! I would like to know how easy it could be to move from XNA to using LWJGL. Just wanted to throw this out there because of the rumors that MS is shutting down XNA and having ...
0
votes
1answer
205 views

Smooth rotation [duplicate]

I would like to rotate my Player very smooth. At the moment the player stops rotating when I release the button. Also the rotation should get faster, if the player rotates longer. I use XNA and have ...
0
votes
3answers
177 views

help using image to overlay grayscale around player

I'm sorry for the confusing title but it is hard to explain in one sentence. This is what I have What I want to do is use that black overlay to convert everything in the black area to grayscale. ...
2
votes
1answer
73 views

Accessing other classes from a Box2D (farseer) body

I'm using Farseer for physics in a game, and have several key classes: Planet and PlanetProp. Each planet has a large circular body and a "field". This field is a large sensor around the body. ...
3
votes
3answers
424 views

8 directional movement - Maintain vertical position

I have a top-down game that has 8 directions of movement (top/down/left/right/topright/topleft/bottomright/bottomleft). There are sprites for each direction of movement. This is just an example ...
1
vote
2answers
793 views

How (update,set, apply) dynamically color on a model of a XNA project?

I encounter a problem for set a background color on my model instantiated. I can change the texture but not change color. Is there a parameter for change the color ? Or change the opacity ? I am ...
0
votes
1answer
682 views

Unity3D GUILayout Window Wont Show Components

I am fairly new to Unity, but picking things up quick. This is actually one of the first problems I have come across that has me stumped. I am trying to print a good amount of components onto my GUI ...