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
309 views

How do I implement Unreal-like object serialization?

Recently, I've been working on the core of my engine, and as I'm moving forward I find myself developing throwaway code to read files and simple data into the engine. This got me thinking about how I ...
0
votes
1answer
292 views

How to collide with a 45degree wall in XNA

I want to make a PAC MAN imitation game to start working on AI, and while my first version will feature rectangles with widths or heights of 1 to makes walls for collision detection, I want to ...
-1
votes
1answer
1k views

How can I guarantee a solvable Fifteen Puzzle shuffle?

I am making a 15 Puzzle game in C# that allows the user to enter a custom row and column value up to a maximum of a 10 x 10 puzzle. I am having problems with the shuffle method. I want to make it so ...
2
votes
2answers
524 views

Adjust treble and bass on Audio in XNA

I am trying to "muffle" the sounds that are being played in my game and the best way I can think of doing this, is by lowering the treble of the sound. I have looked through all the members of the ...
1
vote
3answers
436 views

Why does unity obj import flip my x coordinate?

When I import my wavefront obj model into unity and then draw lines over it with the same coordinates in the obj file, the x coordinate is negated. I don't see any option in the importer that might ...
2
votes
1answer
2k views

detect asset change while running in unity editor?

Is it possible to detect asset change while running in the unity editor. When I update my model, I see it change but the xml data associated with it does not change. So it would be nice to detect ...
1
vote
0answers
70 views

XNA - Obtaining depth from the scene's render target? [duplicate]

Possible Duplicate: Depth buffer and render target I'm currently rendering my scene to a render target so it can be used for rendering methods such as post processing and order independent ...
4
votes
4answers
629 views

Game programming and quantity of timers

I've made a simple 2D game engine using C# and DirectX and it's fully functional for the demo I made to test it. I have a Timer object that uses QueryPerformanceCounter and I don't know what's the ...
0
votes
1answer
469 views

Game Maker Studio Gravity Problems

I've started messing around with Game Maker Studio. The problem I'm having is trying to get a gravity code for orbiting. Here's how i did it in XNA foreach (GravItem Item in ...
2
votes
2answers
798 views

Game Asset Management

I am making my first small mobile game in C# XNA. Lets say I have 3 screens, the main menu, options and game screen. A single game session usually lasts for 1 min, so the user will alternate ...
1
vote
1answer
546 views

Displaying text letter by letter

I am planing to Write a Text adventure and I don't know how to make the text draw letter by letter in any other way than changing the variable from h to he to hel to hell to hello That would be a ...
8
votes
1answer
795 views

Drawing “Stenciled” Sprites and making them glow

Currently, in my game - I'm not using XNA's SpriteBatch to render anything(I am using Farseer Physic's Debug View), and I was wondering how I would render something like this: only using XNA. My ...
1
vote
1answer
913 views

Farseer Physics for Xna missing ConvertUnits class

Im using Farseer Physics with Xna 4.0. Im following a starter guide. It said that to draw, I need to convert the meters to pixels with the ConvertUnits namespace. I looked through all of the engine, ...
0
votes
2answers
676 views

Shuffle tiles position in the beginning of the game XNA Csharp

I'm trying to create a puzzle game where you move tiles to certain positions to make a whole image. I need help with randomizing the tiles start position so that they don't create the whole image at ...
3
votes
3answers
526 views

How to design 2D collision callback methods?

In a 2D game where you have a lot of possible combination of collision between objects, such as: object A vs object B => object B vs A; object A vs object C => object C vs A; object A vs object D ...
3
votes
3answers
1k views

Moving a body in a specific direction using XNA with Farseer Physics

I have a custom polygon attached to a body, which looks like this: What I am trying to accomplish is getting the body to move according to wherever the tip of the body is. So far this is what I've ...
7
votes
2answers
738 views

Rotate a vector

I want my first-person camera to smoothly change its viewing direction from direction d1 to direction d2. The latter direction is indicated by a target position t2. So far I have implemented a ...
1
vote
2answers
214 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 ...
3
votes
1answer
703 views

How to determine the end of list has been reached?

I'm trying to animate my object according to a set of recorded values from kinect skeleton stream by saving the (x,y,z) stream from the skeletal data into a list and then set my objects x and y ...
1
vote
1answer
7k views

Rotate to a set degree then stop Unity [closed]

I'm trying to make an object rotate up on the Y axis 90 degrees, then stop. I've got the rotating up bit working fine, it's getting it to stop once it hits 90. Some of the things I've tried include ...
1
vote
2answers
1k views

How to pass an interface to Java from Unity code?

First, let me say that this is my first experience with Unity, so the answer may be right under my nose. I've also posted this question on Unity's answers site, but plugin questions don't seem to be ...
1
vote
3answers
423 views

Slide 2d Vector to destination over a period of time

I am making a library of GUI controls for games I make with XNA. I am currently developing the library as I make a game so I can test the features and find errors/bugs and hopefully smash them right ...
2
votes
1answer
205 views

DrawIndexedPrimitives overdraws data in previous buffer if called in loop

I doubled the question from stackoverflow here, and will delete the opposite of a question that gave me the answer. I have the Draw method in one of my renderers, that loops through the dictionary ...
2
votes
1answer
101 views

Camera closes in on the fixed point

I've been trying to create a camera that is controlled by the mouse and rotates around a fixed point (read (0, 0, 0)), both vertical and horizontal. This is what I've come up with: camera.Eye = ...
4
votes
1answer
610 views

How can I show a texture in a separate window in an XNA game?

I'm playing around with random map generation and what I want to do is: Input a command to generate a random map. A texture will be created resembling the generation, each pixel resembling each ...
9
votes
2answers
285 views

Server-side Input

Currently in my game, the client is nothing but a renderer. When input state is changed, the client sends a packet to the server and moves the player as if it were processing the input, but the ...
1
vote
1answer
894 views

Rendering a 2D Sprite in 3D space

I am currently working on a game in XNA 4.0 where I want to implement 2.75D, like in Paper Mario. I feel like it has something to do with z-buffering a Texture2D and drawing that, but I really have no ...
2
votes
1answer
372 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
450 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 ...
1
vote
4answers
3k views

WPF or WinForms for Game Development and learning resources? [closed]

I'm looking to create a game framework for my own personal use... I want to use WPF, but I'm unsure if that is a wise choice... The games I will be writing should not require high performance ...
2
votes
1answer
80 views

Draw depth works on WP7 emulator but not device

I am making a game on a WP7 device using C# and XNA. I have a system where I always want the object the user is touching to be brought to the top, so every time it is touched I add float.Epsilon to ...
5
votes
2answers
1k views

Checking for alternate keys with XNA IsKeyDown

I'm working on picking up XNA and this was a confusing point for me. KeyboardState keyState = Keyboard.GetState(); if (keyState.IsKeyDown(Keys.Left) || keyState.IsKeyDown(Keys.A)) { //Do stuff... ...
1
vote
1answer
857 views

Kinect Hand tracking in xna

I'm trying to create an application using the Kinect to simulate the following project: Kinect Hand Tracking I want my project to have similar usability with the Kinect tracking hand and finger ...
1
vote
0answers
262 views

Outline Shader Effect for Orthogonal Geometry in XNA

I just recently started learning the art of shading, but I can't give an outline width to 2D, concave geometry when restrained to a single vertex/pixel shader technique (thanks to XNA). the shape I ...
2
votes
1answer
353 views

Xna model parts are overlying others

I am trying to import in XNA an .fbx model exported with blender. Here is my drawing code public void Draw() { Matrix[] modelTransforms = new Matrix[Model.Bones.Count]; ...
0
votes
0answers
54 views

XNA Xbox, utilizing multiple cores [duplicate]

Possible Duplicate: XNA: How does threading work? It's my understanding that the Xbox has 3 cores that are available to use. I'm hoping to offload AI to another core, and possibly use ...
1
vote
1answer
200 views

2D Physics Engine to Handle Shapes Composed of Multiple Densities XNA

The game I'm working on involves shapes that might be composed of multiple materials in a variety of ways. Let's just take for example a wooden rod with and sizable tip of iron or say a block composed ...
4
votes
2answers
2k views

Game Server on Windows Azure

What do you guys think of using Windows Azure for deploying a custom built game server. It's being built in C#, and I want to get a few things down before stretching too far into the project. I like ...
0
votes
1answer
381 views

(Quaternion based) Trouble moving foward based on model rotation

Using quaternions, I'm having trouble moving my model in its facing direction. Currently the model moves can move in all cardinal directions with no problems. The problem comes when I rotate the move ...
0
votes
3answers
452 views

XNA RTS A* pathfinding issues

I'm starting to develop an RTS game using the XNA framework in C# and am still in the very early prototyping stage. I'm working on the basics. I've got unit selection down and am currently working on ...
4
votes
1answer
955 views

XNA: Check if the sound is playing

Quick question: I have a SoundEffect instance, and I would like to know if it is playing at the moment or not. But there's neither a method, nor a property that would allow to check it... So, is ...
2
votes
2answers
135 views

How do I drag my widgets without dragging other widgets?

I have a bunch of drag-able widgets on screen. When I am dragging one of the widgets around, if I drag the mouse over another widget, that widget then gets "snagged" and is also dragged around. ...
5
votes
5answers
1k views

Do I really need to “learn” C# for XNA if I know Java?

I want to start developing in XNA. As of now, I do not know C#, but I would consider myself "good" at Java. I have looked at some C# code and it looks almost identical to Java. After looking at Java ...
2
votes
2answers
338 views

How do I retain previously drawn graphics?

I've created a simple program that draws lines from a fixed point to a random point each frame. I wanted to keep each line on the screen. However, it always seems to be cleared each time it draws on ...
1
vote
1answer
233 views

How would I be able to get a game over screen using the pause function?

I am having problems with my snake game, when the snake collides with itself it draws a "game over" image in the background, but only while it's colliding with itself. I want it to behave like the ...
2
votes
4answers
2k views

Simulating a sine wave/oscillating pattern for enemies

I'm creating a simple top down shooter, right now I have an enemy which simply follows the player. I'd like to change things up and have the enemies move towards the player but in a wave like motion. ...
2
votes
3answers
6k views

Game engine like Unity 3D that allow me to use .NET code [closed]

I've been looking at Unity 3D for developing a 3D PC game and I really like the scene editor and how it simplifies the process of constructing 3D scenes, managing assets, animations, transitions etc. ...
5
votes
2answers
3k views

Is there a simpler way to create a borderless window with XNA 4.0?

When looking into making my XNA game's window border-less, I found no properties or methods under Game.Window that would provide this, but I did find a window handle to the form. I was able to ...
3
votes
3answers
771 views

Does every Entity in an XNA game need it's own BasicEffect instance?

From what I see, the position/matrix is stored in the BasicEffect instance, so it makes sense to me that every object has it's own position matrix, but I'm not 100% sure it's correct to let every ...
0
votes
1answer
181 views

Get blocky look on textures some textures

If I do this: GraphicsDevice.SamplerStates[0] = SamplerState.PointWrap; All textures I draw are blocky. GraphicsDevice.SamplerStates[0] = SamplerState.LinearWrap; All of my textures are blurred a ...