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

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 ...
4
votes
0answers
156 views

Producing a smooth mesh from density cloud and marching cubes

Based on my results from this question I decided to build myself a 3D noise map containing float values in place of my existing boolean point values. The effect I'm trying to produce is something like ...
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 ...
3
votes
0answers
112 views

Legality, implementation, and viability of using the BSP map format in a procedurally generated XNA game?

First off, this is not a "which technology should I use" type of question, but rather a question about the viability (And legality, and how to implement) BSP maps into an XNA game. The legality part ...
3
votes
0answers
246 views

XNA Borderless Window Causing Lag

One of the things I wanted to be sure to do was allow people to play my game at different resolutions and be able to switch between fullscreen, windowed, and borderless. Borderless is a big one for a ...
3
votes
0answers
360 views

Any recommended books/resources on component-based design?

I come from a background with heavy use of the classical object-oriented paradigm for software development. The company I am a part of switched to Unity not too long ago, and we're all very excited ...
2
votes
0answers
66 views

Getting a uint color array from a portion of a Texture2D

I'm currently using the Farseer tools to create a body from a Texture2D. However, my texture is a spritesheet and I need to get the uint array containing the colors from a portion of the full ...
2
votes
0answers
101 views

Implementing Branching Conversation Dialogue in C# with XNA

How could I add logical branching conversation dialogue in C# with XNA? What I mean by this is a dialogue tree similar to this: If the user is wearing red: DisplayText "You're wearing a red ...
2
votes
0answers
74 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 ...
2
votes
0answers
1k views

Why is my deferred lighting implementation so expensive?

I've implemented deferred lighting and I tried to put about 20-26 lights on the viewable space of my map, and it brings down the FPS from 61 to 28-31. It also makes my VGA temperature to go from 68°C ...
2
votes
0answers
251 views

Creating a level editor event system

I'm designing a level editor for game, and I'm trying to create sort of an 'event' system so I can chain together things. If anyone has used RPG Maker, I'm trying to do similar to their system. Right ...
2
votes
0answers
145 views

How can I stop my Jitter physics meshes being offset?

I'm developing a C# game engine and have hit a snag trying to add physics. I'm using XNA for graphics and Jitter for physics. I am trying to split the XNA model into it's meshes, then create a ...
2
votes
0answers
1k 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
138 views

Getting error messages from my server

I'm working on client-server-client game. Client is sending their status (position) 30 times a second. I'm using Lidgren.Network namespace for networking (server, client). I've got two questions: 1. ...
1
vote
0answers
38 views

How to gradually decrease opacity of model?

I have been searching for this matter for a long time and slowly I begin to think that this option is not available in XNA for Windows Phone. I am trying to get a 3D-Model to be drawn at 50% ...
1
vote
0answers
123 views

DRY 0-bandwidth-overhead-serialization in C#: virtual, delegates or reflection?

I'm (de)serializing some datastructures for a network-multiplayer game, and for each datastructure that's to be (de)serialized, I want to define the order of (de)serialization only once for ...
1
vote
0answers
39 views

Translating an object with a joypad

I'm trying to move a 3D plane with my mouse joysticks. At the moment my code, inside the Update method, is as follows: xMin1 += Input.GetAxisRaw("LeftRight"); yMin1 += Input.GetAxisRaw("UpDown"); ...
1
vote
0answers
109 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: ...
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, ...
1
vote
0answers
150 views

3D Animations in XNA 3.1

Well, guys. I'm in a Game Design class at school. Before you ask "WHY ARE YOU USING 3.1 INSTEAD OF 4" -- I would like to point out that C# 2008, and .NET framework 3 is NOT my preferred environment, ...
1
vote
0answers
234 views

Unity - Mesh Deforms terribly while mixing animations

I have a simple game I'm working on to help me learn unity3d. In my Start() function, I've used the following code to set up my animations. walkAnimation = animation["Walk"]; ...
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 ...
1
vote
0answers
98 views

Deferred Rendering: Orthographic directional light that has position

Basically I need to code a light for deferred rendering that is a cross between a spotlight and a directional (positionless) light. It's to be used for sunlight, but because my terrain has overhangs ...
1
vote
0answers
160 views

How do I make a more or less realistic water surface?

I want to make a similar water surface like in this picture: http://www.publicdomainpictures.net/pictures/20000/velka/water-surface-detail-11291208064MpI.jpg I need the water surface in the same view ...
1
vote
0answers
87 views

Numerically stable(ish) method of getting Y-intercept of mouse position?

I'm trying to unproject the mouse position to get the position on the X-Z plane of a ray cast from the mouse. The camera is fully controllable by the user. Right now, the algorithm I'm using is... ...
1
vote
0answers
51 views

Farseer circle hangs where it's spawned

I'm currently trying to simply spawn a circle in Farseer. However, it's stuck wherever I spawn it! The game is updating fine, as I can see the circle spinning in place when I spawn it because of how I ...
1
vote
0answers
83 views

How do I add multi-player to a Windows mobile game?

I have an XNA game on WP7.5 and I like to add a multi-player mode, but I really don't know what to do. At first, I tried it with WCF, but that was really slow for the game. Are there any other ...
1
vote
0answers
143 views

Matrix.CreateBillboard centre rotation problem

I'm having an issue with Matrix.CreateBillboard and a textured Quad where the center axis seems to be positioned incorrectly to the quad object which is rotating around a center point: Using: ...
1
vote
0answers
172 views

Outline Shader Effect for Orthogonal Geometry in XNA

I just recently started learning the art of shading, but I can't give an outline width to 2D, concave geometry when restrained to a single vertex/pixel shader technique (thanks to XNA). the shape I ...
1
vote
0answers
62 views

RasterizerState set to null after calling DrawText in Nuclex

I have the following classes. // Basically hots the instance of the Vectorfont & Matrix internal class Text3D : AManageable { private Text _textFont; private ...
1
vote
0answers
189 views

Map terrain generation to texture instead of color

I have some terrain being generated using the following algorithm double rand1 = rand.NextDouble() + 1; double rand2 = rand.NextDouble() + 2; double rand3 = rand.NextDouble() + 3; float offset = ...
1
vote
0answers
125 views

C# Collision test of a ship and asteriod, angle confusion

We are trying to to do a collision detection for the ship and asteroid. If success than it should detect the collision before N turns. However it is confused between angle 350 and 15 and it is not ...
1
vote
0answers
138 views

Farseer Physics EndContact events don't fire for all registered delegates

Here's my situation: I have several objects that contain a body and a fixture. They are set to sensor = true; atmosphere = BodyFactory.CreateCircle(world, atmosphereRadius / Level.METER_IN_PIXELS, ...
1
vote
0answers
207 views

Unusual Farseer Behaviour?

My basic implementation of a Farseer world has been behaving very strangely. It seems as though there is a very low maximum velocity, and collisions result in the small spheres involved clipping ...
1
vote
0answers
948 views

Controlling 3D model with mouse XNA 4.0 C#

I am creating a 3D table tennis game and the racquet (created in Maya 2012) is controlled by the mouse. I have used picking method to control the racquet, however the cursor is not on the racquet. It ...
1
vote
0answers
154 views

Input in OpenTK

How to use Input in OpenTK 1.0? There is not much info around, some classes are unfinished. What I want to achieve, is to be able to use input not only in OnUpdate function, but also in other classes ...
1
vote
0answers
354 views

Stuck with A* implementation

I have implemented some A* code in C# using this JavaScript code. My C# implementation is the same as the above javascript code. But I'm unable to get it to work properly, e.g pathfinder blocks ...
1
vote
0answers
164 views

Using extension methods through the TryInvokeMember override of a DynamicObject

I feel like I need to give a little background information on why I'm doing what I'm doing, because I want to open it to suggestions and criticism, and give hope to Blender-using XNA programmers that ...
0
votes
0answers
29 views

What's the idea on the base of rendering camera on 2D platformers games?

I'm programming a platformer 2D game, and I'm just wondering about how is done the right-left scrolling of the camera in a game like this. I mean, there is a background that need to change, there ...
0
votes
0answers
31 views

How to access translations of a model?

I have an animated Model, which I process with the SkinnedEffectProcessor. I am generally asking, how I can access translations of a model, during animation. All in all it's always a BoneTransform I ...
0
votes
0answers
55 views

How to integrate Javascript into C# and run scriptcode step by step

We are currently working on a Pokemon MMO trying to figure out how to implement an asynchronous scripting language the best. We don't want to work with threads or tasks, but the goal was to wait for ...
0
votes
0answers
70 views

Most effective way to build a lobby application for a game?

I'm trying to steer clear from "which technology should I use" and more of "what aspects of tool s should I look for to make this easy". What is the rest of the industry doing? Web stacks? I'm trying ...
0
votes
0answers
46 views

How can I draw an Xbox Avatar?

I want to replace the main character of my 2D game by an Xbox avatar. How can I do that? How can I add an avatar to my project? How can I draw an avatar? For example, I draw my main character like ...
0
votes
0answers
65 views

How can I efficiently store Vertex data in C#/XNA?

I am creating a terrain system using voxels in a somewhat minecraft-like style and I was wondering if there was anything I could do to increase the number of vertices I am able to store (and therefore ...
0
votes
0answers
23 views

Syncing texture animations which can be created at any given time

I have a texture animator that will advance animation frames based on the time that has elapsed since it was instantiated. timeElapsed += (float)gameTime.ElapsedGameTime.TotalSeconds; ...
0
votes
0answers
240 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 ...
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 ...
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 ...
0
votes
0answers
47 views

Problem with drawing mesh

So I made this simple model in blender. Its made up of one mesh, and one armature that contains three bones. This is the parent-child relationship that I made in blender: For the sake of simplicity ...
0
votes
0answers
38 views

save bones position after rotation un xna

i'm developping a game for solving a rubik's cube in xna framework c# i want to know how to save bones positions after rotating them i'm calling this method to draw bone witch construct the ...

1 2 3