C# is a multiparadigm, managed, garbage-collected, object-oriented programming language created by Microsoft in conjunction with the .NET platform.
54
votes
7answers
3k views
What are typical pitfalls when writing games with a managed Language like C#? [closed]
What pitfalls did you encounter when writing games for the PC with a managed Language like C# and how did you solve them?
47
votes
7answers
3k views
What are the dangers of self-teaching game development?
I am about to embark upon a journey into game development. Following answers to my last question, I will be using C# and XNA.
However, I don't personally know any other game developers and I don't ...
43
votes
1answer
6k views
Using component based entity system practically
Yesterday, I've read a presentation from GDC Canada about Attribute / Behaviour entity system and I think it's pretty great. However, I'm not sure how to use it practially, not just in theory. First ...
43
votes
7answers
3k views
2D Platformer AABB collision problems
I have a problem with AABB collision resolution.
I resolve AABB intersection by resolving the X axis first, then the Y axis.
This is done to prevent this bug: http://i.stack.imgur.com/NLg4j.png
...
42
votes
12answers
8k views
What C# libraries can be used to support game development?
As games are based on many different subsystems things like graphics (DirectX, OpenGL, ...), sound (OpenAL, Ogg Vorbis, ...) or physics (collisions, ...), what libraries do you know that are useful ...
37
votes
1answer
2k views
Why is this beat detection code failing to register some beats properly?
I made this SoundAnalyzer class to detect beats in songs:
class SoundAnalyzer
{
public SoundBuffer soundData;
public Sound sound;
public List<double> beatMarkers = new ...
30
votes
8answers
2k views
How are deterministic games possible in the face of floating-point non-determinism?
To make a game like an RTS networked, I've seen a number of answers here suggest to make the game completely deterministic; then you only have to transfer the users' actions to each other, and lag ...
25
votes
3answers
3k views
2D water with dynamic waves
New Super Mario Bros has really cool 2D water that I'd like to learn how to create.
Here's a video showing it. When something hits the water, it creates a wave. There are also constant "background" ...
22
votes
4answers
2k views
Momentum and order of update problems in my physics engine
This question is a "follow-up" question from my previous one, regarding collision detection and resolution, which you can find here.
If you don't want to read the previous question, here's a ...
22
votes
6answers
4k views
A way to store potentially infinite 2D map data?
I have a 2D platformer that currently can handle chunks with 100 by 100 tiles, with the chunk coordinates are stored as longs, so this is the only limit of maps (maxlong*maxlong).
All entity positions ...
21
votes
4answers
1k views
Why does my object move faster at 45 degrees than at 90 degrees?
I have objects in my game that move faster at 45 degrees then at 90 degrees.
Each object has
Point (x,y) position
Vector2D (x,y) direction
Int speed
And what I do during a update is that new ...
21
votes
3answers
2k views
Is there a faster sine function?
I am working on generation 3d perlin noise. The C# Math library seems like overkill for what I need since most of its functions use double percision. I use Math.Sin() in several places to generate the ...
20
votes
11answers
3k views
XNA development tutorials
Can anybody guide me about where can I get the basic starter tutorials for developing using XNA framework?
19
votes
6answers
3k views
What designs are there for a component based entity system that are user friendly but still flexible?
I've been interested in the component based entity system for a while, and read countless articles on it (The Insomiac games, the pretty standard Evolve Your Hierarchy, the T-Machine, Chronoclast ... ...
18
votes
7answers
3k views
18
votes
5answers
6k views
Is C# viable for a real-time game server?
Most of the question is in the title.
Basically, I'm starting to develop a 2D multiplayer action game. The client is (probably) going to be in XNA, and I thought I'd ask here about whether it's a ...
18
votes
2answers
2k views
Can I legally sell an XNA game made with Visual C# Express Edition?
I've dowloaded Visual C# Express Edition and when it starts up it says "for evaluation purposes only." What does this mean?
Does this mean I have to buy the full version to legally sell my game I ...
18
votes
2answers
838 views
Making entire scene fade to grayscale
When the player loses all of their lives, I want the entire game screen to go grayscale, but not stop updating immediately. I'd also prefer it fade to grayscale instead of suddenly lose all color. ...
17
votes
7answers
5k views
Easiest, most fun way to program 2D games? Flash? XNA? Some other engine? [closed]
this is a post detailing my search for the most enjoyable way for a hobbyist game programmer to sweeten his free time with making a game.
My requirements:
I looked at Flash first, I made a couple of ...
16
votes
10answers
4k views
Does C# have a future in games development?
I recently learned that the MMO Minecraft is powered by Java from a recent interview on CVG.co.uk on a possible collaboration between two former and now competing colleagues. In the interview he ...
16
votes
3answers
1k views
Recognizing a hexagonal clickbox
I'm working on a game that is going to involve gasp hexagons.
At present, I have a hexagon image that I am using (all sides are the same length...it fits into a 50px by 50px image).
I am somewhat ...
16
votes
6answers
3k views
Is there any Lua API that works with C# for PC & XBox 360 Development?
I am reading a book on Game Development in which they show you how to make scripts for your game in Lua. They program Lua and use it from C++, but I was wondering if there is a library or API to use ...
16
votes
4answers
1k views
Game engine: a decent way, architecture-wise, to implement scripting support?
I am developing a simple game engine (in C#, if it matters), and I can't think of a decent enough way to implement scripting in terms of architecture.
It's a simple turn-based strategy with custom, ...
15
votes
4answers
1k views
How to colorize certain parts of a model - like RTS games have those team colors?
I am in a need of implementing something we see in RTS games: team colors. Basically, I am looking for a way to colorize certain parts of a model. How would I achieve this? I have no idea where to ...
15
votes
4answers
473 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 ...
15
votes
0answers
471 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 ...
14
votes
4answers
3k views
What are the differences between XNA 3.1 and 4.0?
I have been away from XNA for a couple months and want to get back into it. I had a game I was currently working on, but it was done in XNA 3.1. What are the differences between the two, and is it ...
14
votes
7answers
10k views
What are some known 2D/3D physics engines for XNA?
I'm looking for a physics engine to use in an XNA project (2D or 3D). Because it's for XNA, it needs to fulfill some requirements:
Not necessarily free, but close to it is obviously preferred
...
14
votes
9answers
2k views
How should I go about learning XNA?
I want to start learning how to make games in XNA, but I have no idea where to start! If someone could advise me on what pieces of software I need and some good books or tutorials to look at, that ...
14
votes
7answers
759 views
UI mockups to the code
My UI designer has made a lovely photoshop PSD of the UI and everything pretty. The biggest problem I'm having is converting some of the more elegant fonts used into something renderable in-game. Is ...
14
votes
3answers
1k views
A simple map, four biomes, and how to distribute them
Here's the basic idea: I've got a Rogue-ish, perhaps Dwarf Fortress-ish game, with a randomly generated overworld and several dungeon entrances scattered around it. I already have the dungeons ...
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 ...
14
votes
1answer
4k views
Creating a 3D map for XNA?
Is anyone aware of a nice 3D map tutorial (how to import and use the map) using XNA without any engine but not limited to an external application (like Tiled for 2D maps) ?
I did a search arund here ...
14
votes
1answer
3k views
How to properly implement message handling in a component based entity system?
I am implementing an entity system variant that has:
An Entity class that is little more than an ID that binds components together
A bunch of component classes that have no "component logic", only ...
13
votes
9answers
4k views
Dynamic pathing algorithm for tower defense game
I'm making a Tower Defense and I need a good pathing algorithm for it.
I have thought about Dijkstra but I need one that can be dynamic; it must be able to update itself when one edge is removed or ...
13
votes
3answers
943 views
XNA and C# vs the 360's in order processor
Having read this rant, I feel that they're probably right (seeing as the Xenon and the CELL BE are both highly sensitive to branchy and cache ignorant code), but I've heard that people are making ...
13
votes
9answers
7k views
C# (Mono)/Java 3D Game Engine recommendation [closed]
can you recommend a good C# game engine for cross platform (Win/Mac/Linux, I don't care about consoles) development?
I've got some experience with raw OpenGL and I played around with Java bindings ...
13
votes
2answers
1k views
Is it clever to use some engine to start game developing?
I started C# programming in order to develop games with XNA later (I always wanted to create some awesome 3D-based RPG or at least a functional one). I read a good book for C# which is ...
13
votes
2answers
1k views
Wall Jump for 2D Platformer
I've been looking for a way to implement wall-jump in my xna game, but I can't find any information about it, can someone could someone please help me out ?
13
votes
6answers
564 views
How to make my characters turn smoothy while walking on a path(list of coordinates)?
I have a list with coordinates - output from A* algorithm - and I would like to make my characters smoothly follow this path with rotations.
So I have something like A and I want to get C
How can ...
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 ...
12
votes
6answers
1k views
Am I hurting myself by not knowing C++ for game design?
Right now, I feel I am strong in both Java a C#. (Not much of a leap from one to the other really).
While I don't expect a game designer/programmer is an attainable goal early on in my career, This ...
12
votes
5answers
5k views
SharpDX and game engines, back to zero?
I'm a desktop developer (I mainly do WPF for a living) but I want to make games as a hobby.
So a few months ago, I started reading blogs, gamedevSE, you name it.
I understand in the C++ DirectX ...
12
votes
2answers
2k views
Playing a Song causing WP7 to crash on phone, but not on emulator
I am trying to implement a song into a game that begins playing and continually loops on Windows Phone 7 via XNA 4.0. On the emulator, this works fine, however when deployed to a phone, it simply ...
12
votes
1answer
833 views
Make Windows game appear in Games Explorer (Start Menu - Games)
How can I make my game (right now just a C# Console Application) appear in the Start Menu under Games??
I mean is it possible for any program to register as a Game in Windows Vista / 7?
12
votes
4answers
1k views
RTS Game AI Thread
I have a project to make a real-time strategy game from scratch. I am still at the early planning stage, but I have been programming a little to see the mechanics.
I know how to program. I also have ...
11
votes
4answers
2k views
Are there any frameworks that allow me to write games in C# on Linux?
I'm looking for something like an alternative to XNA - I don't care whether it's a 2D or 3D engine. It's not because I dislike Windows or am anti-Microsoft; it's because I like running Linux, code in ...
11
votes
4answers
1k views
Calculate random points (pixel) within a circle (image)
I have an image that contains a circles at a specific location, and of a specific diameter. What I need to do is to be able to calculate random points within the circle, and then manipulate the pixels ...
11
votes
6answers
2k views
How can I implement hexagonal tilemap picking in XNA?
I have a hexagon tiled map in which i need to check when a hexagon is clicked. The hexagons aren't actually touching, rather they have a slight gap in between each of them.
Does anyone know how I ...
11
votes
2answers
2k views
Inheritance vs Composition
I make my money in C# Generally in that language I like to decouple everything to the high heavens using interfaces. This has served me well in enterprise code but in writing games in C# I find myself ...