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
0answers
148 views

Difference between multiple AudioUnits and one AudioGraph with a MultiChannelMixer

I'm porting my game to iOS using MonoTouch, and I'm having some trouble getting sound output to work. SystemSound/AVAudioPlayer is way too simple for my needs (I need looping and multiple simultaneous ...
-3
votes
1answer
539 views

2D XNA Shooting Game [closed]

im doing a XNA game for a school project but im having trouble with the bullets. I can´t find any way to draw them or "invoque" them went i want. It is a modified Space Invaders that im trying to do. ...
3
votes
3answers
540 views

How can I load 2D texture data without a GraphicsDevice instance?

We have a client/server architecture for our game with the client being the XNA Game, and the game server is separate and only references XNA. They both use a shared DLL for networking. The game ...
-2
votes
3answers
810 views

Why use textures that are Power of Two? [duplicate]

Possible Duplicate: Why are textures always square powers of two? What if they aren’t? I am using C# and XNA (also MonoGame for other platforms than Windows) to create a game in 2D. ...
0
votes
0answers
124 views

Draw mesh with multiple bones

So I currently have an object made up of only one mesh. And this object contains three bones. One for strecthing the mesh left, one for streching the mesh up, and a center bone, which moves the object ...
3
votes
1answer
189 views

ResourceContentManager with folders

I am attempting to do something like the following: http://blogs.msdn.com/b/shawnhar/archive/2007/06/12/embedding-content-as-resources.aspx (Access the content via a DLL) However, I need to maintain ...
0
votes
1answer
307 views

Collisions and camera tilt in XNA C# 3D Game [closed]

I am working on a game programming class project and need some help. I cannot find a good tutorial on how to get these 3 frictionless spheres to collide with each-other, the surface and the walls of ...
1
vote
1answer
2k views

Move Object Around Sphere in Unity3D

I am trying to get a GameObject to be able to be controlled to move freely around a sphere using a virtual on-screen joystick. I am building this for iOS and Android in Unity. I am using the standard ...
0
votes
2answers
215 views

3d to 2d Collision

I have a 3d model which rotates around my screen, it's always on the Z axis = 0 where everything of my 2d images are. My 2d images fly out of the center and get bigger to give the view as getting ...
4
votes
1answer
2k views

Replacement for XNA? [closed]

Since Microsoft stopped developing XNA I'm wondering what will be the replacement for the XBox 720°. I've been wondering about this. XNA was THE technologie the XBox, easy and powerfull. So is ...
1
vote
1answer
91 views

Automatic Tile Transitions Not Working Correctly [closed]

I've started writing a tile based game in XNA today using the tutorials here. I'm on the Part 6 - Side Topic - Auto Transitions at the moment. My transitions aren't working correctly as you can see ...
2
votes
4answers
302 views

Who should manage projectiles?

I was following a tutorial that was recommended to me to learn the basics of game design through XNA. And I got to this tutorial: ...
-2
votes
1answer
290 views

Multiple viewports [closed]

[Problem solved ! I canno't answer with the response because i have less than 10 reputations. I have to wait 8 hours.] Currently, i'm trying to display 3 viewports. 1st : This viewport is the entire ...
5
votes
2answers
500 views

Ball bouncing infinitely and constantly

Alright, so I've got hold of some simple physics mechanics, and am currently trying to implement bouncing. Based on the first answer of this question, I've developed the following algorithm: ...
2
votes
1answer
141 views

Developing an interactive book for Windows-Runtime

My three year old loves playing with the interactive books on our iPad, and I love playing with code and I love my Surface RT... So I thought I'd try and make a basic animated book using WinRT, I've ...
0
votes
1answer
1k views

Can I develop libgdx game with C#?

I see some articles through Google that I can use libgdx in C#. Is it true? I found no official and unonfficial about this. If there is a way, please tell me how. Thank you
3
votes
1answer
191 views

Figuring out which direction my object is facing on a 2D plane?

My friend and I were messing around in XNA 4.0 making a 2D racing game. Kind of like this one: Ivan “Ironman” Stewart’s Super Off Road. The problem we are having is knowing which direction the car is ...
1
vote
2answers
281 views

How to store different abilities in player class?

So, I have a player class with basic actions. During the gameplay he unlocks new abilities. I don't know how to store new actions within the player class. To be precise - I know how, but my method ...
2
votes
1answer
325 views

How to organise an XNA client/server solution

I was wondering what would be the best way to go about organizing the projects for the XNA project I have been working on. It is a simple game that uses a client/server architecture. Currently ...
-1
votes
2answers
171 views

Tile collision, can't get correct behaviour [closed]

I define a tile with a rectangle. This is displayed below. public class Tile : Sprite { Rectangle rectangle; public Rectangle GetRectangle { get { return ...
-3
votes
1answer
173 views

How long would it take to learn c# if I know c++? [closed]

I already know c++, having worked through Accelerated C++ reading all the chapters and doing all the problems, with a bit of college coursework in C++ as well. From what I read, I seem to have ...
3
votes
1answer
629 views

Storing items in external data files

My project, in its current state, keeps all of the info for each inventory item in script files. That means, inventory items and their properties are part of the codebase. This works well, but I'm ...
2
votes
1answer
465 views

XNA Textures with background color

I am fairly new to XNA and I have questions in regards to textures. Most of my of textures have a background color along with the overall image (white, black, or whatever). This is quite ugly as the ...
0
votes
2answers
173 views

How do I achieve one touch one shot for WP7 game?

I want to be able to have a sprite shoot in a game for WP7. What I have at the moment is that as long as the shoot button is held down the sprite constantly shoots. How do I sort it that only one ...
2
votes
1answer
197 views

How to implement in-game purchase?

I am currently developing an indie game using XNA/C#. I would like to give players the opportunity to try a free (but somewhat limited) demo version of the game. Nevertheless, the player should be ...
1
vote
4answers
621 views

What is a good way to load more than a million images for a collectible card game?

I'm using C# with MonoGame and I'm wondering what would be an efficient way to load more than a million card images for a collectible card game. More cards would be continuously added in future ...
3
votes
1answer
487 views

Dynamically save an assetbundle during run time

I'm wondering if it is possible to dynamically save / amend a current asset bundle during the running of my Unity application. I've been looking into this for a few hours, but can't find anything ...
0
votes
1answer
139 views

Tile Draw Order

I started working on a tile engine recently and have been trying to get this depth sorting for the tiles right. I am using XNA and the SpriteSortMode.Deferred to get the tiles to sort correctly in the ...
6
votes
2answers
489 views

Detecting Light Intensity Around Characters

Later Edit Since there seemed to be a bit of confusion: I am asking this for purely didactic reasons, I'm not searching for the most efficient solution. Reformulated question: I'm working under ...
1
vote
3answers
249 views

Objects being drawn on wrong layers

I have the main game (Game1.cs) draw the sprites like so: //Clear everything GraphicsDevice.Clear(Color.CornflowerBlue); //Begin drawing ...
0
votes
2answers
893 views

How to make a smooth movement in XNA?

I'm trying to make a nice controls for my game, but I can't achieve enough SMOOTHNESS. if (kbState.GetPressedKeys().Length != 0 && _direction != Vector2.Zero) { ...
1
vote
0answers
189 views

3D Animations in XNA 3.1

Well, guys. I'm in a Game Design class at school. Before you ask "WHY ARE YOU USING 3.1 INSTEAD OF 4" -- I would like to point out that C# 2008, and .NET framework 3 is NOT my preferred environment, ...
1
vote
2answers
223 views

2D tilemap editor UI--how do I disable editing while save/load dialog is open?

I'm working on a basic 2D tilemap editor in C#/XNA. Currently, it displays the map through a picturebox through which XNA's output is being routed, and editing is accomplished through simply checking ...
2
votes
3answers
511 views

Minecraft like blocky-clouds

We are working on a minecraft-like block-based engine/lib. Lately I've started working a blocky-clouds as in minecraft; So it appers that in minecraft, clouds are not procedural. I'm still looking ...
2
votes
3answers
261 views

Complex Scaling

I've been trying to figure this thing out for weeks now, but with no luck.So, I am creating this program in WindowsForms and Xna, that allows users to create a 3D room. By draging and customizing ...
0
votes
1answer
152 views

Vector2's static methods and the garbage collector

I discovered that Vector2's static methods return a different Vector2 from the parameters you give them and I'm under the impression that creating new objects and dereferencing old ones on this kind ...
1
vote
1answer
850 views

XNA HLSL 2D outline shader

I have gotten into quite a bit of trouble getting my rendering correct in my tile based 2D game. This kind of shader is surprisingly annoying to write, I've heard (we used it in one of our 3D ...
5
votes
2answers
2k views

Entity Component System: Retrieving components quickly [duplicate]

Possible Duplicate: Retrieving components from game objects (entities) I'm working on an entity-component-system game at the moment. I've looked in particular at the Artemis framework and a ...
3
votes
2answers
962 views

How do I properly use particle simulation in Unity?

So I'm using Unity's simulate function to pre-render particles. It seems that simulate is not quite working as to what I expect. It's most likely a setting that I missed. But I just really cannot find ...
1
vote
2answers
868 views

Drawing with SpriteBatch and GraphicsDevice.DrawPrimitives

I've faced with a problem when i tried to draw 2d game with SpriteBatch and GraphicsDevice.DrawUserPrimitives. I suppose that what is drawing with SpriteBatch has higher priority, because i can not ...
1
vote
0answers
466 views

Unity - Mesh Deforms terribly while mixing animations

I have a simple game I'm working on to help me learn unity3d. In my Start() function, I've used the following code to set up my animations. walkAnimation = animation["Walk"]; ...
2
votes
1answer
395 views

High volume sprite management in entity component system

I'm working on an entity-component-system based 2.5d game. That is, entities are groups of components that are processed by systems. I am having a hard time seeing how a sprite rendering system, that ...
3
votes
1answer
701 views

Why would a borderless full-screen window stutter occasionally?

I want to be able to allow players to switch between full-screen, windowed, and full-screen-with-a-borderless-window rendering modes. The last mode, borderless is an important one lots of players, ...
0
votes
2answers
811 views

HLSL shader optimization [closed]

The following HLSL shader (without preprocessing) results in 65 arithmetic operations (see below). Can the same effect achieved with <=64 operations? // Center of "light" float x; float y; // ...
2
votes
2answers
1k views

Flip sprite vertically AND horizontally?

In Microsoft.Xna.Framework.Graphics.SpriteEffects there is the possibility to flip a texture horizontally or vertically before rendering. But can one do both at the same time? When I use: ...
6
votes
1answer
576 views

ObjectDisposedException when Texture2D isn't disposed

I'm making a particle engine so I develop a texture programatically and I want to display it in a Windows Form picture box. So I create the Texture2D which goes fine. Then I use this code to convert ...
4
votes
1answer
428 views

Sound effects in separate thread?

Does it make sense to carry out all audio (music, sound effects, etc.) in a separate thread? In your experience, how large would you expect the performance impact of playing some MP3 music and 10-30 ...
2
votes
1answer
351 views

Collision detection with XNA and TiledLib

I recently started learning XNA and after getting annoyed with creating individuals rectangles each time I wanted to add something I went with TiledLib so I could more easily create levels using the ...
0
votes
1answer
139 views

Separating Axis Theorem fails at certain angles

I'm currently attempting to add an overlap tester for an axis aligned and orientated bounding box but the solution only seems to work accurately when the OBB's angle is between -10 and +10. As the ...
-1
votes
1answer
635 views

How to run Minecraft from a different folder [closed]

My problem is that I can run minecraft from a different folder, but when I run it, it is still using .minecraft folder. It saves the worlds there and so on. How can I run it like "everything get from ...