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
77 views

Calculate needed speed and object's position in Unity3d

So i'm trying to calculate object's future position so my enemy can land to it safely. Idea is that using future postion I can calculate angle and convert it to direction vector and also using ...
1
vote
2answers
64 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) ...
0
votes
1answer
87 views

XNA C# 3D game Wall collision response glitch

I have been working on a reliable physics system in my code and so far it's ALMOST working. :D I am aiming for wall "sliding" style of collision response, like you'd expect it to work in commercial ...
1
vote
2answers
394 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 ...
0
votes
1answer
871 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
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
0answers
32 views

Game Development Books [duplicate]

I am looking to expand my C# knowledge and am looking into a fun, long term project to help expand my knowledge. I've been studying programming for about a year, but I would still consider myself a ...
-1
votes
1answer
109 views

C# XNA - How to animate using Texture Atlas/ Sprite Sheet

I have a problem which I need to resolve. I am making a Space Invaders game in C# XNA. I've been following this tutorial for the Invaders: ...
0
votes
1answer
253 views

Make GuiText responsive

I'm using C# code to make a responsive GuiText. I was abel to make a responsive GuiTexture, but I'm struggling with doing the same for a GuiText. Code for the responsive GuiTexture using ...
0
votes
1answer
64 views

Creating a Player object in a physics engine

I have a working physics environment using Farseer - but how do I create a player object that can walk around? My current attempt involves applying forces to a rectangular body whenever keys are ...
5
votes
3answers
2k views

How do C# and JavaScript differ in Unity development? [closed]

Other than the obvious language differences, how do JavaScript and C# differ when developing games in Unity3D? Is there a noticable performance difference? Is the JS code packaged as-is? If yes, ...
0
votes
1answer
66 views

GLSL: Vertex attribute to int

I'm trying to write a shader which renders a multitextured geometry wihout rerendering the geometry with each texture. In my test I'm not using textures, I just convert the texture index to a color ...
5
votes
2answers
523 views

XNA 3.1 to 4.0 Vertex Shader Not Drawing

I have recently been converting our XNA 3.1 game to XNA 4.0 and am stuck on the shaders. I have the game running, but nothing is drawing to the screen, except things not using a shader. This is only ...
1
vote
1answer
2k views

Best way to use Raknet from C#? [closed]

I am trying to learn Raknet with C# and I found it extremely confusing. The Raknet tutorial seems to work well in C++. I have already made the chat server from the tutorial. I am looking to do ...
0
votes
0answers
33 views

How do I apply Farseer Physics Engine Collision on my image? I tried it on my codes and it is not working

How do I apply Farseer Physics Engine Collision on my image? I tried it on my codes and it is not working. PoolGameSingle poolgame = new PoolGameSingle(); var cue = poolgame.CueStick; ...
0
votes
2answers
194 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
vote
1answer
86 views

How do I take Direct3D9 full screen using SlimDX?

I'm writing a Direct3D9 application wrapped by SlimDX. I'm trying to take my application full screen but I am having problems. I can reset the device so that it covers the entire screen, however, it ...
0
votes
1answer
73 views

Remove item after crafting

I'm having one last problem with my crafting system. Say an item takes 2 rocks, 1 twig, and 1 vine. When I craft the item, only 1 of each item is removed instead of the correct amount of items related ...
0
votes
1answer
72 views

OpenGL not rendering full scene, it is a mystery [closed]

I am trying to draw a scene in the sort of style of mock vector graphics. I've helped on a 2D game before with GLSL, but I tried to keep a simple approach to this project since I'm working by myself, ...
0
votes
1answer
217 views

Getting a pixel of Sprite at the cursor position in Unity

Summary: I've been trying to figure out a way to use simple box colliders as a nice and efficient "first pass" collider. For the "second pass", I want to check that the area clicked has an alpha value ...
0
votes
3answers
140 views

Do I need to learn any physics if I use a physics engine? [closed]

Complete novice out here. Of course I know basic physics like mass and inertia. I don't want to make an engine I just want to make a game and use a physics engine made by someone else. Do I need to ...
0
votes
0answers
55 views

How to overlay texture materials on top of each other in Unity 2D tiled game

I'm learning how to do a 2D tile-based game. So far, I have followed this tutorial which seems like a good starting point. With his method of building the raw triangles and then applying the uvs, I ...
0
votes
1answer
183 views

2D sprite 360 degrees rotation according to the mouse

I am trying to make my top down character rotate according to degrees between its position and the mouse. I'm using this code: float xDiff = mouseState.X - (graphics.PreferredBackBufferWidth / 2); ...
0
votes
1answer
73 views

How to rotate and move a model in the direction it is facing?

I am not using Unity or XNA. Eventually, I will probably use OpenTK for graphics. But for the concept of a game I'm writing, I am using the console for keyboard input and visual logging of events, ...
1
vote
1answer
85 views

How to draw a diagonal fade-in and fade-out?

How to draw a diagonal fade-in/fade-out in 2D using MonoGame draw API? For a simple (non-directional) fade-in/out drawing the background with alpha variation do the tricks, but what is the standard ...
7
votes
3answers
3k views

Loading sound in XNA without the Content Pipeline

I'm working on a "Game Maker"-type of application for Windows where the user imports his own assets to be used in the game. I need to be able to load this content at runtime on the engine side. ...
0
votes
2answers
91 views

How to Create a New Instance of a Game Object

Alright, please don't scald me here haha. I'm very new to XNA, C#, and game development as a whole. I have done web-design, but that is my main experience with programming. It is a Space Invaders ...
0
votes
3answers
106 views

OpenGL Texture Mapping distorts image

So, I'm just trying to draw a texture to two triangles that are the same size as the viewport, but it breaks up the image and distorts it. I have tried resizing the image file and everything, but ...
1
vote
1answer
207 views

Camera movement and threshold not working

I have a platformer that is in progress, part of this has a camera which I only want to move when the character moves out of a certain threshold, to try to accomplish this I have the following if ...
0
votes
1answer
129 views

OpenGL: I only see one square instead of a cube / giving information to vertex shader

I am new to OpenGL and tried to follow this tutorial. I use C# and OpenTK. So I translate the C++ Code from the Tutorial: My C#-Code: /* Hintergrundfarbe */ ...
0
votes
2answers
50 views

Issue implementing proper collision in XNA Game Studio 4.0

I am building a game in XNA 4.0, where a player moves about a 2 dimensional (vertical perspective) map consisting of blocks. My issue is creating proper collision between the payer and the blocks ...
0
votes
1answer
94 views

Tiling 2D textures in random order

I am wondering what the best way to make a random set of 2D textures. Currently I have tried the follow code but I am aware that when this comes to collisions that would be an issue. Therefore I would ...
0
votes
1answer
46 views

Loading Song in MonoGame Windows

I cannot load the song into my game. I got error in both templates WindowsDX and WindowsGL. Monogame Develop Build 1252 Both files .wma and .xnb are exist in Content folder and Build Actions are sets ...
0
votes
2answers
84 views

How to cleanly serialize/de serialize a Dictionary whose values are of a derived class using c# newtonsoft json [closed]

I am working on and entity component system and I am storing entities as a JSON file. Components are stored in an entity as a Dictionary of components. I am using newtonsoft's JSON library. After ...
1
vote
1answer
50 views

Yield and loading textures

I have a need to dynamically load textures from the player's filesystem. WWW provides the functionality I need, but I can't get the example code to compile. "yield www" causes my code to not compile. ...
5
votes
1answer
745 views

Should the networking of my game be a component or a service?

I am working on a windows game and I am trying to understand the XNA GameComponents and GameServices classes and use. From what I understand about a component is that it has an Update method that ...
-1
votes
0answers
38 views

Problem with shooting projectiles at mouse cursor [duplicate]

I'm shooting projectiles from one point to another, first point is near entity, another is mouse position. Problem is I can't make projectile to be shot directly at position where mouse is pointing, ...
0
votes
1answer
156 views

Multiple joysticks event handling

I want to make a game which is totally same idea as "Who pressed the button answers the question". I have 2 joysticks and both are connected to a pc. My application will be Winforms and I will ...
0
votes
0answers
69 views

Cards game - Save and reload state

I have developed a card game in c#. When the user left the application, I serialize into a XML file the state of the current game (current playing player, cards of each players, scores...). But, I ...
0
votes
1answer
278 views

Angled topdown perspective camera for 2.5d game

I have a 2d tile based game created using Unity's 2d tools and orthographic camera: The tiles are created by programmatically generating a mesh, assigning a texture to each pair of triangles, and ...
5
votes
2answers
2k views

How can I use XNA with Visual Studio Express 2013 for Windows?

http://dev.windowsphone.com/en-us/downloadsdk I downloaded the current version of Visual Studio to develop Windows Phone apps, but I don't know how to add XNA. I tried to install XNA, but it's not ...
0
votes
1answer
37 views

Using RPC's for movement of an object across a network [closed]

I've been building upon http://www.gamasutra.com/blogs/DarrelCusey/20130221/187128/Unity_Networking_Sample_Using_One_NetworkView.php At the moment when I spawn a sphere on the server it spawns on the ...
0
votes
1answer
59 views

Spawning a Sphere and trying to move it [closed]

I've been trying to build upon a blog post on Gamasutra http://www.gamasutra.com/blogs/DarrelCusey/20130221/187128/Unity_Networking_Sample_Using_One_NetworkView.php In this I would like to spawn a ...
1
vote
2answers
2k views

Create a body of an irregular 2D sprite in Farseer

I'm trying to create a body of a irregular 2D sprite Farseer 3.3.1. The regular shapes that BodyFactory provides are not that I want. Is there a way that one can create irregular objects? Could it be ...
-2
votes
1answer
411 views

Identify mouse click unity3d [closed]

I have a 3 fbx models. When i click on the first object it should displays its name of the gameobject in a label and clear the label when click on another object. How to display the name of the ...
0
votes
1answer
90 views

Collision detection doesn't register until player sprite jumps

I have implemented a shooting mechanic into my game, and the act of shooting works fine. The shooting work is done in my "game1" class. The issue that arises is when I incorporate collision detection ...
1
vote
1answer
96 views

Draw Primitives with Unity 2D

I would like to be able to draw primitives in unity 2d to define my game objects. I have tried the following example: using UnityEngine; using System.Collections; public class ExampleClass : ...
3
votes
2answers
142 views

Find a position within one radius, but outside other radii

I have an Object A which will attempt to stay within a certain distance of another Object B. I would like Object A to also try to stay outside a certain distance of one or more other Objects R. The ...
0
votes
0answers
14 views

Monogame. Xml files not included on deployment

We are making a XNA game and porting it with MonoGame. The game works fine on deployment, it finds without a hitch the xml files we need for the content. On publishing however, the files are never ...
3
votes
1answer
151 views

How do you make specific collisions in Unity?

So I have created a "game" where you are automatically running across platforms and you can jump and land on the top of them. I want to set it where if you collide with the the left and right side of ...