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
votes
2answers
506 views

How to do gradient transitions using slimdx?

I am making an image slide show using slimdx and c#. Till now I have done transitions using the matrix transformation but now I am trying to make transitions using some gray scale background image. ...
7
votes
5answers
3k views

Best pathfinding algorithm for a tower-defense game? [duplicate]

What do you suggest would be the best algorithm for a tower-defense game? It's a 2D based tile game, where there is walls and towers blocking the way, between spawnpoints and their destination points. ...
5
votes
6answers
2k views

Making classes available to others

I'm currently working on a 2D game engine in XNA, and I am very interested in architecture, and how best to let my game objects communicate. I know a lot of people use a Singleton design but I ...
0
votes
2answers
650 views

How do i get my tilemap to move at the same speed as my character

I have a little problem in my solution, i'm trying to make a pretty big map for the players to walk around in. I decided to use a tile-engine, but when I move my character it moves faster than my ...
5
votes
2answers
3k views

Rendering multiple textures on a terrain in XNA / C#

I am working on a terrain in XNA/C#. My intention is to be able to render multiple textures on the ground across the terrain. However, all tutorials like this are only capable of doing it with about ...
8
votes
2answers
3k views

Online multiplayer game basics [closed]

I'm currently working on a c# online multiplayer game in real-time. The aim is to have client/server based connection using the UDP protocol. So far I've used UDP for players' movements and TCP for ...
4
votes
2answers
725 views

Engine with Terrain and Indoor Areas (BSP-like)

I'm not really a graphics programmer, but I used to toy around with Truevision3D 6.5 a few years ago. It wasn't too bad, but TV3D was just going nowhere so my foray into 3d game dev ended there. I ...
1
vote
1answer
858 views

moving 2D camera

I've got a camera that places the character about a 1/4 way into the screen. The problem I'm having is that when the character moves left the character stays in place now placing the character 3/4 the ...
3
votes
1answer
371 views

Skin Editing/Overlaying bullet holes

You see, especially in FPS games, when a bullet hits a wall or a character, etc. You end up with the bullet hole. Is this usually done with the actual skin temporarily changing, or just an overlay of ...
0
votes
2answers
227 views

How do I determine which card is underneath the currently-dragged card in a card game?

I'm developing a card game. My custom control works great, but I need help to solve this: When I move a card (my custom control) over another card I need to know which card is underneath. Once I know ...
21
votes
6answers
5k views

What designs are there for a component based entity system that are user friendly but still flexible?

I've been interested in the component based entity system for a while, and read countless articles on it (The Insomiac games, the pretty standard Evolve Your Hierarchy, the T-Machine, Chronoclast ... ...
6
votes
1answer
1k views

XNA Aquatic Distortion Effect

I'm currently developing a 2D, top-down Windows Phone 7 game involving the surface of a pond. I'm trying to make the surface feel like actual water (as opposed to just a blue background with sprites ...
6
votes
1answer
2k views

Developing a card game framework

What sort of design patterns and ideas might one use to build a somewhat general purpose card game framework? This stems from I made an attempt to build a clone of the popular Steve Jackson game ...
2
votes
2answers
253 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
385 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 ...
4
votes
1answer
3k views

Mouse location is off due to camera

I'm building a top down shooter but I have a little issue with my camera and mouse. When I add the camera that I use to my game (see here) my mouse pointer seems to be in the wrong location. When I ...
3
votes
1answer
331 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
697 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 ...
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 ...
4
votes
2answers
443 views

What platform should I use for a master server?

We are making a small FPS, and want people to be able to play it online and fetch a list of all servers from a master server. We only have experience in C#, and we have already written a master server ...
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 ...
6
votes
5answers
2k views

Why do objects interpenetrate in this simple collision solver?

The code below is from a Microsoft XNA sample here. This is quite a simple rigid body simulation that ignores many physical effects (such as angular momentum), but it does try to push objects ...
1
vote
0answers
185 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 ...
3
votes
2answers
320 views

Experienced coder/designer moving into game development - what's involved?

I am interested in moving into game development once my current project is done, as it's nearly at a point where it will pay my bills and allow me to hire someone else to take the driver's seat, ...
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 ...
5
votes
1answer
227 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 ...
4
votes
1answer
708 views

In an artillery game how do I mask out the part of the terrain that was hit

Let's say I want to make a really simple artillery game, something like Gorillas. I don't have any experience in games, just some basic understanding of OpenGL. I want to do this for fun and to learn ...
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 ...
11
votes
6answers
15k views

How to handle mouse input in XNA?

I am developing a card game in XNA. Is there any OnClick event in XNA for objects? I am trying to make cards move when the player clicks on them. In this project, there is a Sprite class that draws ...
0
votes
1answer
632 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
292 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
6
votes
3answers
485 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 ...
10
votes
2answers
473 views

Can I call c functions within the XNA framework?

I would like to make a 360 game and was just wondering if I could re-use some existing C code I have or whether I need to re-write everything in C#. Any help is appreciated.
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
346 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 ...
4
votes
2answers
551 views

Rendering everything with a shader when only squares are needed?

I am building a game that is tile-based (filled with glowy vector squares). Right now, I am considering using instancing for drawing these, but I would like to know if there is a faster approach. The ...
3
votes
1answer
873 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 ...
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
399 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 ...
9
votes
1answer
1k views

Adding air drag to a golf ball trajectory equation

I'm developing a 2D golf game in VB.NET 2005, but I am stuck on how to implement air or wind drag that should affect the ball. Already I have these equations for projectile: Vo ...
6
votes
3answers
2k views

Network communication via Sockets. Is there a better way?

I'm building a game engine on the OpenTK framework that needs to support multiple players. How I have the basic framework established is that there is a Client and a Server. The Server binds and ...
4
votes
4answers
1k views

Have a while loops but inputs depend on events fired, what are some ways on getting the input?

I think I'm at a conundrum here, I've creating a matching game in C# winforms. And I'm 90% done, the only thing left is the game loop. The matching games consits of two multidimensional arrrays which ...
2
votes
1answer
493 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 ...
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
4answers
1k views

Significant 2D SmallTalk/Squeak Game? Smalltalk/Squeak vs. C#

Prompted by this question about becoming a faster programmer, I'm curious to know if anyone has made a significant-sized 2D game in SmallTalk or Squeak. And if so, how does it compare to C#? I'm ...
3
votes
1answer
780 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 ...
10
votes
6answers
892 views

Is it a bad idea to have Game1 static in XNA?

Is it a really bad idea to have my Game1 class as static? As at the moment in my Game1 class I have a class called TileHandler which handles everything to do with my current set of tiles, and ...
2
votes
4answers
3k views

Scrolling background loop

I'm trying to scroll my background forever and so I'm using the background image twice. When the first one goes off screen, it should relocate to the end of the second one. However, there seems to be ...