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

-4
votes
1answer
70 views

How to use a physics engine for collision detection? [closed]

I want to use Box2D.XNA or Farseer for collision detection in my 2D game, but I don't know how to start. I added Box2D.XNA to my solution, but I don't know how to create rectangles, circles or ...
3
votes
3answers
125 views

XNA Collision is quircky/wobbly, how to improve?

I am sorry if this was already answered but I couldn't find the answer. So I am doing a tile based platformer and when I was making collision I had quiet a struggle I looked here and googled for ...
1
vote
2answers
108 views

Winform + XNA (Microsoft Example) - Issues with Drawing Texture2D

Before I get started I would just like to say that I have been using the Microsoft Winform + Xna examples found here: WinForms Series 1: Graphics Device I think I somewhat understand how its working ...
-1
votes
1answer
37 views

On occasion game fails to catch end of screen transitions [closed]

When the player hits the edge of a screen the old screen slides down, and the new screen slides in with them landing on the opposite side from where the transition started. On occasion the bottom of ...
-3
votes
2answers
410 views

How to preload a vast amount of models?

This is more a theoretical question, during runtime, my game runs smooth without any hickups. But as standard game-objects, my game contains collectibles such as coins (which are rotating Models). ...
-1
votes
1answer
89 views

How to add a timer - Visual Studio, XNA (C#)

I'm wanting to add a timer in an XNA game using C#. The ultimate goal is to increment a score in a game every second by 10 points. As of now the score stays at zero. Watching YouTube videos is proving ...
0
votes
2answers
71 views

C# Cursor stuck on busy state

So I implemented a fixed time step loop for my C# game. All it does at the moment is make a square bounce around the screen. The problem I'm having is that when I execute the program, the window ...
0
votes
0answers
56 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
1answer
82 views

Mouse Aiming Causing Rotation Jitter

When our game's ships move around, mouse aiming causes them to shake around a lot. The body being aimed is moved kinematically. I think we've narrowed it down to this block of mouse tracking code. ...
2
votes
2answers
66 views

What's involved in resetting the graphics device?

I'm playing with XNA 4.0, VS2010. I've created a window (not maximized) and drawn some sprites. All is good until I resize the window, after which the sprites stop displaying or only partially ...
-3
votes
0answers
67 views

C# Rendering Loop [closed]

I kind of need help understanding how rendering graphics works in C#. I have a java background and I've made a basic game engine with custom rendering that I use for all of my projects. After trying ...
0
votes
0answers
73 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 ...
-1
votes
0answers
108 views

AI for mass battles in Unity [closed]

I'm looking at building a game where there are many large battles controlled in an RTS like way. When I say large I'm talking 100's in the battle in multiple teams. My question is what is the best way ...
0
votes
1answer
55 views

Refactoring an XNA map redraw [closed]

In the draw step I have different content loading depending on which side of the screen the player exits from. I'm trying to refactor this into a single method for handling the updated content, but I ...
1
vote
1answer
95 views

Rectangle collision is not working correctly [closed]

I have difficulties with the rectangle collision. My character can go through the right side and through the bottom of each platform rectangle. I guess their is a mathematical problem with the ...
0
votes
1answer
135 views

How to prevent the player from clicking too fast [closed]

I'm having trouble with some bullets in my game, the M1911, which is supposed to be semi-auto is only capable of shooting one projectile per mouse click (trying to learn how to do multiple ones at ...
-1
votes
2answers
78 views

Trying to reduce health by a certain value once XNA [closed]

I've got a bullet and collision data for the bullet, when the bullet collides, it's supposed to cut an integer off of the max health for the object. Basically heres what I want: Object is shot, ...
2
votes
1answer
165 views

Unity3D custom camera matrix breaking shadows/lights in deferred rendering

EDIT 1: So it seems this is a common issue with Unity, and it comes from a bug in which custom camera matrices break deferred lighting and shadows. This topic right here talks about it a bit, but the ...
0
votes
1answer
63 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
0answers
67 views

How to move a bullet from the player to the cursor? XNA [closed]

I have a bullet that currently works in my game, but with some odd issues. I'm making a top down shooter and I want the bullet to move from a point on the players location (from the guns muzzle ...
2
votes
1answer
89 views

Unity3D How too write to the back buffer AFTER the final pass of deferred rendering

I've been using this script and shader from the wiki, and they work wonders; my only problem is using them in deferred rendering. Now, the way this shader works is by writing to the depth buffer to ...
3
votes
2answers
80 views

Playing different particle effects in Unity on the same ParticleSystem

The question really sums it up: What is the best way to use one particle system for playing different particle effects? The scenario: GameObject is picked up and it starts playing a simple indicator ...
0
votes
0answers
47 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 ...
-1
votes
1answer
245 views

Android 2D game engine [closed]

I'm looking to make my first 2D sidescroller for android, and would prefer an open source engine good for 2d games. I might eventually have 3d backgrounds too, so if it can handle those that would ...
-1
votes
1answer
72 views

Program closes without Exception

I'm using XNA 3.1 ( .NET 3.5 ) and my program closes without any warning, errors, or code instructing it to do so. I looked in the output, and there aren't any obscure messages outside of telling me ...
0
votes
1answer
49 views

Managing Background Sprites

I tried asking in Chat and no one answered, so the question goes here. Anyone have advice for loading background Sprite maps? I'm trying to do it as efficiently as possible for a grid of 25 ...
-1
votes
0answers
31 views

XNA crash when publish

I've made a 2D game, it runs fine when debugging but when I publish and install the game prompts an error and fails to run. I have three text files in my game which store various game data - ...
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
1answer
80 views

Can not enable IME to capture Chinese characters in SharpDX

Just found that direct integration of IME is blocked in Windows 8, moving on to TSF now. By now, there is lack of Microsoft's Document about TSF, this will be hard. I am using SharpDX and the ...
-1
votes
1answer
97 views

MonoGame iOS and Game Performance [closed]

My friends and I are developing a game for Ipad/Iphone using the monogame Framework. We are at the final stage of the development and we are having some issues concerning the deploy of the game. This ...
1
vote
3answers
164 views

Splitting tileset into individual tiles

I'm trying to split a tileset (from here) into individual tiles. For debugging purposes I wrote some code to split the tileset into individual tiles and display them on screen, but some aren't being ...
5
votes
1answer
137 views

Smoothing Heightmap Data

I've made a Heightmap Generator that creates island heightmaps like in this picture: I am dividing the grayscale ( 0 - 255 ) into 4 diferent parts ( water, sand, gras and forrest ) and after ...
15
votes
4answers
557 views

A Simple Method To Create Island Map Mask

I'm searching for a nice and easy way to generate a mask for an island map with C#. Basically I'm using with a random heightmap generated with perlin noise, where the terrain is NOT surrounded by ...
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"); ...
0
votes
0answers
79 views

Irrlicht collision with a invisible mesh [closed]

I'm writing a Final Fantasy-like game engine, with 2D backgrounds and 3D models with Irrlicht. To calculate collisions with the objects in the background I use a invisible mesh like this: I have ...
2
votes
1answer
200 views

How do I implement movement in a WPF Adventure game?

I'm working on making a short WPF adventure game. The only major hurdle I have right now is how to animate objects on the screen correctly. I've experimented with DoubleAnimation and ...
2
votes
0answers
67 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 ...
3
votes
1answer
85 views

Reading text files XNA 4.0 on Xbox 360

I'm working on porting a game from PC to Xbox 360. When I want to create a level I read a .txt file that I store in my content I read the whole file as a string using this method ...
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 ...
0
votes
1answer
106 views

Recommended collision response needed [closed]

In my game, I have Player class Enemy class Wall class GameComponents class ( Which is the base class for Player, Enemy and Wall) The rules are Enemy chase Player, if collided with Walls, ...
-1
votes
1answer
132 views

Should I use a SQLite for this game? [closed]

I'm planning a board+trading card game. It's exactly the same game as Hero Academy, but with trading cards, and customisable decks. I'm in the Software Design phase, and I'm thinking about using ...
2
votes
1answer
68 views

Support for different resolutions in a tabletop environment

Right now I am experimenting with XAML and C# to write a small Windows Store App which supports displaying a playmat with cards. However not everyone uses the same resolution and with a somehow fixed ...
3
votes
1answer
71 views

Stitching meshes together

I have a voxel engine that generates a mesh per chunk and now I want my meshes to be 1 mesh, but if I create them as a single mesh I kind of lose the benefit of chunking the data in the first place. ...
4
votes
0answers
164 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 ...
-7
votes
2answers
43 views

How do i create a Xna 4.0 Creating BoundyBox [closed]

I understand what other people have done and when creating it myself it just seems to go wrong or the version is different so doesn't work in first place. Any easy code for this?
-1
votes
1answer
54 views

XACT support outside of XNA?

I was building a new game in Monogame when I realized that it didn't have XACT support like XNA did. I was wondering if anyone knew another framework that could be used with or instead of MonoGame ...
2
votes
2answers
99 views

Raytracer texture mapping (to triangle mesh) leaving artifacts

So I am trying to get OBJ loading working in my raytracer. Loading OBJs works fine, but I am having some trouble with getting the texture mapping working. Here is an image of my result. It is ...
-1
votes
1answer
114 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 ...
1
vote
1answer
68 views

graphics.GraphicsDevice.Clear strange result (XNA)

I have such Execution: graphics.GraphicsDevice.Clear(new Color(255, 0, 0, 0)); Alpha is 0. So why it draws me Red color? graphics.GraphicsDevice.Clear(new Color(255, 0, 0, 255)); Also draws the ...
1
vote
2answers
151 views

Level editors compatible with MonoGame? [closed]

I'm thinking about a future project using MonoGame and it seems there are no level editors that outright support it, though obviously there are those for XNA that may possibly be compatible. So I ...

1 2 3 4 5 27