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

2
votes
2answers
251 views

rendering a spritebatch to a temporary buffer and then offset that to the main screen

I've been trying to figure out how to do this but I have a bunch of screens, each with their own Draw method. However, I'd like to render all sprites offset by the screen position without altering ...
4
votes
1answer
383 views

How to balance a ball on a rotating plane?

I'm doing some research and I really don't want a physics engine when a simple mechanism will do. I have a ball that will be balanced on a plane. The ball will always be "stuck" to the plane and ...
12
votes
4answers
1k views

RTS Game AI Thread

I have a project to make a real-time strategy game from scratch. I am still at the early planning stage, but I have been programming a little to see the mechanics. I know how to program. I also have ...
3
votes
1answer
328 views

What type should you use for keeping game score

Lets say you have a high scoring game like geometry wars, why type would you use for the score and how should you handle overflow?
5
votes
2answers
684 views

What are the most suitable 3D sound engines out there for a FPS?

We are looking for a good 3D sound engine for a game written in C#. We know of irrKlang, which looks great but isn't free for commercial uses, nor is it open source. XNA has an alright one, but it ...
6
votes
3answers
468 views

Computing volumetric light effects analytically

In my previous question I have asked about an effect on how to visualize light spheres. The question resulted in a very nice formulated answer which described pretty well how to achieve this by adding ...
5
votes
1answer
1k views

Rotate object to face player

This is probably a simple vector question, but I'm not sure how to do it. I have an object at vector position (ox,oy). Potentially every update, the user walks around the screen, and will be at ...
2
votes
2answers
141 views

Loop writing value error

I'm currently re working an editor got from a tutorial, but I'm having a problem. I'm making a call to an associative class for the form, which is supposed to get the original tile value and the set ...
1
vote
0answers
182 views

Using extension methods through the TryInvokeMember override of a DynamicObject [closed]

I feel like I need to give a little background information on why I'm doing what I'm doing, because I want to open it to suggestions and criticism, and give hope to Blender-using XNA programmers that ...
5
votes
1answer
226 views

Splitting an object into two

I'm using Farseer physics engine. I have a simple rectangle body and would like it to split into two pieces given a starting coordinate (where the bullet enters the object) and ending coordinate ...
3
votes
6answers
1k views

Should I go with Windows Phone 7 or Try Android? [closed]

I already know C# and am familiar with XNA. So it would make sense to develop for the Windows Phone 7, but would it be worth while to learn Java, get familiar with Android, and instead develop for ...
2
votes
3answers
4k views

In which software do the professional game developers create 3D Model?

I am just thinking about beginning game development in xna c#. However, I don't know (and no tutorial teaches) how do professional game developers create a 3D Model/Scene. How can we create a ...
0
votes
1answer
628 views

Messed-up triangles when using VertexPositionColorTexture with BasicEffect

image of the problem I used Microsoft's BasicEffect tutorial here and the code sample here: go.microsoft.com/fwlink/?LinkId=198921 and got everything to work fine. Next I changed everything to use ...
1
vote
1answer
289 views

What can I use to make a game with C#? [duplicate]

Possible Duplicate: What C# libraries can be used to support game development? I am C# programmer, I want to know what are the different options I have in developing a game
4
votes
3answers
1k views

Writing C# for iPhone 2D Game Dev - Not Unity

What are my options for writing C# code to produce a 2D iPhone game? I specifically mention 2D -- Unity will not suffice for me (even though it can "fake" it with a 2.5D game). I like C# because of ...
6
votes
2answers
344 views

Does it make sense to include an index for linelists?

Does it make sense to include an index by using DrawIndexedPrimitives, when using linelists performance wise? I could imagine it would be easy for the GPU to generate such indexes anyway.
3
votes
1answer
155 views

Instancing with empty data, or varying vertex counts?

I am new to game development, having only developed a few games before, in 2D space, but with 3D rendering. I have implemented instancing before, but this is only my 2nd time doing it. I have a ...
3
votes
1answer
861 views

Configuration management in XNA

I come from a .net web background so I am accustomed to using xml .config files. What is the XNA equivalent? It seems to me that using the same practice of a xml config leaves your game open to easy ...
16
votes
4answers
1k views

How to colorize certain parts of a model - like RTS games have those team colors?

I am in a need of implementing something we see in RTS games: team colors. Basically, I am looking for a way to colorize certain parts of a model. How would I achieve this? I have no idea where to ...
2
votes
3answers
2k views

2d Ray intersection

I've recently picked up a class which creates 2D Rays and detects if the ray is intersecting any bounding boxes passed through it. public struct Ray2D { private Vector2 startPos; ...
3
votes
2answers
373 views

Where should input be used?

I'm working on an input system (in C#) and now I'm wondering, what is the best place to put input functionality? Currently what I was coding was a bunch of delegates which act as callbacks (i.e. ...
0
votes
1answer
398 views

What approach would you take to develop an old school game?

Possible duplicate: Best technology for online games? I have agreed to show my child how to develop software. He wants me to help him develop a game. If you were me then what approach would you ...
3
votes
4answers
1k views

using odd number of sprites in multi-row spriteSheet?

Using XNA it's pretty easier to loop through a sprite sheet, I tell it how many rows and how many columns it has and I have a method that loops through the whole set. I usually use this method in my ...
3
votes
1answer
770 views

XNA Video Playback on XBOX “Invalid operation exception”

I am able to play a video in windows in my project, but the same code fails on the XBOX at the _player.Play(_logo) line. The error message is: "An unhandled exception of type ...
2
votes
1answer
478 views

Calculating camera zoom value (top-down)

I need some help in 'camera maths'. I have a birds eye view of two characters. One character is static and the other can move. I would like the camera to always show both characters in full and, in ...
2
votes
1answer
2k views

Creating a checker board in C# winform

I am using the PictureBox class to create a checkerboard, and it not really working all that well. I've created the loop: PictureBox[,] squares = new PictureBox[10,10]; for (int i = 0; i < ...
6
votes
0answers
2k views

What good 3D graphic rendering engines are out there? [closed]

I couldn't find good overview of those and decided to ask experienced people. I'm writing in C# and want to learn some 3D graphics stuff. I used to write some 3d scenes and shaders 4 years ago in ...
1
vote
1answer
1k views

My first animation - Using SDL.NET C#

I'm trying to animate a player object in my 2D grid when the user clicks somewhere in the screen. I got the following 4 variables: oX (Current player position X) oY (Current player position Y) dX ...
3
votes
2answers
408 views

Silverlight scrolling with camera

I'm trying to get my head around scrolling a 2D map that uses a physics engine. If I was to launch a projectile, would I actually be applying the physics to the background images rather than the ...
8
votes
1answer
426 views

Billboard draws fine on PC, not on XBOX

The moon is drawn with two draw calls, but both draw wrong on the xbox so I'm just displaying one draw for simplicity. This is how the moon should look on the PC: How it looks on the XBOX: ...
12
votes
2answers
517 views

How can I make a collection of mini-games in XNA where the user can download packs of minigames and the main .exe can run them without being altered?

I'm currently making a PC game in XNA. It's actually a collection of mini-games (there's 3 mini-games at the moment) however I plan to make and add more, in downloadable 'packs'. My question is, ...
4
votes
3answers
3k views

Rotating object around circumference of circle

I'm trying to get a lens texture to rotate around the circumference of the circle and although I picked the centre of the circle as the rotating point of the lens it doesn't work. private float ...
3
votes
3answers
820 views

2D XNA game Camera issue

I'm currently making a 2D Worm-clone in XNA, and have regrets about the way I've made my camera. I declare my camera in my Main class and the camera follows the player. In my draw I then begin my ...
3
votes
2answers
709 views

States, actions logic am I doing it right?

Currently I have the follow states: Need To Run Run Need To Walk Walk Need To Fight Fight Am I misunderstanding it and mixig possible actions with states ? I mean, to me Need To Run would either ...
8
votes
2answers
2k views

Creating A Board Game AI

I want to code a board game that name is Okey and mostly popular in Turkey. http://en.wikipedia.org/wiki/Okey But i have got some problems about AI. Firslty let me explain the game.. The game is ...
2
votes
1answer
3k views

Custom effects on Model in XNA

If I have a Model that is drawn with a different effect occasionally, what is the typical approach to this? Models have effects stored in each of their meshes, and you seem to be forced to use those. ...
19
votes
5answers
9k views

Is C# viable for a real-time game server?

Most of the question is in the title. Basically, I'm starting to develop a 2D multiplayer action game. The client is (probably) going to be in XNA, and I thought I'd ask here about whether it's a ...
6
votes
3answers
3k views

Networking and movement in MMORPG's UNITY

I'm programming a dedicated server in C# using BeamServer2 DLL's. At first I wanted to be able to see other players move on our already made Omuni map. This I did by just sending your position to the ...
2
votes
1answer
2k views

C# Pathing algorithm for moving a object from point(X, Y) to point(X, Y)

Given a object which may move forward, backward, left and right at a given X,Y point. How to efficiently direct the object to a X,Y point using the given movement mechanics in the most efficient and ...
1
vote
1answer
151 views

Followed the XNA GameStateManagement sln, but my doesn't work. What am I doing wrong?

If someone has the time I wanted to know if you would be willing to check out my solution file here: http://elvis.rowan.edu/~majeko02/AwesomeShip.zip I followed the XNA GameStateManagement on AppHub, ...
5
votes
2answers
914 views

Arrays for a heightmap tile-based map

I'm making a game that uses a map which have tiles, corners and borders. Here's a graphical representation: I've managed to store tiles and corners in memory but I'm having troubles to get ...
5
votes
4answers
807 views

How would I go about implementing a globe-like “ballish” map?

I am new to 3D development and I have this idea of having the game world like our globe is - a ball. So, there would be no corners in the map and the game is top-down RTS game. I would like the camera ...
9
votes
2answers
1k views

Simulating an object floating on water

I'm working on a top down fishing game. I want to implement some physics and collision detection regarding the boat moving around the lake. I would like for be able to implement thrust from either the ...
3
votes
5answers
599 views

Porting Ruby/NCruses Rogue-Like to .NET and FlatRedBall

I created an awesome rogue-like game in Ruby. For the GUI, I used NCurses. Since I'm using FlatRedBall as my engine of choice for Silverlight game development, I want to port this game over. What is ...
4
votes
3answers
2k views

XNA - Moving Background Calculations

My question is relatively hard to explain(for me, at least), so I'll go one step at a time and just tell me in the comments if it's not clear enough. So I'm making a "Defend Your Castle" type 2D ...
3
votes
2answers
3k views

XNA - Am I screwing up the LoadContent for Texture2D?

I've read forum threads and questions and I done just about everything. I need to know what am I screwing up here. Here's the code in the constructor. Content.RootDirectory = "GameStateContent"; ...
4
votes
2answers
490 views

Particle and Physics problem

This was originally a forum post so I hope you guys don't mind it being 2 questions in one. I am making a game and I got some basic physics implemented. I have 2 problems, 1 with particles being ...
3
votes
1answer
4k views

Including Microsoft.XNA.Framework.Input.Touch in a project?

So after running through tutorials by both Microsoft and www.xnadevelopment.com I feel very confident in my ability to get to work on my first game using the XNA Framework. I've manipulated sprites, ...
3
votes
3answers
916 views

Restrict movement within a radius

I asked a similar question recently but now I think I know more about what I really want to know. I can answer my own question if I get to understand this bit. I have a situation where a sprite's ...
1
vote
1answer
2k views

Restricting joystick within a radius of center

I'm using Unity3d iOs and am using the example joysticks that came with one of the packages. It works fine but the area the joystick moves in is a rectangle which is unintuitive for my type of game. I ...