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

0
votes
2answers
146 views

List has no value after adding values in

I am creating a a ghost sprite that will mimic the main sprite after 10 seconds of the game. I am storing the users movements in a List<string> and i am using a foreach loop to run the ...
1
vote
1answer
469 views

How important is c# for game programming? [duplicate]

Possible Duplicate: Does C# have a future in games development? Presently I'm learning c++ and in starting stage of opengl . My ultimate goal is to be game programmer. I want to stick with ...
2
votes
2answers
685 views

Help Decide between C#/XNA client or Java

The game runs on a client/server architecture currently setup for TCP, and the client code was built in AS3 to be web based. What we're running into is 3 problems for the client. AS3 has no ...
3
votes
1answer
335 views

Retrieving model position after applying modeltransforms in XNA

For this method that the goingBeyond XNA tutorial provides, it would be really convenient if I could retrieve the new position of the model after I apply all the transforms to the mesh. I have edited ...
1
vote
2answers
957 views

How do I implement fog of war in a tile-based game?

I have created a 2D Tile Based game. The game has a single path that the sprite can move on. I want to create to make the entire screen black except for where the sprite is. The sprite has commands ...
1
vote
3answers
605 views

Implementing a switch statement based on user input

I'm trying to delay the time it takes for the main menu screen to pop up after a user has won / lost a match. As it stands, the game immediately displays a message stating "you won / lost" and waits ...
2
votes
1answer
703 views

Drawing text from update method in XNA

I am having a problem drawing the "Game Over!" text once the user is on the last tile. This is what I have: The Update and drawText methods are in a class named turtle: public void Update(float ...
1
vote
2answers
662 views

Simple collision detection for pong

I'm making a simple pong game, and things are great so far, but I have an odd bug which causes my ball (well, it's a box really) to get stuck on occasion when detecting collision against the ceiling ...
1
vote
3answers
1k views

Text based game in XNA

I want to create a text based game, where the player will type up,down, left or right and the sprite will move in that direction. I created the game and at the moment the player moves with the ...
0
votes
1answer
106 views

How to shoot a triangle out of an asteroid which floats all of the way up to the screen?

I currently have an asteroid texture loaded as my "test player" for the game I'm writing. What I'm trying to figure out how to do is get a triangle to shoot from the center of the asteroid, and keep ...
2
votes
2answers
378 views

Tile map collision is not working properly

I am having problems setting collision between my sprite and the tiles. I have only done the code for colision for moving upwards but some places on the map it moves up and some places it doesn't. ...
4
votes
2answers
347 views

How do I properly use String literals for loading content?

I've been using verbatim string literals for some time now, and never quite thought about using a regular string literal until I started to come across them in Microsoft provided XNA samples. With ...
0
votes
1answer
387 views

Multiplayer Game Data Serialization Problems

I want to create a simple game that can be played with one to two player. I plan on using TCP sockets, Farseer Physics, XNA, a BinaryFormater and a Memorystream. as far as i know i can't do the ...
1
vote
2answers
351 views

How to iterate through a list of enemies and display results?

I'm making an turnbased RPG and I wanted to add a traditional multiple enemy system where a user could attack different enemies when it's there turn. I started by making a list of everybody who is ...
0
votes
1answer
286 views

Platforms collide-able on one side only

I have frequently tried to make some sort of a platformer, but when I actually code it, I run into a bit of a snag. How would I be able to make platforms in the air stop objects if they hit the sides ...
4
votes
1answer
309 views

Paddle will not *continue* to move, pong game, XNA

I'm making a pong game, and my paddles no longer continue to move after holding down the left thumbstick or dpad down. It simply moves once with each press. I think it is because I'm not checking for ...
6
votes
1answer
269 views

How to make a registration for my game?

Me and my (new) company want to sell a very simple game, but we want it so that only the person that buys it can play it. I want to know if it's possible to make a "registration" window pop up when ...
4
votes
2answers
626 views

Detecting collision on a grid with a fast-moving object

I am working in a 2D collision system where I need to detect a collision of a rectangle on a grid, but since the rectangle may be fast enough to jump more than one of the grid squares (sometimes ...
0
votes
2answers
1k views

Rotate object Up/Down/Left/Right in any orientation

I'm rendering model at the origin with a fixed camera looking at it positioned on the z axis. I want to be able to rotate the model up/down and left/right. Currently I have 2 variables, ...
1
vote
1answer
376 views

Basic post-processing shader problem

I'm trying to create a basic post-processing shader, like I did many times before but somehow today it's just not working, I guess it's something basic that I missed. Anyway my setup: I have 3 ...
1
vote
2answers
1k views

How do I determine which side of the player has collided with an object?

I have some static bodies (platforms) and a dynamic body (the player) in my world. The collision between them works great, but I would like to know which side of the player (rectangle) collides with ...
2
votes
4answers
2k views

How to save a game state?

So I am currently working on a simple game project that most people start of with: "breakout". part of my goal is to make a gamesave of the current gamestate the simplest way possible. For example, ...
2
votes
1answer
319 views

Client Server UDP Jumping

I don't really think this is an issue with the fact that UDP can drop packets (I'm using Lidgren and using ReliableInOrder), but basically, in my game, the client send the input keys (if forward is ...
3
votes
5answers
750 views

GameplayScreen does not contain a definition for GraphicsDevice

Long story short: I'm trying to intergrate my game with Microsoft's Game State Management. In doing so I've run into some errors, and the latest one is in the title. I'm not able to display my HUD for ...
0
votes
2answers
159 views

GameStateManagement and inputs not being recognized

EDIT: I've removed a bit of code from the input class to make this more readable, and updated my StartScreen class, which is now at the bottom. I have the same issues though, but they are explained in ...
4
votes
1answer
756 views

XNA: Networking gone totally out of sync

I'm creating a multiplayer interface for a game in 2D some of my friends made, and I'm stuck with a huge latency or sync problem. I started by adapting my game to the msdn xna network tutorial and ...
0
votes
1answer
550 views

Initializing entities vs having a constructor parameter

I'm working on a turn-based tile-based puzzle game, and to create new entities, I use this code: Field.CreateEntity(10, 5, Factory.Player()); This creates a new Player at [10; 5]. I'm using a ...
0
votes
1answer
387 views

Creating movement path displays in a top-down 2d RTS

My game is a top-down 2d RTS coded in C# using SFML's libraries. I want that during unit selection, a unit will display it's movement path on the map. Currently, after the path is computed as a list ...
0
votes
1answer
188 views

XNA:Rectangles Movement Behavior

im trying to create simple pong game, and learning some XNA. im creating for each paddle 3 rectangles, who represnt the collision when the ball hit them, so i can dicide where to throw the ball back. ...
3
votes
0answers
208 views

How can I stop my Jitter physics meshes being offset? [closed]

I'm developing a C# game engine and have hit a snag trying to add physics. I'm using XNA for graphics and Jitter for physics. I am trying to split the XNA model into it's meshes, then create a ...
1
vote
1answer
1k views

Having troubles with LibNoise.XNA and generating tileable maps

Following up on my previous post, I found a wonderful port of LibNoise for XNA. I've been working with it for about 8 hours straight and I'm tearing my hair out - I just can not get maps to tile, I ...
1
vote
1answer
233 views

OpenAL seems to ignore sound attentuation/orientation for long sounds

I don't know how else to describe it in the title, sorry. My sound engine currently works perfectly with listener positioning and sound positioning to create the attentuation and panning effects. At ...
-2
votes
2answers
308 views

XNA: int as Vector2 so i can move sprite

I am really new XNA programming, and i am having a big problem. I have a Vector2, spritePosistion, that controls what position the sprite is at, now i want to move it by 1, every time that a player ...
6
votes
2answers
5k views

C# Perlin noise - generating “endless” terrain chunks?

I'm currently writing a little side scroller in C#, to both learn C# and have fun. Right now I have a simple random number generator generating the world but it isn't exactly all that great - so with ...
0
votes
1answer
2k views

C# multi-player socket server (need clarification/suggestions)

I've been working on an 2D-RPG for a while and I recently decided to make it into an MMO (not really massive, but multi-player). Anyways, I'm attempting to write a game server in C#. Yes, I know I ...
0
votes
1answer
295 views

Is there an SDK to write console apps to simulate an Xbox 360 controller?

Is there any SDK I can use to write a console app that can connect to an Xbox 360 as a controller and simulate controller interaction?
7
votes
3answers
391 views

Sort Polygons in order - not working?

I'm fairly new to programming in a 3d world. I'm trying to create a canvas where all the objects are drawn in order of furthest-to-closest and from bottom to top - so they don't overlap each other, ...
4
votes
4answers
934 views

Drawing 2D Images “3D-Like”

So, I want to use textures for weapons in my FPS game instead of actual models. However, if I just draw the texture onto a square in the game, it has the rotation and stuff, but it looks "2D". How ...
11
votes
6answers
3k views

Ball Physics : Smoothing the final bounces as the ball comes to rest

I've come against another issue in my little bouncing ball game. My ball is bouncing around fine except for the last moments when it is about to come to rest. The movement of the ball is smooth for ...
1
vote
1answer
451 views

Ball Physics : Bounce height altered by elasticity of ball and bounce surface

I have created a bouncing ball simulator using XNA and I am happy with my use of gravity, acceleration, change of direction and friction/spin. However, I am now at a stage where I would like to ...
5
votes
2answers
739 views

XNA significant loss in fps by just adding a few hundred thousand more triangles?

I've got a minecraftish game that's running nice and smooth with a total of 9.3 million triangles, about 50-70fps average. Then if I try to render 9.9 million triangles I get hell and it drops to ...
1
vote
1answer
812 views

XNA game looks laggy below 100 fps?

My xna game is running at about 70-90fps and it looks laggy at this fps. I'm using fraps to record the fps and I have a 120hz monitor, over 120hz looks fine but I can't understand why it feels like ...
5
votes
1answer
327 views

Loading content (meshes, textures, sounds) in the background

In my game, I am aiming for a continuous world, that is, a world where you can go anywhere without breaking the immersion through load times and "virtual seams". My world is broken up into regions, ...
53
votes
7answers
5k views

What are the dangers of self-teaching game development? [closed]

I am about to embark upon a journey into game development. Following answers to my last question, I will be using C# and XNA. However, I don't personally know any other game developers and I don't ...
2
votes
1answer
1k views

Getting started using C# and Physics (Resources, Tutorials, Samples, etc.) [closed]

As an application developer, I plan on now getting started in game development so I have come along to this site. I am a proficient C# developer so I guess it makes sense to start game development in ...
0
votes
1answer
1k views

XNA Calling Variables from separate Classes

I'm having some issues in XNA. I have a Player class and I would like to call a foreach function from a list which has been declared in the Game1 main class, which is below: public class Game1 : ...
2
votes
1answer
549 views

Odd offset bug in Farseer/XNA/C#

So I'm using Farseer to create an immovable object: [...] private Body body; public Immovable(World world, ContentManager c, String s, int posx, int posy, int w, int h, String user_data) { ...
5
votes
2answers
887 views

Detect Mip mapping level in the shader?

Is there a way to do this in pixel shader 2.0/3.0? I've got on or off transparency so when the mipmapping level is different the transparency can take up too much of the texture and make it ...
5
votes
2answers
3k views

Keeping the camera from going through walls in a first person game in Unity?

I'm using a modified version of the standard Unity First Person Controller. At the moment when I stand near walls, the camera clips through and lets me see through the wall. I know about camera ...
0
votes
1answer
61 views

Primitives does not show on screen [closed]

I'm trying to render terrain, everything compiles fine, but I can't see anything on screen. ( I'm moving camera around in case it was on the other side) Can't figure out whats wrong. public class ...