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
259 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 &...
-3
votes
2answers
1k views

Game Development using C#.Net [closed]

I'm a ASP as well as C#.Net Developer. I love playing Games and willing to Create one. I'm a new bi in this Arena. So can you Help me on How to Create a Game using C#.Net?? Or is there any course ...
0
votes
1answer
123 views

how to create texture for modelmesh?

Is there a possibiltiy to create a texture from a meshpart in xna. By getting a flat version of the mesh. So I can create a texture for it and edit that texture(via rendertarget)? I need to get the ...
-2
votes
2answers
723 views

Game development using C# or .Net technology [closed]

I am new to .Net and C# and I am interested in game development . I just studied about Mono-andriod and mono-iOS but they are not free to use . I also read about XNA and I think its free to use . So ...
4
votes
2answers
509 views

Calculating the correct particle angle in an outwards explosion

I'm creating a simple particle explosion but am stuck in finding the correct angle to rotate my particle. The effect I'm going for is similar to this: Where each particle is going outwards from the ...
1
vote
1answer
576 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 ...
2
votes
3answers
905 views

Randomly placing items script not working - sometimes items spawn in walls, sometimes items spawn in weird locations

EDIT: I changed some code after getting advice from colleagues. However it still has problems occasionally, though the problems aren't as bad or frequent. Here's the new code I'm actually using: ` ...
-6
votes
1answer
820 views

World of Warcraft like C++/C# server (highload) [closed]

I know it is very big topic and maybe my question is very beaten, but I'm interesting of basics how to write highload server for UDP/TCP client-server communications in MMO-like game on C++/C#? I mean ...
5
votes
1answer
506 views

Can't load vector font in Nuclex Framework

I've been trying to get this to work for the last 2 hours and I'm not getting what I'm doing wrong... I've added Nuclex.TrueTypeImporter to my references in my content and I've added Nuclex.Fonts &...
7
votes
1answer
998 views

Farseer Physics: Ways to create a Body?

I want to create something similar to this using farsser and Kinect: https://vimeo.com/33500649 This is my implementation until now: http://www.youtube.com/watch?v=GlIvJRhco4U I have the outline ...
10
votes
6answers
22k views

Visual Studio 2012 and Game Development [closed]

Alright, I think it's a simple question, but I got difficulties to find some answers around. I already read that XNA wouldn't be in Visual Studio 2012. I recently learned to use XNA, but since I ...
5
votes
2answers
3k views

Create a Texture2D from larger image

I am having trouble with the basic logic of this solution: Xna: Splitting one large texture into an array of smaller textures in respect to my specific problem (specifically, I'm looking at the second ...
3
votes
2answers
653 views

Animate on tap in XNA (Windows Phone)

I'm trying to convert a AS3 game to C# / XNA and I'm looking for a way to animate a sprite. More precisely, I want the sprite to rotate and scale a bit, then return to its starting position. In AS3 ...
5
votes
1answer
336 views

C++ unmanaged inside winform

First: I am using C# and C++ on windows 7. I have created a basic rendering engine in c++ with directx 10. It works good as a stand alone application. But, when I sending the Form.Handle of a WinForm ...
1
vote
1answer
4k views

Converting world space coordinate to screen space coordinate and getting incorrect range of values

I'm attempting to convert from world space coordinates to screen space coordinates. I have the following code to transform my object position Vector3 screenSpacePoint = Vector3.Transform(object....
1
vote
1answer
235 views

Fitting a rectangle into screen with XNA

I am drawing a rectangle with primitives in XNA. The width is: width = GraphicsDevice.Viewport.Width and the height is height = GraphicsDevice.Viewport.Height I am trying to fit this rectangle ...
-1
votes
1answer
982 views

Breakout… Getting the ball reflection X angle when htitting paddle / bricks [duplicate]

Im currently creating a breakout clone for my first ever C# / XNA game. Currently Ive had little trouble creating the paddle object, ball object, and all the bricks. The issue im currently having is ...
-2
votes
2answers
412 views

Inputting cheat codes - hidden keyboard input

Okay, here's what I want to do - when the player is at the main menu, I want them to be able to type in cheat codes. That's the only place I want it to work. I don't want to give them a text box to ...
1
vote
1answer
1k views

Enter text in XNA?

I'm looking for some help how to add text in XNA? I'm doing a game where I want the player to enter his or her name in the beginning. Is ther a simple way to do this? Help is preciated! Thanks!
3
votes
1answer
925 views

First-Time GLSL Shadow Mapping Problems [closed]

I'm working on building out a 2.5D engine and having massive problems getting my shadows working. I'm at a point where I'm VERY close. So, let's see a picture to see what I have: As you can see ...
0
votes
0answers
179 views

XNA C# Phun-Style Window Movement Effects

Ok, so I'm making a game in XNA similar to Uplink (computer hacking) and I have a lot of ingame panels that display information, such as mission details, emails, passwords, and so on. To add to the ...
2
votes
1answer
217 views

Should I take line thickness into consideration for a grid based light game?

I'm currently rewriting some horrific code I wrote for a prototype and have stumbled right at the start! The game I'm working on revolves around directing light and there is a small ambiguity in ...
7
votes
2answers
9k views

Where to attach global scripts in Unity?

As far as Iknow in Unity, every script must be attached to an object. But what is the case with global scripts? For example in a tetris-like game to which object should I attach the element spawner ...
2
votes
1answer
173 views

Multiple images written and read from one meta-file?

Short version: I need a way to store multiple image files in one bigger file, to be used using C#, preferably easily compatible with XNA. The files will be read, written to, but also adaitional files ...
1
vote
1answer
148 views

XNA Content Loading works on my machine but not others [closed]

I'm using XNAWinForm series 2 from App Hub for some task that needs 3d rendering. It works fine on my PC, but I have problems in running this code on other machines. I installed XNA framework ...
1
vote
1answer
4k views

Should I use XNA or Unity to build a video game? [closed]

My friend and I are planning to make a video game (like Slender) where the character is stuck in a building, when lightning strikes, and the lights go out and your objective is to find the back-up ...
1
vote
1answer
424 views

Highlight edge on 3d cube in directx

I want to make a 3d editor in DX9/XNA for a project I'm working on. I'm just thinking through how I would go about certain tasks and I'm stuck on one particular thing, which is crucial to making the ...
0
votes
1answer
149 views

Cannot build project for Xbox, using XNA

I'm trying to build a project for Xbox, and when I try to Package as an XNA Creator's Club Game I receive the following errors: The best overloaded method match for 'Pong.MessageBoxScreen....
2
votes
2answers
703 views

Transforming bounding spheres

When testing bounding spheres as part of the collision detection process, I'm using this method: public static BoundingSphere TransformBoundingSphere(Matrix m, BoundingSphere b) { var ...
1
vote
1answer
593 views

XNA Multisampling only for 3D

I am working on a game which consists of 3D elements and a 2D GUI. I have it working properly, but I want to enable multisampling for only the 3D parts, and not the 2D Textures. Otherwise, the GUI ...
6
votes
3answers
1k views

XNA shader compiler error in release mode

I'm having a hard time figuring out if I'm doing something wrong, or if there is a bug with Visual Studio. I want to pass a float into my pixel shader, clamp it to a value, and then return it as part ...
-1
votes
3answers
4k views

Trying to generate some unique numbers [closed]

I find impossible to get this code to work! I want to generate 10 numbers that are unique, but despite all I change, I get duplictates of numbers in the array! Would really preciate some help to solve ...
1
vote
2answers
861 views

XNA How to detect collision between 2d sprites and 3d primitives (not models)

My current status I have already read some tutorials about 3d collision. I know how ray trace works and how to convert mouse follow a vector to track the closest object that collides with out vector ...
5
votes
3answers
752 views

How should I handle collectable/droppable/stackable items in an inventory?

I am working on a game with an inventory system, but am trying to figure out the best way of doing it. I have read the post about adding WorldItems or InventoryItems to a list, which is fair enough ...
4
votes
2answers
409 views

Strongly Typed Skills

I am working on a skill system for use in a game project I'm chipping away at. The project is entirely in C# so I'm using .NET to its advantage. In my preliminary implementation of a Skill Category ->...
1
vote
2answers
1k views

Random position of object in foreach loop

i need help with some "scary" thing. I'm creating some objects in foreach loop. Each object has implemented in Update function random change of position. But while i'm creating this objects in foreach ...
3
votes
1answer
2k views

C# XNA Is key toggled?

I've got a question about toggling keys. How do You check if the key is toggled? Here's my quick and easy code: public class KeyToggle { private bool isEnabled = false; ...
5
votes
3answers
3k views

Handling movement in an Entity Component System

I'm working on a 2d RPG game in C# using an Entity-Component-System architecture, and I'm currently working on movement. Right now, I'm wondering how to organise the code so it looks a bit more.. ...
3
votes
3answers
524 views

Tile based platformer, using larger tiles?

So for my tile based platformer, It has a grid of tiles Occupying 1x1 block for each one. However, What if I want larger tiles? Maybe doors, tables, etc. They wouldnt fit in a 1x1 tile, so what I ...
1
vote
3answers
727 views

Smallest increment for a SpriteBatch depth between 0.0 and 1.0?

I experienced some problems with SpriteBatch in XNA when I tried to mix two different SpriteSort modes. (Begin with deferred, end, begin with BackToFront wasn't sorting properly.) I've settled on just ...
1
vote
2answers
282 views

Client/Server Object updates seems to run at different speeds

i have been playing around with the NetworkPrediction sample from Microsoft. Trying to adapt it to use gameTime. The client is running without fixed TimeStep and the server is custom C# and updates a ...
2
votes
1answer
319 views

MonoGame: prevent command prompt in windows?

Is there a way to prevent the command prompt from opening in windows when launching the game (via double clicking)?
1
vote
2answers
693 views

PreferredBackBufferWidth/Height from GraphicsDeviceManager not working?

It works fine in other "projects" so it has something to do with project. The project im talking about here has tons of classes but nothing with graphicsdevicemanager other than game1.cs game1.cs ...
2
votes
2answers
546 views

Organize game classes C# XNA

I've just begun working on my game and I don't know how to organize my game in separate classes, because I need some variables/methods to be available to every class. I have a screen manager class and ...
0
votes
1answer
189 views

Getting width and height of view of game

well I have googled it and got some answers, asked many times, answered many times. as I read viewport is the "inside window" So I have 2 integers, height and width and this code: ...
2
votes
2answers
242 views

Child parent rendering (flash) in XNA

i am currently in the process of implementing a render engine that works like flash's. Where a sprite is drawn inside another sprite and reflects all transformation (rotation, scale, etc) on the ...
3
votes
3answers
1k views

Textureing subdivided Icosahedron in XNA, seam problem

*Look below for the updated source code* I have started to to make some different types of objects and create them by code in XNA. Right now I have finished the code for creating a Icosahedron. And ...
0
votes
2answers
149 views

X and Y value to Vector2

In the first code I get a Vector2 random position and create an object with that, but in the second code I want to use the same constructor to create an object, but I want to pass a X and Y value to ...
0
votes
2answers
239 views

Implementing a multishot powerup for a top down shooter

I have a top down shooter wherein I generate a projectile on each mouse click at the player's position and translate it in a straight line until it reaches the edge of the screen. I also have ...
3
votes
1answer
192 views

Overlapping vertices on sphere?

Iv started up doing some programming in XNA as Iv been doing C# for several years and would like to start do some 3D work with C# and XNA framework. Right now Im trying to build a sphere by code. It ...