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

5
votes
2answers
273 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
449 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
529 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
454 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
747 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
452 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
220 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
203 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
456 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
292 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
378 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
290 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
253 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
393 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
173 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
72 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
419 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
771 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
664 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 ...
2
votes
0answers
145 views

Difference between multiple AudioUnits and one AudioGraph with a MultiChannelMixer

I'm porting my game to iOS using MonoTouch, and I'm having some trouble getting sound output to work. SystemSound/AVAudioPlayer is way too simple for my needs (I need looping and multiple simultaneous ...
-3
votes
1answer
537 views

2D XNA Shooting Game [closed]

im doing a XNA game for a school project but im having trouble with the bullets. I can´t find any way to draw them or "invoque" them went i want. It is a modified Space Invaders that im trying to do. ...
3
votes
3answers
537 views

How can I load 2D texture data without a GraphicsDevice instance?

We have a client/server architecture for our game with the client being the XNA Game, and the game server is separate and only references XNA. They both use a shared DLL for networking. The game ...
-2
votes
3answers
798 views

Why use textures that are Power of Two? [duplicate]

Possible Duplicate: Why are textures always square powers of two? What if they aren’t? I am using C# and XNA (also MonoGame for other platforms than Windows) to create a game in 2D. ...
0
votes
0answers
124 views

Draw mesh with multiple bones

So I currently have an object made up of only one mesh. And this object contains three bones. One for strecthing the mesh left, one for streching the mesh up, and a center bone, which moves the object ...
3
votes
1answer
185 views

ResourceContentManager with folders

I am attempting to do something like the following: http://blogs.msdn.com/b/shawnhar/archive/2007/06/12/embedding-content-as-resources.aspx (Access the content via a DLL) However, I need to maintain ...
0
votes
1answer
304 views

Collisions and camera tilt in XNA C# 3D Game [closed]

I am working on a game programming class project and need some help. I cannot find a good tutorial on how to get these 3 frictionless spheres to collide with each-other, the surface and the walls of ...
1
vote
1answer
2k views

Move Object Around Sphere in Unity3D

I am trying to get a GameObject to be able to be controlled to move freely around a sphere using a virtual on-screen joystick. I am building this for iOS and Android in Unity. I am using the standard ...
0
votes
2answers
215 views

3d to 2d Collision

I have a 3d model which rotates around my screen, it's always on the Z axis = 0 where everything of my 2d images are. My 2d images fly out of the center and get bigger to give the view as getting ...
4
votes
1answer
2k views

Replacement for XNA? [closed]

Since Microsoft stopped developing XNA I'm wondering what will be the replacement for the XBox 720°. I've been wondering about this. XNA was THE technologie the XBox, easy and powerfull. So is ...
1
vote
1answer
89 views

Automatic Tile Transitions Not Working Correctly [closed]

I've started writing a tile based game in XNA today using the tutorials here. I'm on the Part 6 - Side Topic - Auto Transitions at the moment. My transitions aren't working correctly as you can see ...
2
votes
4answers
300 views

Who should manage projectiles?

I was following a tutorial that was recommended to me to learn the basics of game design through XNA. And I got to this tutorial: ...
-2
votes
1answer
288 views

Multiple viewports [closed]

[Problem solved ! I canno't answer with the response because i have less than 10 reputations. I have to wait 8 hours.] Currently, i'm trying to display 3 viewports. 1st : This viewport is the entire ...
5
votes
2answers
498 views

Ball bouncing infinitely and constantly

Alright, so I've got hold of some simple physics mechanics, and am currently trying to implement bouncing. Based on the first answer of this question, I've developed the following algorithm: ...
2
votes
1answer
141 views

Developing an interactive book for Windows-Runtime

My three year old loves playing with the interactive books on our iPad, and I love playing with code and I love my Surface RT... So I thought I'd try and make a basic animated book using WinRT, I've ...
0
votes
1answer
1k views

Can I develop libgdx game with C#?

I see some articles through Google that I can use libgdx in C#. Is it true? I found no official and unonfficial about this. If there is a way, please tell me how. Thank you
3
votes
1answer
191 views

Figuring out which direction my object is facing on a 2D plane?

My friend and I were messing around in XNA 4.0 making a 2D racing game. Kind of like this one: Ivan “Ironman” Stewart’s Super Off Road. The problem we are having is knowing which direction the car is ...
1
vote
2answers
279 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 ...
2
votes
1answer
322 views

How to organise an XNA client/server solution

I was wondering what would be the best way to go about organizing the projects for the XNA project I have been working on. It is a simple game that uses a client/server architecture. Currently ...
-1
votes
2answers
169 views

Tile collision, can't get correct behaviour [closed]

I define a tile with a rectangle. This is displayed below. public class Tile : Sprite { Rectangle rectangle; public Rectangle GetRectangle { get { return ...
-3
votes
1answer
173 views

How long would it take to learn c# if I know c++? [closed]

I already know c++, having worked through Accelerated C++ reading all the chapters and doing all the problems, with a bit of college coursework in C++ as well. From what I read, I seem to have ...
3
votes
1answer
606 views

Storing items in external data files

My project, in its current state, keeps all of the info for each inventory item in script files. That means, inventory items and their properties are part of the codebase. This works well, but I'm ...
2
votes
1answer
458 views

XNA Textures with background color

I am fairly new to XNA and I have questions in regards to textures. Most of my of textures have a background color along with the overall image (white, black, or whatever). This is quite ugly as the ...