C# is a multiparadigm, managed, garbage-collected, object-oriented programming language created by Microsoft in conjunction with the .NET platform.
2
votes
2answers
93 views
Moving character on x axis
I am new to unity scripting.
I am trying to move my character towards right side(on x-axis) to create a running effect, I've imported the character from blender which contains two animations, "jump" ...
0
votes
0answers
90 views
Xna problem drawing tIDE map
So i was trying to add tIDE to my project but i hit a Keyntfoundexception
map.Draw(mapDisplayDevice, viewport);
Any help would be usefull here is the rest of the class:
using System;
using ...
-1
votes
1answer
109 views
Two characters controlled by one set of controls? [closed]
I am using Unity 3D to make a multiplayer game using the Photon Network package in the asset store.
I have initiated two characters controlled by a Mecanim script, and they both have animations. ...
1
vote
0answers
108 views
How to achieve supersampling / anti-aliasing in pixel shaders?
I am trying to write a couple pixel shaders to apply to images similar to Photoshop effects. For example this effect: ...
0
votes
2answers
545 views
XNA Health Bar continually decreasing
As per the Health bar tutorial on ... http://www.xnadevelopment.com/tutorials/notsohealthy/NotSoHealthy.shtml
I have set up the above, how do I make it decrease by 1 health per second?
I want to ...
-2
votes
1answer
124 views
Texturing using PBO in OpenTK (OpenGL) [closed]
I'm learning OpenTK (OpenGL) and am trying to generate texture using PBO in OpenTK. However,
my code does not work. I have read lots of examples and tutorials online:
for example Map and fill texture ...
0
votes
0answers
239 views
Accessing Bluetooth data via SerialPort (Unity/C#)
So I'm working in Unity3D, programming in C#, and I heard that one can read data from a Bluetooth adaptor via SerialPort. I have several Bluetooth USB adaptors that I've tried to connect on my PC ...
2
votes
3answers
207 views
How should I calculate the new angle/direction of my ball hitting a wall? [duplicate]
I'm building a Pong game and I am stuck at how the ball should bounce when hitting a horizontal wall.
I tried a few methods but none seems to work.
So far I have an update method, which is called ...
1
vote
1answer
110 views
Spawning enemies at way points [closed]
I'm trying to have my game spawn enemies when ever the player reaches a way point.
Right now, I have this functionality working. When my player gets to the first way, the enemies spawn. He only moves ...
0
votes
2answers
688 views
Rotate object Up/Down/Left/Right in any orientation
I'm rendering model at the origin with a fixed camera looking at it positioned on the z axis.
I want to be able to rotate the model up/down and left/right. Currently I have 2 variables, ...
2
votes
1answer
595 views
Sprite Animation in XAML/C# for Windows 8 Modern UI (Metro)
I'm working on a project that requires doing sprite based animation in XAML / C# for a windows store app. I've worked out a method for displaying the animation, but it causes flickering during the ...
3
votes
2answers
305 views
How does Unity use C# as a scripting language?
To my knowledge, thus far, I have thought that C# is and has always been a compiled language. I have recently started studying Unity3d and noticed that they give C# as an option for scripting and ...
3
votes
3answers
193 views
Getting correct angles between Vector3s
I'm working on a project where you can draw lines between points. You select one point and drag the mouse onto another point and a line is drawn between them.
The line itself is a 3d object which is ...
10
votes
6answers
11k views
How to handle mouse input in XNA?
I am developing a card game in XNA.
Is there any OnClick event in XNA for objects?
I am trying to make cards move when the player clicks on them. In this project, there is a Sprite class that draws ...
-2
votes
1answer
110 views
Does this UV mapping method look ok? [closed]
i'm having a spot of trouble trying to get my voxels textures in the right place.
I am using a very simple mechanism that assumes all sides of any given block are always individually specified (i'll ...
0
votes
0answers
38 views
Fixture position
I want to apply force in center of specific fixture (engine of ship build from more fixtures), but I can't find any position property.
I looked at samples and I found this:
World.QueryAABB(fixture ...
6
votes
2answers
9k views
How do i create bounding boxes with XNA 4.0?
I am having some trouble making bounding boxes for my models I am using within XNA 4.0. The way it was done in XNA 3.1 seems to be obsolete as you can no longer access parameters that were used before ...
4
votes
0answers
86 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 ...
0
votes
1answer
144 views
Is a HashTable the best way to store replay data in C#?
I'm looking to make a deterministic replay in my 2D game. I want to follow a similar approach to braid in storing the relevant information every frame (at 60 frames per second).
I wanted to know what ...
0
votes
1answer
54 views
A view and projection matrix oddity?
I have a bit of a dilemma ...
So i setup my scene how I want it with some bits in it and now I want to move all my camera related code in to a camera class however doing so is proving to be a pain in ...
-1
votes
1answer
187 views
I want to start making 2D Games with C++ or #C [closed]
I know C++ pretty well, I think - polymorphism, vectors, templates, and more.
I also know C#.
I want to program a 2D game, but not like those programs where you click a button or two, and you ...
4
votes
2answers
180 views
Mixing threads and coroutines in Unity3D Mobile
I had a coroutine in Unity3D that downloaded a zip from a server, extracted it to the persistent data path, and loaded its contents into memory. The flow looked something like this:
IEnumerator ...
1
vote
2answers
95 views
Model too small in Orthographic view
This must be super-basic, but I don't know where the problem is, since I just started with 3D-Programming.
Why is my model "ballTest" so small on the screen?
private Model _model;
private Matrix ...
3
votes
1answer
122 views
Rotate object to always face camera
I'm trying to make a TextMesh appear when ever an enemy prefab is hit.
I currently have this functionality working. However, the text doesn't face the direction the players camera is looking.
At the ...
1
vote
0answers
54 views
Mixing animations
I'm working on a swing animation and mixing it with a turn animation in a motorcycle game.
The issue is that for the swing animation to work while turning only the swinging arm has to animation, ...
-2
votes
1answer
121 views
how to add fog to a model instantiated in Xna? [closed]
I work on a small XNA games.
I generate a large map type voxel. a floor of 1000 cubic long by 1000 cubes wide.
This is why I use the method "MODEL instancing" with hardware instancing to generate a ...
0
votes
1answer
109 views
Quit the application when clicking cancel button of Alert View in C#
Can someone guide me as to how can I make an application quit when you press the cancel button of an Alert View in C# code?
Thanks
I forgot to add that I am trying to quit application on clicking ...
0
votes
0answers
487 views
SharpDX Tutorial [closed]
I'm looking for some tutorials using SharpDX ( especially Direct3D 9 ).
Was looking at the samples and googled yet.
And there still some questions about it.
To example how to set up camera, there's no ...
2
votes
1answer
55 views
Accessing other classes from a Box2D (farseer) body
I'm using Farseer for physics in a game, and have several key classes: Planet and PlanetProp. Each planet has a large circular body and a "field". This field is a large sensor around the body. ...
2
votes
3answers
1k views
Building an XNA Game Engine: Loading Sprites outside of LoadContent()
I'd like to build an engine in XNA, primarily for a 2D RPG. At first, I began abstracting out some classes and built a Sprite class which wrapped a Vector2 and a Texture2D, and tried loading in ...
2
votes
1answer
297 views
How can I create a 2D camera with upscaling and translation?
I've computed a Viewport that is fair in size (a proper aspect ratio to the given device) and then I calculate my ScaleMatrix like so:
scaleMatrix = Matrix.CreateScale(
(float) ...
-2
votes
1answer
159 views
Moving A Sprite In The Direction Its Facing XNA [duplicate]
There are many questions on this site that explain this except they seem to all be in Java.
I want to move a sprite in the direction it's facing, in XNA. I know you must use Radians and lots of ...
1
vote
0answers
216 views
XNA - How to move skinned model and merge animations
After you helped me to resolve my loadContent problem I've wrote some code and made 3D model with animation. Because XNA 4.0 doesn't support .fbx with multiple animations I've generated 3 models with ...
0
votes
0answers
60 views
problems with C# Port of Recast Detour Navigation Mesh for XNA, A* Pathing [closed]
Update 10/03
Ok, so i figured out the problem. C# is a funny old language..I changed
int navMeshCount = navMesh.GetPath(ref start, ref end, routePolys, navMeshRoute, false);
to
var ...
3
votes
2answers
184 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 ...
14
votes
1answer
4k views
Orienting a model to face a target
I have two objects (target and player), both have Position (Vector3) and Rotation (Quaternion). I want the target to rotate and be facing right at the player. The target, when it shoots something ...
4
votes
3answers
392 views
Loading levels in XNA from XML
I'm trying to load levels in XNA from XML files.
I have currently got a system to do this working, but it looks like it might get horribly complex as I add more objects later on.
My world currently ...
15
votes
0answers
479 views
Atmospheric scattering sky from space artifacts
I am in the process of implementing atmospheric scattering of a planets from space. I have been using Sean O'Neil's shaders from http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter16.html as a ...
2
votes
1answer
92 views
Translating a terrains position using input in Unity 3D C#
I am trying to make a terrain in Unity move, but im having trouble. Here's the code i have.
using UnityEngine;
using System.Collections;
public class NewScript : MonoBehaviour {
Camera camera;
...
0
votes
1answer
87 views
How to setup Authentication Database and Game Database?
I'm playing around with creating a game in C# using the XNA Framework. I've decided to use technologies that I'm pretty much familiar with and create things from scratch. There are probably frameworks ...
0
votes
1answer
60 views
Map state in XNA on WP8
I am developing an RPG for Windows Phone 8 using XNA. I have a map screen and a fight screen. I want to use XNA for both to utilize the graphics helpers and because XNA is awesome. My question is, how ...
0
votes
1answer
108 views
I'm having trouble with collision detection in XNA [closed]
I've written a tile editor and game in XNA, with velocities and gravity, and am having trouble with some of my collision detection things. It works okay, but seems to glitch between just inside and ...
0
votes
2answers
81 views
Grouped enemy movement out of sync after changing directions [closed]
Im working on a Galaxian/Space Invaders Inspired game. Im working on the enemy movement and am running into an issue where the enemies get out of sync when changing direction.
My setup is that I ...
1
vote
1answer
51 views
synchronizing view state between nodes in a rendering cluster
I'm building a display wall demo application.
The environment:
N machines, each driving up to six displays
Wired gigabit switch
OpenTK application to draw the pretty pictures, running 1 copy on ...
13
votes
1answer
1k views
Shadow map artifacts
I want to try adding shadows to a 3D XNA game. I've set up some testing environment with one light and one camera. However, I'm running into artifacts with my approach.
I'm using the shader code from ...
0
votes
1answer
80 views
How to load a custom SpriteFont?
Is there any possible option where you can open a custom SpriteFont? Because I need to add to my game a font that is not in Windows already. I saw this page Custom Sprite Fonts and it's like I want ...
1
vote
2answers
97 views
How to set multiple times, in a single spritebatch, the same pixel shader parameter
I make a test with Effect class in XNA and I want to set multiple times the same parameters (MyParameter in below code).
My code is :
[...]
//In Engine class
Effect ShaderEffect = ...
0
votes
1answer
113 views
xna creating game stage management contrls
I am under planning stage of my game where I am creating controls for my game. I have create below control for stages but have no idea how this we can achieve in xna.
Please also help me with your ...
2
votes
1answer
164 views
Sketchup model renders wrong in XNA
My XNA model renders wrong.
It should render like that:
But it renders like that:
The background doesn't matter. It's just the model that renders wrong.
Here is the drawing code:
protected ...
2
votes
3answers
874 views
Tutorials for Managed DirectX development? [closed]
Are there any good tutorials, for someone new to DirectX development? I'd like to use the SharpDX library in a project, but am completely new to this sort of graphics programming. I'm looking for a ...


