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
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
441 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
257 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 ...
-2
votes
1answer
444 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 ...
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 ...
0
votes
1answer
145 views

InvalidCastException in Farseer's raycasting when trying to use the built-in explosion class?

I'm trying to create an explosion at the point that two entities collide, but whenever explosion.Activate() is called, it causes an InvalidCastException to be thrown in Raycast(), on the line that ...
-2
votes
2answers
486 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 ...
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 ...
1
vote
1answer
1k views

Inventory Management concepts in XNA game

I am trying to code the inventory system in my first real game so I have very little experience in both c# and game engine development. Basically, I need some general guidance and tips with how to ...
0
votes
2answers
444 views

using per pixel collision for an elastic response

I realize this might be open ended ended but curious if I just did some over kill... I had this http://xbox.create.msdn.com/en-US/education/catalog/tutorial/collision_2d_perpixel and i reworked it ...
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
718 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. ...
3
votes
3answers
1k views

How many BasicEffects do you have in a Game? What is the best way to render multiple objects/shapes at once?

I'm trying to understand 3D rendering and it seems that everytime you render a new object (A 3D Cube or something) you need to have a new BasicEffect for each Box you render unless you want the exact ...
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
1answer
1k 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 ...
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 ...
2
votes
1answer
286 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 ...
0
votes
2answers
266 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 ...
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 ...
14
votes
5answers
11k views

SharpDX and game engines, back to zero?

I'm a desktop developer (I mainly do WPF for a living) but I want to make games as a hobby. So a few months ago, I started reading blogs, gamedevSE, you name it. I understand in the C++ DirectX ...
1
vote
1answer
580 views

default xna 4.0 gametime don´t works well for 2D physics

I am developing a game using Visual Studio 2010 and XNA 4.0, after advancing to some extent with the project (a platform based 2d platformer msdn starter kit) I got to test it on different computers ...
1
vote
1answer
549 views

Why does my 3D model not translate the way I expect? [closed]

In my first image, my model displays correctly: But when I move the model's position along the Z-axis (forward) I get this, yet the Y-axis doesnt change. An if I keep going, the model disappears ...
-1
votes
1answer
998 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
1answer
100 views

Camera closes in on the fixed point

I've been trying to create a camera that is controlled by the mouse and rotates around a fixed point (read (0, 0, 0)), both vertical and horizontal. This is what I've come up with: camera.Eye = ...
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 ...
4
votes
4answers
618 views

Game programming and quantity of timers

I've made a simple 2D game engine using C# and DirectX and it's fully functional for the demo I made to test it. I have a Timer object that uses QueryPerformanceCounter and I don't know what's the ...
2
votes
1answer
1k 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 ...
2
votes
2answers
781 views

Game Asset Management

I am making my first small mobile game in C# XNA. Lets say I have 3 screens, the main menu, options and game screen. A single game session usually lasts for 1 min, so the user will alternate ...
0
votes
1answer
458 views

Game Maker Studio Gravity Problems

I've started messing around with Game Maker Studio. The problem I'm having is trying to get a gravity code for orbiting. Here's how i did it in XNA foreach (GravItem Item in ...
8
votes
1answer
778 views

Drawing “Stenciled” Sprites and making them glow

Currently, in my game - I'm not using XNA's SpriteBatch to render anything(I am using Farseer Physic's Debug View), and I was wondering how I would render something like this: only using XNA. My ...
1
vote
1answer
518 views

Displaying text letter by letter

I am planing to Write a Text adventure and I don't know how to make the text draw letter by letter in any other way than changing the variable from h to he to hel to hell to hello That would be a ...
1
vote
1answer
904 views

Farseer Physics for Xna missing ConvertUnits class

Im using Farseer Physics with Xna 4.0. Im following a starter guide. It said that to draw, I need to convert the meters to pixels with the ConvertUnits namespace. I looked through all of the engine, ...
3
votes
3answers
1k views

Moving a body in a specific direction using XNA with Farseer Physics

I have a custom polygon attached to a body, which looks like this: What I am trying to accomplish is getting the body to move according to wherever the tip of the body is. So far this is what I've ...
0
votes
3answers
446 views

XNA RTS A* pathfinding issues

I'm starting to develop an RTS game using the XNA framework in C# and am still in the very early prototyping stage. I'm working on the basics. I've got unit selection down and am currently working on ...
7
votes
2answers
722 views

Rotate a vector

I want my first-person camera to smoothly change its viewing direction from direction d1 to direction d2. The latter direction is indicated by a target position t2. So far I have implemented a ...
5
votes
3answers
288 views

Accessing managers from game entities/components

I'm designing an entity-component engine in C# right now, and all components need to have access to the global event manager, which sends off inter-entity events (every entity also has a local event ...
0
votes
1answer
209 views

Move model forward base on model orientation

My model rotates on it's own Y-axis regardless of where it is in the world. Here are the controls for the left ThumbStick: UP (move model forward on Z-Axis) DOWN (move model backward on Z-Axis) LEFT ...
1
vote
2answers
214 views

Is 2 lines of push/pop code for each pre-draw-state too many?

I'm trying to simplify vector graphics management in XNA; currently by incorporating state preservation. 2X lines of push/pop code for X states feels like too many, and it just feels wrong to have 2 ...
1
vote
4answers
2k views

WPF or WinForms for Game Development and learning resources? [closed]

I'm looking to create a game framework for my own personal use... I want to use WPF, but I'm unsure if that is a wise choice... The games I will be writing should not require high performance ...
3
votes
1answer
663 views

How to determine the end of list has been reached?

I'm trying to animate my object according to a set of recorded values from kinect skeleton stream by saving the (x,y,z) stream from the skeletal data into a list and then set my objects x and y ...
2
votes
1answer
203 views

DrawIndexedPrimitives overdraws data in previous buffer if called in loop

I doubled the question from stackoverflow here, and will delete the opposite of a question that gave me the answer. I have the Draw method in one of my renderers, that loops through the dictionary ...
26
votes
6answers
7k views

A way to store potentially infinite 2D map data?

I have a 2D platformer that currently can handle chunks with 100 by 100 tiles, with the chunk coordinates are stored as longs, so this is the only limit of maps (maxlong*maxlong). All entity positions ...
1
vote
1answer
6k views

Rotate to a set degree then stop Unity [closed]

I'm trying to make an object rotate up on the Y axis 90 degrees, then stop. I've got the rotating up bit working fine, it's getting it to stop once it hits 90. Some of the things I've tried include ...
1
vote
3answers
412 views

Slide 2d Vector to destination over a period of time

I am making a library of GUI controls for games I make with XNA. I am currently developing the library as I make a game so I can test the features and find errors/bugs and hopefully smash them right ...
9
votes
2answers
283 views

Server-side Input

Currently in my game, the client is nothing but a renderer. When input state is changed, the client sends a packet to the server and moves the player as if it were processing the input, but the ...
1
vote
1answer
869 views

Rendering a 2D Sprite in 3D space

I am currently working on a game in XNA 4.0 where I want to implement 2.75D, like in Paper Mario. I feel like it has something to do with z-buffering a Texture2D and drawing that, but I really have no ...