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

3
votes
2answers
855 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 ...
3
votes
3answers
867 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 ...
8
votes
1answer
446 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: ...
8
votes
9answers
2k views

MMOs based on .Net? [closed]

Are there any real MMOs where the server engine is based on .Net?
2
votes
1answer
4k 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 < ...
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 ...
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
14k views

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

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 ...
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
152 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, ...
6
votes
2answers
1k views

Arrays for a heightmap tile-based map

I'm making a game using in C# and Javascript that uses a map which has tiles, corners and borders. Here's a graphical representation: I've managed to store tiles and corners in memory but I'm ...
16
votes
4answers
2k 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 ...
3
votes
2answers
839 views

Help with “Cannot find ContentTypeReader BB.HeightMapInfoReader, BB, Version=1.0.0.0, Culture=neutral.” needed

I have this irritating problem in XNA that I have spent my Saturday with: Cannot find ContentTypeReader BB.HeightMapInfoReader, BB, Version=1.0.0.0, Culture=neutral. It throws me that when I ...
5
votes
4answers
887 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 ...
39
votes
1answer
3k views

Why is this beat detection code failing to register some beats properly?

I made this SoundAnalyzer class to detect beats in songs: class SoundAnalyzer { public SoundBuffer soundData; public Sound sound; public List<double> beatMarkers = new List<...
3
votes
5answers
720 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 ...
13
votes
3answers
7k views

Beat detection and FFT

I am working on a platformer game which includes music with beat detection. I am currently detecting beats by checking for when the current amplitude exceeds a historical sample. This doesn't work ...
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 game,...
3
votes
2answers
4k 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
508 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 ...
0
votes
1answer
474 views

x axis detection issues platformer starter kit

I've come across a problem with the collision detection code in the platformer starter kit for xna.It will send up the impassible flag on the x axis despite being nowhere near a wall in either ...
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, ...
8
votes
5answers
4k views

Designing a flexible tile-based engine

I'm trying to create a flexible tile-based game engine to make all sorts of non-realtime puzzle games, just as Bejeweled, Civilization, Sokoban, and so on. The first approach I had was to have a 2D ...
6
votes
4answers
2k views

How do I restrict the movement of a point to within a radius of another?

I have a situation where a sprite's center point needs to be constrained within a certain boundary in 2D space. The boundary is circular, so the sprite is constrained within a radius. This radius is ...
1
vote
1answer
3k 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 ...
9
votes
2answers
2k 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 ...
2
votes
2answers
896 views

Compatibility between DirectX 9 and DirectX 10 shaders

I am a beginner to game development and as I am used to programming in C# I decided to go for XNA. I've been playing around with it for a while and now I am learning the basics of HLSL shaders, I have ...
20
votes
7answers
7k views

Easiest, most fun way to program 2D games? Flash? XNA? Some other engine? [closed]

this is a post detailing my search for the most enjoyable way for a hobbyist game programmer to sweeten his free time with making a game. My requirements: I looked at Flash first, I made a couple of ...
4
votes
2answers
1k views

C# Timers for game development

I want to find out the best way of creating time based events in games. Lets talk for example about Texas Holdem Poker. Server can handle thousands of tables and in every table we have timers: turn ...
3
votes
2answers
1k views

Understanding DeviceContext and Shaders in Direct3D/SlimDX

I've been working through this tutorial about drawing triangles with SlimDX, and while it works, I've been trying to structure my program differently than in the tutorial. The tutorial just has ...
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 (...
5
votes
3answers
746 views

Programming Languages Recommendations: A Space shooter game that allows two people to play [closed]

Do you remember an arcade game, that allowed two people to versus or play each other? It was a Galaga/Gradius type game. Me and a couple of other people I know want to make a game like this. We want ...
6
votes
3answers
5k views

XNA: SpriteFont question

I need some help with the SpriteFont. I want a different font for my game, other than Kootenay. So, I edit the SpriteFont xml, i.e: <FontName>Kootenay</FontName> or <FontName>...
7
votes
1answer
2k views

Tile-based 2D collision detection problems

I'm trying to follow this tutorial http://www.tonypa.pri.ee/tbw/tut05.html to implement real-time collisions in a tile-based world. I find the center coordinates of my entities thanks to these ...
14
votes
2answers
2k views

Wall Jump for 2D Platformer

I've been looking for a way to implement wall-jump in my xna game, but I can't find any information about it, can someone could someone please help me out ?
4
votes
4answers
1k views

Creating the concept of Time

So I've reached the point in my exploration of gaming where I'd like to impliment the concept of time into my little demo I've been building. What are some common methodologies for creating the ...
9
votes
2answers
2k views

Scene Graph for Deferred Rendering Engine

As a learning exercise I've written a deferred rendering engine. Now I'd like to add a scene graph to this engine but I'm a bit puzzled how to do this. On a normal (forward rendering engine) I would ...
21
votes
7answers
5k views

Is C++ being replaced by C# in industry games?

In industry games I mean like Quake, CoD etc.
2
votes
1answer
548 views

Persisting high score table in flash game without a network. (Featuring: HttpListenerException)

this question is very programming-centric, but it's for a game so I figured I might as well post it here. I'm doing polishing work on a GGJ '11 game because it will be shown at an indie arcade ...
8
votes
3answers
967 views

Inverted textures

I'm trying to draw textures aligned with this physics body whose coordinate system's origin is at the center of the screen. (XNA)Spritebatch has its default origin set to top-left corner. I got the ...
9
votes
3answers
2k views

Creating Entity as an aggregation

I recently asked about how to separate entities from their behaviour and the main answer linked to this article: http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/ The ultimate concept ...
2
votes
1answer
4k views

Adding 2D vector movement with rotation applied

I am trying to apply a slight sine wave movement to objects that float around the screen to make them a little more interesting. I would like to apply this to the objects so that they oscillate from ...
7
votes
7answers
2k views

Wikipedia A* pathfinding algorithm takes a lot of time

I've successfully implemented A* pathfinding in C# but it is very slow, and I don't understand why. I even tried not sorting the openNodes list but it's still the same. The map is 80x80, and there ...
16
votes
10answers
6k views

Does C# have a future in games development?

I recently learned that the MMO Minecraft is powered by Java from a recent interview on CVG.co.uk on a possible collaboration between two former and now competing colleagues. In the interview he ...
12
votes
2answers
2k views

Playing a Song causing WP7 to crash on phone, but not on emulator

I am trying to implement a song into a game that begins playing and continually loops on Windows Phone 7 via XNA 4.0. On the emulator, this works fine, however when deployed to a phone, it simply ...
8
votes
2answers
17k views

Moving a sprite in XNA/C#, using vectors

I'm currently looking into XNA game development with the C# language. I have two classes: the main game handler and a "sprite" class. Following is some basic pseudo-code which I hope adequately ...
4
votes
4answers
2k views

Pong Collision Help in C# w/ XNA

Edit: My goal is to have it function like this: Ball hits 1st Quarter = rebounds higher (aka Y++) Ball hits 2nd Quarter = rebounds higher (using random value) Ball hits 3rd Quarter = rebounds lower (...
6
votes
2answers
3k views

Going fullscreen without stretching in an XNA game

I've got a 2D game that I'm working on that is in a single aspect ratio. When I switch it to fullscreen mode on my widescreen monitor it stretches. I tried using two viewports to give a black ...
8
votes
1answer
5k views

Where to start writing games, any tutorials or the like? [closed]

I'm actually an industrial systems developer with knowledge of .NET C# and VB.NET, C/C++, Delphi, and an intermediate knowledge of 80286 Intel assembly language. I would be interested to learn how to ...
17
votes
4answers
3k views

What are the differences between XNA 3.1 and 4.0? [closed]

I have been away from XNA for a couple months and want to get back into it. I had a game I was currently working on, but it was done in XNA 3.1. What are the differences between the two, and is it ...