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

7
votes
0answers
110 views

Dual Contouring - Finding the feature point, normals off

I am following this tutorial to implement Dual Contouring http://www.sandboxie.com/misc/isosurf/isosurfaces.html My data source is a grid 16x16x16; I traverse this grid bottom to top, left to right, ...
6
votes
0answers
197 views

Entity component system - game progression

I'm quite new to game development (but not to programming) and I'm trying to figure out what would be the best way to handle inter-world communication. What I mean is this: I've been reading about ...
4
votes
0answers
129 views

AI using character controller makes unwanted change to it's y position

The enemy parent object does not have any colliders except for the character controller. It starts out with y = .57 and immediately jumps to y=1.6355 because of my call to CharacterController.Move(.) ...
4
votes
0answers
185 views

smoothly recenter view over time

I'm currently using the Google Cardboard SDK for Unity to build a fighter pilot simulator. What I'm currently trying to do is recenter the view(CardboardHead) smoothly over time when the user looks ...
3
votes
0answers
18 views

Automatic audio segmentation and find the most energetic segments

What algorithm can be used for audio segmentation? I want to divide song to segments and find the most energetic segments (begin and end in seconds). It is needed for the rhythm-game. Examples: ...
3
votes
0answers
63 views

How to await async operations / coroutines?

I'm looking for a generic / reusable way to wait for coroutines and asynchronous operations to finish in Unity 5, similiar to C#5's await keyword. The simplest way I can think of is something like ...
3
votes
0answers
52 views

(Monogame) Camera does not travel the way it is rotated

I've implemented camera control with mouse and keyboard. My problem is that camera goes crazy when I'm using mouse and camera does not travel the way it is rotated. Could you explain me why and how to ...
3
votes
0answers
3k views

XNA Screen Manager problem with transitions

I'm having issues using the game statemanagement example in the game I am developing. I have no issues with my first three screens transitioning between one another. I have a main menu screen, a ...
2
votes
0answers
121 views

Struggling with simple orthographic projection for a 2D setup

I'm trying to build a simple setup for 2D using SharpDX. Basically I want to supply my vertices in classic Cartesian coordinates: X-right, Y-up, starting with (0,0) in bottom-left corner. I've had ...
2
votes
0answers
120 views

Tower Defence stat storing system

I'm trying to find a smart way to store and retrieve stats for a tower defence game, but am currently unsure as to which approach would be best. Description: The stats system should quite basic, ...
2
votes
0answers
27 views

GL.Scissor not working as expected

I have some code for rendering a button in an application and I want to clip the text if it's wider than the button itself. Here a bit of code to describe what I'm doing: ...
2
votes
0answers
129 views

Building an Octree for terrain generation

I've previously implemented marching cubes/tetrahedra to render an IsoSurface. It worked (YouTube), but the performance was dire as I never got around to implementing LoD (or even removing distant ...
2
votes
0answers
77 views

Unity: Create a custom editor for Vector2

I'm starting to dig into Unity's editor customization. What I'm looking for is a way to create custom line (or a point at least) which I could move around in SceneView and set a Vector2 value that ...
2
votes
0answers
172 views

In Unity, how do I make a 3D flight arc preview?

I'm stuck on how to make a preview trajectory for a projectile appear when holding a button. The trajectory should start at a certain position on the scene and end wherever the player points their ...
2
votes
0answers
37 views

Why does interactive cloth not appear in game view in unity5 Pro?

I used interactive cloth fir flags in unity5 Pro version and it appears in scene view but does not appear in game view while playing. What can I do for that please somebody help me out?
2
votes
0answers
205 views

How do I make volumetric grass?

I've been extremely interested in volumetric technology, especially for grass. Online resources are extremely scarce on this topic. What is the difference from creating a lot of mesh billboards? ...
2
votes
0answers
195 views

Improving effect performance in XNA

I'm making a 2D, top-down platformer, in which four or five layers are rendered each time the game draws. Everything is fairly performant except for the bottom layer, which is the game map. This is ...
2
votes
0answers
47 views

Xna 4 Model Rotation with inertia not working as expected with variable updates

I am trying to rotate a model with inertia damping with the keyboard. The code works great with a fixed time step but it doesn't behave the same with a variable update frequency. Update method: ...
2
votes
0answers
559 views

XNA 4.0 Pixel Shader 3.0 Exact Texture Lookup/Sample Issue

I am stuck on trying to solve this problem. I originally had some shaders written that worked for XNA 3.1, but after converting to XNA 4.0 they would no longer compile due to instruction counts, flow ...
2
votes
0answers
296 views

Chunk Texture3D GPU generated vertices

I read GPU Gems 3 from NVidia about procedural terrain. It's quite interesting but not applicable for me because I only read the online version without the shipped DVD so I'm not able to download the ...
2
votes
0answers
439 views

Call Unity3D coroutines from a scripting language

I created a simple scripting language to use on a Unity3D game. My parser generates an AST with nodes for every type of operation, and to run the script all I need to do is call Execute() on the root ...
2
votes
0answers
228 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 ...
1
vote
0answers
72 views

How to make the Steam overlay work with WPF?

I have developed a game using C#+WPF and the game is currently on Steam (private branch until release). However Steam's overlay isn't working with WPF. Sometimes it tries to appear in the popups of ...
1
vote
0answers
45 views

Connecting to external computer with lidgren

I'm new to networking and thought i'd muck around a bit with lidgren before i start implementing it in my games, so i made a little client/server chat program that works fine on localhost and lan. I ...
1
vote
0answers
33 views

How to draw SharpDX 2D Bitmap Outline

i want drawing bitmap outline Now Drawing Device.DrawBitmap(mBitmap, GetBound(), Opacity, d2.BitmapInterpolationMode.Linear); // mBitmap as SharpDX.Direct2D1.Bitmap // GetBound() as Bitmap Bound ...
1
vote
0answers
45 views

How can I change the list of enum options displayed in the inspector?

I have an array of enums: using UnityEngine; public class EnumsInInspector : MonoBehaviour { [SerializeField] public EnumType[] myEnums = new EnumType[3]; public enum EnumType { ...
1
vote
0answers
93 views

Turning On/Off Vsync no longer working when rendering to an offscreen buffer

I have this reaallly strange issue that as soon as I render to an offscreen framebuffer I am no longer able to toggle VSync while my application is running. I am using OpenTK as the opengl wrapper, ...
1
vote
0answers
29 views

Translate D3DXMatrixLookAtLH to Unity compatible code

I am currently trying to port a really old Game (I have the source of it) to Unity as a fun project. And I'm currently stuck with the object rotation techniques in Unity compared to the ones used in ...
1
vote
0answers
38 views

Map generation, issues with midpoint displacement algorithm

I'm trying to generate an endless 2d terrain. So the terrain isn't random per say as the random function I'm using is a hash based on an X,Y coordinate. static public float rand (System.UInt32 x, ...
1
vote
0answers
40 views

Farseer Engine Texture To Polygon Center of mass bug

I am new to Farseer Engine used with MonoGame so I decided to do some test with the API to see the results and learn. If I understand, in Farseer the Position property of a Body object is located at ...
1
vote
0answers
86 views

Unexpected behaviour after adding animator and Unity editor crash

I have realy strange problem which accured after adding animator(I suppose) to prefab Object. Situations looks like follow: I had object which have only sprite renderer, collider2D and script ...
1
vote
0answers
168 views

Procedural Islands Voronoi Pattern

I'm trying to keep this as simple as possible, as I've found out the last few days this is a very difficult topic. I'd like to generate multiple flat islands, formed by a voronoi diagram. I've ...
1
vote
0answers
52 views

SignalR Monogame Lag

I'm creating a C# multiplayer game in Monogame using SignalR to update the enemy players positions. This is my proxy.invoke: proxy.Invoke("UpdateEnemy", LocalShip.Position, ...
1
vote
0answers
34 views

Background replacement with 3D moving objects using Intel RealSense SDK

I have done background replacement with static image and video using RealSense and c#, but now the requirement is to replace the background with the 3D moving object in still background. Is it ...
1
vote
0answers
187 views

How to use OpenTK (OpenGL) with MonoGame?

So I've been making a snake game using MonoGame (DirectX Only). I added movement, controls, feeding and growing in length. I wanted to add smooth animations to the game because the snake is just made ...
1
vote
0answers
144 views

Dual Contouring - what is it and how to use it?

I'm having trouble understanding Dual Contouring yet and I need some explanations from someone who has first hand experience. I searched all I could before writing this question. I've already read: ...
1
vote
0answers
267 views

Standard Assets Cross platform joystick sensitivity

I am using the standard asset joystick that comes with Unity 5, the sensitivity changes depending on the device used, for example on an Samsung S3 it is more sensitive than on a Nexus 7 2013, how can ...
1
vote
0answers
70 views

Scale texture at runtime in unity

I need to scale the texture in unity3d.In unity we are able to adjust the scale using the option in the toolbar How will I scale the texture at runtime using the mouse pointer. the texture should ...
1
vote
0answers
73 views

Screenshot preview freezes a game for a few seconds

I have a screenshot preview at the end of the level, but when I show it my game freezes for a bit(low fps for a few seconds). This is code I use to load screenshot and crop it(for a little preview ...
1
vote
0answers
82 views

How should I store battle effects?

I have battle effects that can be anywhere from 50-150 frames (running at 60fps). I need to be able to draw each frame of the battle effect as an additive layer onto my game. A frame could look ...
1
vote
0answers
53 views

How I can get the time, where I am in a map for osu?

How I can get the time, where I am in a map for osu??? I need an osu!api solution, and I want to get this value: 0:05.12 or something like this.
1
vote
0answers
94 views

Drawing objects in view of camera only in XNA/MonoGame

I am working on a Tower defense style game on mobile that uses a tile map and I am trying to determine the best way to draw overlays of those tiles. In my game, I go into build mode to build towers. ...
1
vote
0answers
47 views

How to create offsetting lines that draw across the screen in Monogame?

I'm trying to create an effect on the screen like the gif below. Basically lines that are offset by 1 pixel draw across the screen from either side which then eventually creates a solid color. I'm ...
1
vote
0answers
142 views

Cant load model from Content in latest Monogame version

Using MonoGame 3.4, I'm trying to display a simple textured basketball. Within the Game1 class, I've created Model mModel. My Initialize function contains all the proper Matrix information. When I ...
1
vote
0answers
80 views

Chartboost Adds are not showing up in android

I am testing chartboost example but no adds are being shown up. I have added app ID and signature. and Even test mode is enabled still its not showing up. I am using chartboost SDK Provided by ...
1
vote
0answers
71 views

XNA Collision In An Entity Part System

I've hit a loss in creating a "game engine" in XNA, I'm extremely confused over how to approach collision in an Entity-Part System ( following this as a reference ). I can make all the entities with a ...
1
vote
0answers
76 views

How to make dynamic DOF from mouse position in Unity 5?

I found a video a while ago for how to make a dynamic DOF in unity. It fires rays from the camera and positions an empty at the location that the ray first hit. How can I change this so that it ...
1
vote
0answers
73 views

How to make lens flare ignore layers work with first person character in Unity 5?

I have a simple lens flare on my directional light (sun) and I would like the flare to only be visible when the sun is directly visible, naturally...But right now with the default ignore layers, the ...
1
vote
0answers
61 views

Open Borders in Fluid / Smoke Simulation

I am trying to adopt a fluid / smoke simulation based of the source files of this video to my needs but came across a few problems when trying to make it open at the borders (flows into the void). ...
1
vote
0answers
41 views

Detecting the two Vector3 that determine the bottom-edge of the side of a box-collider that had collision (with C#)

So, I understand that plenty of questions have been posted on how to detect which side of a Box Collider had collision. However, what I am trying to achieve is a little different. I want to find out, ...