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

Does ContentManager.Load<T>() re-read an asset if I have loaded it before?

Or is it smart enough to know I have asked for it before and return an in memory copy created from the first call? For example if I have a projectile's texture: Texture2D projectile; If then I ...
2
votes
3answers
2k views

How do I check collision when firing bullet?

I'm currently creating 2D game from top perspective. I'm having problems with bullets. Yes, I currently simulate their movement so user can see them (about 2x ). Moving them with // this is static ...
4
votes
2answers
1k views

Rendering a lot of Models at once with XNA

In an hexgrid based game, I render all terrain tiles as a separate model, reusing the same texture objects on all similar tiles. The tiles is a pretty simple model. When the terrain is set to be at ...
1
vote
1answer
330 views

Input in OpenTK

How to use Input in OpenTK 1.0? There is not much info around, some classes are unfinished. What I want to achieve, is to be able to use input not only in OnUpdate function, but also in other classes ...
8
votes
6answers
818 views

How can I store all my level data in a single file instead of spread out over many files?

I am currently generating my level data, and saving to disk to ensure that any modifications done to the level are saved. I am storing "chunks" of 2048x2048 pixels into a file. Whenever the player ...
0
votes
1answer
214 views

Creating a vertexbuffer to define vertices arranged in a grid with the view for easy editing later

I'm using the marching square algorithm (2D version of marching cubes) to generate vertices. I end up with vertices arranged in a grid. I want to enable destructible terrain, and the way i was ...
-6
votes
2answers
1k views

How can I convert the 3D Object designed in MAYA or 3D Max to OpenGL Object?

I'm try to convert the 3D Objects created in the Maya or 3D Max to Simple OpenGl object anyone please guide me how can I do so???
0
votes
2answers
335 views

Can I create mods for a D3D game made in C#?

There is a game currently in development in C# (using Direct3D for graphics) that I want to make mods for. Ideally, I would like to make the mods in C#, but after that I am lost. How would I (or ...
0
votes
1answer
892 views

Open source component-based game engines? [duplicate]

Possible Duplicate: Are there existing FOSS component-based frameworks? What open source game engines with component-based design of game objects do you know? And which best of them? I mean ...
5
votes
1answer
1k views

Things to do to port game made for iOS in Unity to Android?

I have just made my first game for iOS and submitted it to app store. I was thinking of porting my game to Android also. I would like to know things one need to do/remember to port game made for iOS ...
3
votes
2answers
1k views

Collision Detection problems in Voxel Engine (XNA)

I am creating a minecraft like terrain engine in XNA and have had some collision problems for quite some time. I have checked and changed my code based on other peoples collision code and I still have ...
0
votes
1answer
435 views

Best Algorithm for attacking in the Risk Game

I apologize in advance for my English.I'll try to explain my problem. I am working on new version of the Risk game. I want to change the attacking algorithm to make it more similar to real life war. ...
4
votes
1answer
1k views

Creating a Model out of Math primitives

Here is a litte sample that I drew in Blender to visualize what I am planing to create: Cone with spheres sample I already have the code to generate the cone and the spheres as mentioned in my ...
0
votes
1answer
191 views

A few queries about my Map Data (& ideas of improvement, seconded opinion required)

so like the title says i'm trying to think of ways that i can basically improve my level/map data. Currently it's "alright" but i don't feel it's great. There's certain things that i'd like to-do to ...
2
votes
1answer
268 views

How can I get the texture color data from GLEED2D's level file?

I've hit a little snag in my game. It's a 2D platform game and I need to check for collisions against the level. I'm using GLEED2D to create the map. I'd like to do per-pixel collision checking, but ...
14
votes
9answers
3k views

How should I go about learning XNA? [closed]

I want to start learning how to make games in XNA, but I have no idea where to start! If someone could advise me on what pieces of software I need and some good books or tutorials to look at, that ...
2
votes
1answer
2k views

Multi texturing in XNA

I am attempting to make a map editor for my game, just so I can visualize how the end result would be. To my world I can add cubes (2 triangles) or corners (1 triangle), which are then added to a ...
2
votes
1answer
285 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 += ...
6
votes
3answers
2k views

Behavior/Attribute GameComponent Architecture

I am a college student, and game development is a little hobby for me. I am writing a new game and I have been looking for a new approach to developing the game engine as to make it more flexible (and ...
3
votes
2answers
593 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 ...
3
votes
2answers
1k views

Depth buffer and render target

When I use this RenderTarget: renderTarget = new RenderTarget2D(GraphicsDevice, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height, false, SurfaceFormat.Color, DepthFormat.Depth24); ...
1
vote
1answer
734 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
788 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 ...
4
votes
4answers
768 views

Weird block selector selection (to floor or not to floor)?

Well, I am creating a Minecraft like engine in XNA, and since I first implemented the block selector (the cube that allows you to select blocks in 3D space) it has always been very inaccurate. Here is ...
3
votes
2answers
351 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
391 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 ...
3
votes
3answers
878 views

Non-GPU Noise for 2D side-view terrain generation?

I really couldn't find a correct answer while scowering all the forums for Noise Generation. My goal is simple, I really want to have two distinct layers for my terrain, a white layer representing ...
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 ...
4
votes
1answer
919 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 ...
0
votes
2answers
609 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 ...
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, ...
8
votes
3answers
664 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 ...
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 ...
2
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
597 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
415 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
3k views

What are the pros and cons of Lua vs. Python as a scripting language for XNA/C# platform?

I am thinking about giving a go to one of my ancient ideas for a game. The core point of this game would be the possible level of functional customization of the game environment and objects (such as ...
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). ...
2
votes
1answer
2k views

Simple WP7 pong game with real time multiplayer using sockets

I'm making a pong clone for Windows Phone 7 and I'd love to add a multiplayer option. I've been trying to use this Ricky Tan's tutorial: ...
9
votes
2answers
987 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

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 ...
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 ...
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 ...
4
votes
3answers
2k views

How can I stop looking for keyboard input for a length of time?

I'm pretty new to programming, and even newer to C# and XNA. I currently call a method that looks for keyboard input in my Update method. This method has if statements for doing what needs to be done ...
0
votes
3answers
262 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
346 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 ...
4
votes
2answers
4k views

How to get mouse position relative to the map?

I'm creating a game in XNA similar to Minecraft - Minecraft 2D It looks like this Here's how it works: All blocks are generated once with fixed x,y coordinates and just re-drawn. //generate ...
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
839 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 ...