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
1answer
289 views

Sending A Class Packet [closed]

How would I be able to send a class through the internet like this. class Player { public int Health; public Player Copy() { return this; } } And do this. SendPacket(new ...
4
votes
1answer
2k views

2D Tile Game - Smooth Biome Terrain Transitions

While working on my 2D tile based game, I encountered a problem. I use Perlin Noise to generate the terrain. Some biomes (Desert, Forest, etc) have different flatness values depending on terrain, ...
2
votes
1answer
1k views

Custom inventory items based on inheritance

So, here's the scenario: I'm building an RPG. Like most of the other RPGs on the market, my game will feature an inventory and of course, inventory items. So far I've worked well with using a single ...
1
vote
1answer
119 views

How do I render an entire frame to a Texture2D?

I asked a question here: C# XNA Make rendered screen a texture2d But, I ended up not getting the exact result I was looking for since I didn't ask the question right. In a game I am writing, I ...
-4
votes
4answers
139 views

How to select a random node [closed]

I need to know if it is possible to select a random node or select a node itself because I'm doing a zombie AI and I need him to randomly move, and I wanted to know if it's possible to do it and how.
0
votes
2answers
3k views

Load SpriteFont in XNA

I'm planning on my game using multiple backgrounds so I'm trying to use spritefonts to draw the text. Every time I load my spritefont I get a error. Line1 = content.Load<SpriteFont>("Courier ...
-1
votes
1answer
192 views

2D Game Help In XNA

I'm making a game in XNA called The Adventure Of The Very Hairy Princess Fairy. The game is a "Sidescroller/Platformer" like mario but there is a problem. How do I attach a weapon to the player ...
0
votes
0answers
147 views

Keep 3d model facing the camera at all angles [duplicate]

I'm trying to keep a 3d plane facing the camera at all angles but while i have some success with this: Vector3 gunToCam = cam.cameraPosition - getWorld.Translation; Vector3 beamRight = ...
-4
votes
1answer
214 views

How Do Game Timers Work?

I don't understand the whole game timer things, I know XNA comes with one but im realying on VSync to do the work rather then a game timer. I know what they are It's just can someone show me of a ...
-4
votes
1answer
203 views

Making A Game Manager C# [closed]

Is it possible to make a game manager like steam (without the downloads just something that lists your games) in C#? I'm just not sure what the .NET framework can do.
2
votes
2answers
179 views

Re-sizing the form without scaling the GUI

I am writing a turn based strategy game in C#. My GUI implementation consists of class that extends Form containing a class that extends Panel. When I render the GUI I draw to the paint method in ...
5
votes
5answers
3k views

More Efficient Data Structure for Large Layered Tile Map

It seems like the popular method is to break the map up into regions and load them as needed, my problem is that in my game there are many AI entities other than the player out performing actions in ...
0
votes
2answers
186 views

Adding Vertices to a dynamic mesh via Method Call

I have a C# Struct with a static method, "Get Shape" which populates a List with the vertices of a polyhedron. Method Signature: public static void GetShape(Block b, int x, int y, int z, ...
3
votes
1answer
391 views

XNA Deferred Shading, Replace BasicEffect

I have implemented deferred shading in my XNA 4.0 project, meaning that I need all objects to start out with the same shader "RenderGBuffer.fx". How can I use a custom Content Processor to: Not load ...
3
votes
2answers
230 views

Implementing a multilanguage AI contest platform

This is a followup to this question. To sum: I'm implementing an AI contest site, where each user may submit several AI implementations for different games. Think about Google AI Challenge but instead ...
2
votes
5answers
596 views

Is It More Efficient To Make Games In Languages I Like?

Is it more "efficient" to develop games with languages you're good with and like best rather then the "best" language? For example: I like C# (It's My First Language) and I'm really good at it and ...
-2
votes
1answer
212 views

How Good Is The Xbox 360's Hardware?

I'm thinking about doing things in XNA because I really like C# but I'm wondering about the whole Xbox 360 Development. How good exactly good will the hardware be, also I heard that the games are ...
0
votes
1answer
104 views

How to Draw texture between 2 Vector3

My scenario: RTS combat style, 1 unit fires beam on another unit My problem is i want to draw a flat texture between 2 Vector3 points. I have looked at various Billboarding styles but that doesn't ...
0
votes
2answers
1k views

Foreach loop with 2d array of objects

I'm using a 2D array of objects to store data about tiles, or "blocks" in my gameworld. I initialise the array, fill it with data and then attempt to invoke the draw method of each object. foreach ...
1
vote
2answers
439 views

How do I do random isometric paths?

I'm working on an Isometric city generator, and I am looking for a little push in the right direction. I'm looking to randomly generate roads on a isometric plane. I have never done pathfinding ...
0
votes
1answer
255 views

Drawing order in XNA

When manually setting the drawing order of game components by setting int DrawableGameComponent.DrawOrder can one use any integer numbers as long an order is defined like component1 => drawing ...
0
votes
2answers
435 views

Load order in XNA?

I am wondering whether the is a mechanism to manually control the call-order of void Game.LoadContent() as it is the case with void Game.Draw(GameTime gt) by setting int ...
1
vote
2answers
508 views

XNA Game Timer Help

How do I set a game timer in XNA? I need it to keep the game in sync no matter the lag or frame rate to prevent one moment to be normal but the next everything is sped up.
5
votes
3answers
235 views

Depth is disabled - How to turn on?

In XNA 3.1 is there any other way to disable depth in 3D Worlds using DirectX models other than GraphicsDevice.RenderState.DepthBufferEnable = false; ? The reason for my question is I have quite a ...
-2
votes
2answers
485 views

Realistic Jumping [duplicate]

Possible Duplicate: How can I implement gravity? I want to make the jumping that my character does more realistic. This is what I've tried so far but it doesn't seem very realistic when the ...
17
votes
7answers
1k views

UI mockups to the code

My UI designer has made a lovely photoshop PSD of the UI and everything pretty. The biggest problem I'm having is converting some of the more elegant fonts used into something renderable in-game. Is ...
4
votes
2answers
2k views

How to create a thread in XNA for pathfinding?

I am trying to create a separate thread for my enemy's A* pathfinder which will give me a list of points to get to the player. I have placed the thread in the update method of my enemy. However this ...
-2
votes
1answer
443 views

C# XNA 2D Multiple boxes collision detection and movement

Hi, I've been making simple game where you shoot boxes that are coming towards you. All game objects are simple rectangles. Now I have problem with collision detection; how to check where the ...
1
vote
0answers
168 views

Beginner C# image loading woes - NullReferenceException [closed]

I keep getting a "NullReferenceExeption was unhandled" with "Object reference not set to an instance of an object." written under it. I have all of the images (png) correct with names and added to ...
2
votes
1answer
236 views

Movement on the X an Z axis are combined?

This is probably a stupid question, but I'm trying to simply move a 3D object up, down, left, and right (Not forward or backward). The Y axis works fine, but when I increment the object's X position, ...
0
votes
0answers
156 views

Is it worth learning XNA now? [duplicate]

Possible Duplicate: What is the future of XNA in Windows 8 or how will manged games be developed in Windows 8? It's no secret XNA's future is uncertain. Windows 8 only supports XNA desktop ...
2
votes
1answer
715 views

SharpDx: using maximized RenderForm

I'm trying to learn DirectX via SharpDX, very new to this. What I want to do is be able to draw 2D shapes for a game I'm trying to make. So I started with the demo "MiniRect" that came with SharpDX. ...
4
votes
1answer
527 views

Separate collision mesh model?

I want to have another go at 3D within XNA. What I have seen from some other games that they just have a separate very low poly model "cage" around the environment model. However I can not find any ...
1
vote
3answers
1k views

How do I swap two objects in C# (specifically Mono) without triggering GC?

I have two array lists. that I want to swap each frame. My question is, does the variable 'temp' need to be a member variable to avoid triggering GC, assuming this method is called on dozens of ...
1
vote
2answers
656 views

Rotating multiple points at once in 2D

I currently have an editor that creates shapes out of (X, Y) coordinates and then triangulate that to make up a shape of those points. What will I have to do to rotate all of those points ...
14
votes
4answers
5k views

How can I acheive a smooth 2D lighting effect?

I'm making a 2D tile based game in XNA. Currently my lightning looks like this. How can I get it to look like this? Instead of each block having its own tint, it has a smooth overlay. I'm assuming ...
9
votes
5answers
3k views

How do dialog trees work?

That is, what is connected to what and how to move between lines of speech when a sub-conversation ends? If you have any examples of a basic dialog tree in C#, please post them.
1
vote
1answer
2k views

How to make 2D water like in this video?

I wanna make water and waves for my little 2D PC game like in this video: http://www.youtube.com/watch?v=ooU6cTeirlQ I don't know how to write a similar shader. Does anybody know how to write a ...
2
votes
1answer
285 views

Implementing hitbox polygon

I'm creating a shooter, it's still very early, but i'm implementing some polygon hitboxes. So far i have created a polygon class, and i'm looking into how i can hook it onto my player. I'm trying to ...
2
votes
3answers
1k views

Snake Game Help [closed]

I am making a snake game and learning XNA at the same time. I have 3 classes : Game.cs, Snake.cs and Apple.cs My problem is more of a conceptual problem, I want to know which class is really ...
0
votes
2answers
265 views

Jumping Logic Issues [duplicate]

Possible Duplicate: How to make a character jump? I have been working on a 2D platformer and am trying to implement jumping. At the moment I have it simply teleporting upward and then ...
3
votes
2answers
1k views

How can I implement smooth rotation from one direction to another?

I'm having a problem with animating rotations with 1Matrix.CreateRotationY() with my basic 3D game. Based on where you click the mouse, I want the 3D object to rotate to that direction and then move. ...
6
votes
2answers
3k views

Random World Generation [duplicate]

Possible Duplicate: How are voxel terrain engines made? I'm making a game like minecraft (although a different idea) but I need a random world generator for a 1024 block wide and 256 block ...
1
vote
1answer
294 views

How do I implement Unreal-like object serialization?

Recently, I've been working on the core of my engine, and as I'm moving forward I find myself developing throwaway code to read files and simple data into the engine. This got me thinking about how I ...
0
votes
1answer
287 views

How to collide with a 45degree wall in XNA

I want to make a PAC MAN imitation game to start working on AI, and while my first version will feature rectangles with widths or heights of 1 to makes walls for collision detection, I want to ...
-1
votes
1answer
994 views

How can I guarantee a solvable Fifteen Puzzle shuffle?

I am making a 15 Puzzle game in C# that allows the user to enter a custom row and column value up to a maximum of a 10 x 10 puzzle. I am having problems with the shuffle method. I want to make it so ...
2
votes
2answers
513 views

Adjust treble and bass on Audio in XNA

I am trying to "muffle" the sounds that are being played in my game and the best way I can think of doing this, is by lowering the treble of the sound. I have looked through all the members of the ...
1
vote
3answers
418 views

Why does unity obj import flip my x coordinate?

When I import my wavefront obj model into unity and then draw lines over it with the same coordinates in the obj file, the x coordinate is negated. I don't see any option in the importer that might ...
2
votes
1answer
2k views

detect asset change while running in unity editor?

Is it possible to detect asset change while running in the unity editor. When I update my model, I see it change but the xml data associated with it does not change. So it would be nice to detect ...
1
vote
0answers
68 views

XNA - Obtaining depth from the scene's render target? [duplicate]

Possible Duplicate: Depth buffer and render target I'm currently rendering my scene to a render target so it can be used for rendering methods such as post processing and order independent ...