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

2
votes
1answer
286 views

When animating sprites, why subtract frametime when switching between sprites instead of resetting elapsed time to zero?

I am currently on chapter 3 of the book "Learning XNA 4.0". At the end of this chapter is a section on changing the animation speed of sprites. timeSinceLastFrame += ...
19
votes
7answers
6k 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 ...
3
votes
2answers
597 views

What is the metrics of vectors in XNA?

When exporting a model from 3ds Max as FBX to import it into XNA, what metrics should I choose to make 1 unit in 3ds Max equal to 1 unit in XNA? For example: I have a sphere model with 1m radius ...
1
vote
1answer
751 views

How to import the .fbx scene with multiple objects in XNA so that the objects retain their scene position?

I have a scene that contains mutiple objects. How can I import it in XNA and maintain each object position? Right now I export the scene in .fbx and load it in a model like this: cube.model = ...
0
votes
1answer
827 views

How to achieve this style of view in XNA?

I would like to use a Perspective projection to create the following effect in XNA: Cubes are simply made up of 8 vertices and drawn using DrawUserIndexedPrimitives(). Any extra suggestions, are ...
3
votes
2answers
363 views

Issue with loading XML

So recently i've been changing my XML files that i'm using in-game, to add in a bit more data to the files but i've also changed the way in which i load & save files, by now using the XDocument ...
4
votes
1answer
934 views

Are there any good engines for isometric collision detection and platforming?

I've decided to resurrect an old game idea I had years ago. I currently have zero experience with programming, but I'm going to begin studying either C#, Python or both in the near future. The issue ...
4
votes
1answer
392 views

How should I handle shared classes between the Game project and the Content Extension Library?

I've been using XNA for a while but recently I've needed to write a content extension library which I haven't done before. I need to import a TextureAtlas class from a file that is exported by a tool ...
6
votes
0answers
341 views

Rotating platform glitch in a 2D platformer [closed]

So I'm making a tiled platform game in C#/XNA where the whole world is constantly rotating. The huge hurdle was to find out what side of the tile the player was touching, and what angle it was. I ...
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 ... ...
8
votes
3answers
676 views

What is the state of the art at shipping game graphics such as lots of small BMP files?

We have lots of small BMP files which I think would be easier to copy if we had them combined in a big TAR/ZIP/whatever. What is the state of the art at shipping game graphics? We are using C# and ...
2
votes
1answer
2k views

Xna, writing XML </Asset> end element

got another question here. Its not about actually writing/reading files in XML, i already know how to-do this. But rather something that has bugged me for awhile. Ok, so when i write out my files, ...
0
votes
2answers
618 views

Load XNA Content Type from File

I'm writing my own level editor and recently got the exporter working so now I'm working on the importer. My save file structure looks essentially like this: [ObjectType] Property=Value ...
3
votes
1answer
2k views

How to “swing” bounding box and update collision for sprite swinging a weapon?

I have a simple question about sprite swinging weapons. I am making an RPG and would like something other than stabby-swords, so why not swinging swords? I have a bounding rectangle for them, and the ...
2
votes
1answer
2k views

Offsetting image position when scaling in XNA

What Im trying to do is pretty simple, offset the rendering position of my image when scaled up/down. I honestly can't remember how to-do this :( if (newAnim.texture != null) { // Set Source ...
3
votes
1answer
1k views

Is it possible to animate the texture of a model?

Below is how far I've got. I just made a simple block with user primitives to test it. But I haven't found a way to crop the spritesheet. textureLava = frames[activeFrame]; This line is how I want ...
1
vote
2answers
600 views

How can I implement a “boost pad” with Farseer/Box2D physics?

I'm trying to implement a boost pad in my XNA game using the Farseer Physics Engine. (This question applies to Box2D too, I would be happy to port working Box2D code to C#.) By "boost pad", I mean an ...
2
votes
2answers
419 views

Rotating a planet around a ships axis

I have a planet rotating around its own axis (like regular planets, and Pluto) and a spaceship that can fly around in space. The idea is to lock the player (ship) in a deadzone "above" the planet and ...
9
votes
2answers
1k views

How to make a world-to-player inventory system?

I am running into an issue of trying to implement an inventory system within XNA (doesn't really matter, could be any platform) but so far. Here is the issue I am trying to wrap my head around: How ...
2
votes
1answer
1k views

Unity3D animation and world collisions?

I'm using death animation for my enemies but the problem is that when enemy dies he crosses the walls/world. I want enemy/animation to be pushed back into world when he dies (animation is playing). ...
0
votes
1answer
330 views

XNA and C# Draw method question

If I missed the answer to this question being already posted I apologize but I was unable to find it. I'm new to C# and XNA and converting a VB game I created into them. Im finding a problem I'm not ...
2
votes
1answer
363 views

How do i make player input object spawning data driven?

I'm using component based design and am at the stage or re-factoring simple player input to be data driven. Currently i have a PlayerControlComponent, which an entity has if it should be player ...
9
votes
1answer
3k views

Wave ripple effect?

I've been working on a tower-defense game for some time now, and so far I am really satisfied with the results. However, there's one thing I'd like to add. I've seen a video of GeoDefense for Windows ...
2
votes
1answer
1k views

2D platformer multiple rectangle collision cause jitter

I posted this question two weeks ago: 2D platformer corner collision and I implemented NoobsArePeople2's solution. Problem is, when player intersects two rectangles that are inside each other, he ...
0
votes
2answers
5k views

How to make a Realtime 3D Eulerian Fluid Simulation like “From Dust” in C#/Unity3D?

So, for a game project I'm going to be working on I need to make a fully working 3D fluid simulator in Unity3D using C#, that can work in real time. The only problem is, I've never done anything like ...
12
votes
2answers
7k views

How do I disable texture filtering for sprite scaling in XNA 4.0?

I have a sprite that I'm trying to scale up in XNA, but XNA is applying some sort of texture filtering that smooths it and makes it look ugly. I'd like it to just do pixel doubling instead of ...
0
votes
1answer
456 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 ...
0
votes
3answers
266 views

In game level editor using AIR or stand alone app using Java or C#

I'm in the process of choosing technologies to build the level editor of a Flash RPG game. On one side I can use AIR and build a ingame level editor that's probably going to give the best result. The ...
4
votes
1answer
352 views

Getting the Bounds of a 2D Cameras View with Zoom

I am using a 2D camera, which does rotations and zoom. Currently, I am using the following to get my MinX, MinY, MaxX and MaxY... public float MinX { get { return ...
6
votes
3answers
5k views

Efficient Tile-based collision detection for a lot of squares?

currently I am working on my own take of a tile-based game (think Terraria, but less fantastical (I think that's a word? Sorry if it isn't)). Anyway, I currently have collision detection working ...
5
votes
2answers
846 views

What is road map for Windows 3D game development in C#

I used WPF 3D to make a demo program a while ago. I'm now want to give some other things a shot but find working in WPF 3D ... confining. I have looked at Managed Direct3D but read that it's dead. I ...
3
votes
1answer
2k views

How do I implement SkyBox in xna 4.0 Reach Profile (for Windows Phone 7)?

I'm trying to Implement SkyBox in my phone game. Most of the samples in the web are for HiDef profile, and they are using custom effects (that not supported on Windows Phone). I've tried to follow ...
3
votes
1answer
1k views

2D platformer corner collision

Repost from my question on stack overflow, didnt know this site existed. I have a 2d platformer and I need help with collision. To show you my current collision system, here is picture: Top picture ...
3
votes
1answer
799 views

Platformer collision detection problems

I'm having a few problems with collision detection in my game (written in C# with SDL.Net). Detecting the floor and roof is fine, as does detecting sides of tiles when not jumping/falling. My problem ...
0
votes
1answer
823 views

How do I install SDL.NET in Visual Studio 2010? (Or any other .NET library)

I'm trying to get SDL.NET to work in Visual Studio 2010, but am really not sure how to go about installing the library (or creating a custom project or something), and any basic instructions would be ...
2
votes
1answer
1k views

Can't change the textures of a .FBX or an .X exported from 3dsmax

I created a model (real simple) in 3DSMax 2010, exported it to FBX format and loaded it in an XNA 4.0 content project. I also tried with .X files using kW X-port and it has the same behavior. I can ...
12
votes
7answers
7k views

What is a good way to store tilemap data?

I'm developing a 2D platformer with some uni friends. We've based it upon the XNA Platformer Starter Kit which uses .txt files to store the tile map. While this is simple it does not give us enough ...
7
votes
2answers
3k views

2D Game C# click-to-move samples?

Currently I am learning how to use XNA by making a 2D Game. So far I am doing okay, but I want to implement a click-to-move instead of using the keys to walk around but I haven't found any samples ...
3
votes
1answer
1k views

What happens when I implement IUpdateable or IDrawable in XNA?

I've been fooling around with XNA today, attempting to develop a pure-component model game engine. I've been working on a GraphicsSubsystem class, and realized that it will need both an Update method ...
1
vote
1answer
777 views

Clipping polygons in XNA with stencil (not using spritebatch)

The problem... i'm drawing polygons, in this case boxes, and i want clip children polygons with its parent's client area. // Class Region public void Render(GraphicsDevice Device, Camera ...
2
votes
1answer
115 views

Problem displaying model

I downloaded the FBX of this free model: http://www.turbosquid.com/FullPreview/Index.cfm/ID/485548 Yet when i try and display it in my project foreach (ModelMesh mesh in player.Meshes) { ...
7
votes
1answer
2k views

How to create a XNA texture from a GDI Image with source rectangle?

A Texture2D in XNA can only hold so much. Depending on which profile I use that limit is either 2048 or 4096 pixels wide. As far as I could tell from my research (someone correct me if I'm wrong) GDI ...
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 ...
12
votes
6answers
5k views

How can I implement hexagonal tilemap picking in XNA?

I have a hexagon tiled map in which i need to check when a hexagon is clicked. The hexagons aren't actually touching, rather they have a slight gap in between each of them. Does anyone know how I ...
2
votes
2answers
923 views

Why does my sprite jitter when it arrives at its destination?

I have just started looking into XNA for WP7 - and I am definitely the sort of person who likes to find answers to my questions without begging for help! I searched here to find an answer but I found ...
1
vote
2answers
3k views

XNA: draw a sprite in 3d, is that possible?

since now I always used sprited to draw in 2D: spriteBatch.Draw(myTexture, rectangle, color); (I suppose the texture is binded internally to 2 triangles and then scaled.) Now, I'm porting my game ...
4
votes
2answers
2k views

Recommended method for XML level loading in XNA

I want to use Blender as my level designer tool for an XNA game. Using an existing plugin, I can export my levels to DotScene format which is basically an xml file like this one: <scene ...
0
votes
1answer
1k views

XNA model texture from file

Is there any way to have the texture of a model loaded from a Png ? I have a simple prism to test it on, but i just want to be able to edit an image and have the model's texture change. Thanks!
0
votes
1answer
430 views

Dual Stick Shooter in XNA (trig)

Honestly I have never taken a trigonometry class, but I am trying to create a dual stick shooter in XNA, can someone please look at my code and look to see if there are things that can be fixed, The ...
7
votes
1answer
2k views

XNA Quadtree with LOD

I'm looking to create a fairly large environment, and as such would like to implement a quadtree and use LOD on it. I've looked through numerous examples and I get the basic idea of a quadtree. Start ...