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

1
vote
2answers
72 views

Vertex Skinning Looks Messy on Real Android Device using Monodroid

I have no problem doing the "vertex skinning" for three-dimensional animation. All goes well when using the emulator (and genymotion). However, when run on a real device (such as Samsung and Lenovo) ...
1
vote
2answers
137 views

control animation using animator control class

I did a sample existing code to control animation using animation.I dragged and dropped a character into the scene then I added a Animator to it and added the animator controller.Below I have given ...
1
vote
2answers
422 views

Sprite collision with color?

Is this possible? To elaborate, I am making a PacMan offshoot. Essentially it is a "zoomed in" version of the game, but the board is randomly generated. I have 11 .png files each to be used as a ...
1
vote
2answers
1k views

Octrees as data structure

In my cube world, I want to use octrees to represent my chunks of 20x20x20 cubes for frustum and occlusion culling. I understand how octrees work, I just dont know if I'm going about this the right ...
0
votes
2answers
103 views

animation control problem

I have a list of .FBX object.When I drag that .FBX into scene its corresponding inspector Animation component(fig 1) appears but when I drag some other .FBX object into the scene the Animator ...
0
votes
2answers
340 views

Set new forward directions based on camera position

I have a 3rd person camera which can rotate around the player. When I look at the back of the player and press forward, player goes forward. Then I rotate 360 around the player and "forward ...
0
votes
2answers
302 views

Play animation when click on each player with in maincamera unity3d

I have 3 gameobjects (player1, player2, player3). I attached a script "playerscript" to these game objects. In the main camera, I have added another script called "testscript". Clicking on a player ...
-1
votes
2answers
127 views

how would I go on about making a movement system like mario party

main question how would i go about getting a movement system similar to the one they have on mario party only minus the dice roll things i have researched so I have been studying the uses for ...
-1
votes
2answers
242 views

How to translate along Z axis in OpenTK

I am playing around with an OpenGL sample application I downloaded for Xamarin-Android. The sample application produces a rotating colored cube I would simply like to edit it so that the rotating cube ...
0
votes
1answer
214 views

When should I set a texture as a shader resource in order to read it?

I'm writing a Direct3D 11 HLSL shader with SharpDX. What I want to do is write the depth to a texture in one pass and read it in the next one. After declaring the texture, do I have to set the depth ...
0
votes
1answer
915 views

How to make custom shaped holes in terrain

So I'm trying to create a game where you fit certain shaped objects into the hole that fits them (similar to the young children's game with different shaped blocks) in Unity 3D. I've encountered a ...
-1
votes
1answer
30 views

Sound plays several times upon collision

Upon collision, my sound effect plays several times. How can I fix this? public Sprite charAlive, charDead; public AudioClip popAudio; void OnCollisionEnter2D (Collision2D col ){ if ...
-1
votes
1answer
95 views

C# - How to properly play background songs in XNA

So I'm using the game states (enum) to change my game screens. I have 2 songs for main menu and game playing states, respectively. To play songs, I'm using an old code example I saw at MSDN, like ...
-1
votes
1answer
212 views

Projectile motion based off angle

I was using this code to hit an object that is moving horizontally(from right to left) and player on the left is throwing bullets to hit the object.But, what I am finding difficult is projectile ...
-1
votes
1answer
62 views

How do I check in which region of a map an object is located?

For example I have a character and two areas A and B, I want to test which area, A or B, my character is on.
-1
votes
1answer
144 views

Why are the coordinates interchanged in Monogame?

If I use XNA Gamestudio, I can draw a sprite on a specific position like this: spriteBatch.Draw(Texture2D, new Vector2(PositionX, PositionY), Color.White); But in Monogame, I must change the ...
-1
votes
1answer
134 views

Show message to one player issue in multi-player game

I Needed to show message to only one person of the multi player game,i am using smartfoxserver to developed a board based game and in this game how to differentiate 2 players in unity c#,and also how ...
-1
votes
1answer
942 views

Xna tile map collision

I finally found a tutorial on tile maps and loading them in from a file that I understand (http://circlessuck.blogspot.co.uk/2012/09/xna-tutorial-basic-tile-engine-part-2.html), however the tutorial ...
-1
votes
1answer
276 views

3d Wall sliding collision

I'm working on collision for walls in my game and the way I currently have it I get stuck walking into a wall. I'm trying to make my character slide on the walls but still collide. My character moves ...
-1
votes
1answer
196 views

Recommended aspect ratio for android / smartphones?

I'm making a game for android and would do it in 720p, but the phones got all different aspect ratios. Also thinking about a ios and windows phone port later. When the aspect ratio does not match, ...
-1
votes
1answer
81 views

Setting texture in effect pass

I created different types of cubes for my cube class and based on the height of the cube, the cube type is different. This means changing the texture for the cube. if (y >= 1) ...
-1
votes
1answer
137 views

SpriteBatch memory leak

I have a strange problem with XNA 4. I'm constructing a SpriteBatch using this.spriteBatch = new SpriteBatch( GraphicsDevice );. This leads to a memory leak up to 600 MB memory consumption. This ...
-1
votes
1answer
144 views

Why is my model flickering when translating

I have several models here. When they stand still during gameTime, there's no flickering. But as soon as I move them across the x-axis, they flicker on some places. protected override void ...
-1
votes
1answer
399 views

Server Based High Scores

I'm currently using the following MySQL example to make a server side high score table: Unity Server Side high score The above example allows me to create a top 5 player high score table that sorts ...
-2
votes
1answer
71 views

Not able to destroy the prefab

In the code, everything is working smoothly, only problem I am facing is that the Destroy(fuelprefabInstance) is not getting Destroyed in OnTriggerEnter Method though the print statements are clearly ...
-2
votes
1answer
241 views

Programmatically creating a 3d mesh in XNA

Surprise! Another question related to Minecraft. Anyways: Rather than drawing thousands of blocks each frame, I remember reading somewhere that Minecraft breaks the map into 16x16x256 chunks, and ...
-3
votes
1answer
119 views

I need to make a create-a-class system like in COD

I need to make a create-a-class system like in COD but I don't know what code I need. I am also wondering if I have to make a photoshop image for every way it could look or do I type in the code to ...
-4
votes
1answer
210 views

How Do Game Timers Work?

I don't understand the whole game timer things, I know XNA comes with one but im realying on VSync to do the work rather then a game timer. I know what they are It's just can someone show me of a ...
-5
votes
1answer
552 views

How do I make the Cylinder in the model?

I have a class which will draw cylinders with deformer's index in the FBX file. The deformer which was in the 3ds max's biped. ex: If I have 22 bones in the deformer's structure, I will draw 22 ...