C# is a multiparadigm, managed, garbage-collected, object-oriented programming language created by Microsoft in conjunction with the .NET platform.
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 ...
6
votes
3answers
2k views
XNA - Static classes from game libraries executing after content pipeline extensions, how to avoid the problem?
Alright, formulated this way I'm sure it sounds obscure, but I'll do my best to describe my problem.
First, let me explain what's wrong with my real source code.
I'm making a platformer, and here ...
7
votes
1answer
3k views
Microsoft XNA Platformer Example, is the Collsion Detection implemented accurately?
The example provided by Microsoft seems as if the collision detection (from what I can see) will have a small error. When the user collides with an Unpassable tile, the depth of the intersection is ...
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 ...
6
votes
3answers
1k views
Is there a simple way to group two or more sprites, so all of them will be dependent on each other?
I think that this question is very similar to this one, but I'm not sure if the answers are universal.
So, my goal is:
Place two sprites in fixed position, for example player and his eyes
Make ...
2
votes
2answers
2k views
Loading and unloading “chunks” of tiles in a 2d tile engine with 2d camera
I am making a 2d tile based game in C# and XNA 4.0. I am having trouble loading and unloading "chunks" of tiles(blocks). The whole world is randomly generated and is infinate on both axis. How would I ...
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 ...
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 ... ...
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
...
5
votes
6answers
2k views
Making classes available to others
I'm currently working on a 2D game engine in XNA, and I am very interested in architecture, and how best to let my game objects communicate.
I know a lot of people use a Singleton design but I ...
1
vote
2answers
318 views
Arrive steering behavior
I bought a book called Programming game AI by example and I am trying to implement the arrive steering behavior. The problem I am having is that my objects oscillate around the target position; after ...
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 ...
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?
15
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
...
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 ...
10
votes
7answers
10k views
How do you calculate where a ball should go when it bounces off the bar?
I'm trying to wrap my head around this very Hello World-y problem in game development. I've created a TicTacToe game in XNA so I guess the next step would be a breakout clone.
Keep in mind that 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 ...
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 ...
6
votes
1answer
3k views
Get position of point on circumference of circle, given an angle?
I would like to know how to get a specific point on the circumference of a circle, given an angle. The diameter of the circle is 1, and the center point of the circle is { X: 0.5, Y: 0.5 }.
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 ...
6
votes
1answer
822 views
How to chain actions/animations together and delay their execution?
I'm trying to build a simple game with a number of screens - 'TitleScreen', 'LoadingScreen', 'PlayScreen', 'HighScoreScreen' - each of which has it's own draw & update logic methods, sprites, ...
6
votes
2answers
1k views
Isometric Collision Detection
I am having some issues with trying to detect collision of two isometric tile.
I have tried plotting the lines between each point on the tile and then checking for line intercepts however that didn't ...
4
votes
2answers
2k views
How to determine collision direction between two rectangles?
I am trying to figure out how to determine the direction a collision occurs between two rectangles.
One rectangle does not move. The other rectangle has a velocity in any direction. When a collision ...
2
votes
1answer
415 views
How do I make a jumping dolphin rotate realistically?
I want to program a dolphin that jumps and rotates like a real dolphin. Jumping is not the problem, but I don't know how to make the rotation. At the moment, my dolphin rotates a little weird. But I ...
2
votes
4answers
2k views
Scrolling background loop
I'm trying to scroll my background forever and so I'm using the background image twice. When the first one goes off screen, it should relocate to the end of the second one. However, there seems to be ...
1
vote
3answers
2k views
In which software do the professional game developers create 3D Model?
I am just thinking about beginning game development in xna c#. However, I don't know (and no tutorial teaches) how do professional game developers create a 3D Model/Scene. How can we create 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 ...
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 ...
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 ...
4
votes
2answers
2k views
Quad Tree with a lot of Moving Objects
I have a Quad Tree implementation that is very useful for what I am trying to do. My problem is that when my viewport has a lot of objects, the Update for the Quad Tree takes a very long time.
It ...
5
votes
2answers
3k views
C# Perlin noise - generating “endless” terrain chunks?
I'm currently writing a little side scroller in C#, to both learn C# and have fun. Right now I have a simple random number generator generating the world but it isn't exactly all that great - so with ...
8
votes
2answers
8k views
C# creating a simple snake game
I was thinking about creating a snake game with C#, so I ran ideas in my head, and some problems came up.
How can I track and output in the correct location the blocks that run after the snake's ...
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 ...
11
votes
4answers
2k views
How can I design an effective game object interaction scheme with a component-based architecture?
This is a design question... I'm sure this could be generalized more, but I'm having a hard time with it. I am wondering about design for game object interactions - here is my example (2D ...
10
votes
7answers
4k views
What is a good way to store tilemap data?
I'm developing a 2D platformer with some uni friends. We've based it upon the XNA Platformer Starter Kit which uses .txt files to store the tile map. While this is simple it does not give us enough ...
10
votes
1answer
1k views
Unit Testing a C#/XNA Game Project
I have been dabling in game development since I started programming, but never very seriously. I work as a business app developer, but I'm working on some games in my spare time.
In the business ...
7
votes
2answers
4k views
How do I disable texture filtering for sprite scaling in XNA 4.0?
I have a sprite that I'm trying to scale up in XNA, but XNA is applying some sort of texture filtering that smooths it and makes it look ugly. I'd like it to just do pixel doubling instead of ...
5
votes
4answers
665 views
Retrieving components from game objects (entities)
Using C# and XNA 4, I've made the decision to go for an entity-component based design for my game after reading such posts as this and this, but I'm now struggling to find how to retrieve components ...
11
votes
3answers
632 views
Biased, conservative random walk
I have a sprite which has Velocity and Position, either stored as Vector2. At each Update cycle, velocity is added to the position.
I would like to give the sprite a third vector, Target. New targets ...
3
votes
1answer
608 views
Rotate entity to match current velocity
I have an entity in 2D space moving around, lerping between waypoints. I would like to make the entity rotate around its own origin to face the current direction that it is going, I.E. towards the ...
3
votes
2answers
394 views
Debugging tips?
I'm new to games programming and I'm working on a C#/XNA project.
Something I'm spending a lot of time on is debugging. Obviously as games run in a loop finding the exact iteration that a bad ...
3
votes
1answer
840 views
Turning a sprite such that it rotates in the direction that's most efficient
I have a sprite that moves from waypoint to waypoint. It turns to face its velocity vector, but not instantly (there's a rotation speed).
The problem I'm having is, from one direction to another, the ...
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 ...
3
votes
3answers
467 views
How to calculate origin and position of a weapon which should be “in hands”?
I'm currently stuck with my game, which is from the top perspective. I'm currently using these sprites for player: (using the second at the top):
And here's what I use for my gun
My problem is ...
4
votes
2answers
438 views
How to decompose sprite sheet
I have a lot of spritesheets that are poorly formatted that I want to decompose, or split out into many small images, one for each sprite.
If I can do that, I can use my custom texture packer tool to ...
3
votes
2answers
948 views
Depth buffer and render target
When I use this RenderTarget:
renderTarget = new RenderTarget2D(GraphicsDevice, GraphicsDevice.Viewport.Width,
GraphicsDevice.Viewport.Height, false, SurfaceFormat.Color, DepthFormat.Depth24);
...
2
votes
1answer
154 views
Unity3D Camera constantly moving
I'm trying to make my own first person camera controls in unity that use both thumbsticks on a joypad. I have this working fine. However, when I move the right thumb stick (the one uses to look left / ...
1
vote
1answer
119 views
Pixel Shader - apply a mask (XNA)
I'd like to apply a simple few masks to few images.
The first mask I'd like to implement is mask like:
XXXOOO
I mean, that on the right everything is masked (to black), and on the left everything ...
1
vote
1answer
344 views
Farseer Physics for Xna missing ConvertUnits class
Im using Farseer Physics with Xna 4.0. Im following a starter guide. It said that to draw, I need to convert the meters to pixels with the ConvertUnits namespace. I looked through all of the engine, ...
1
vote
1answer
351 views
Rendering a 2D Sprite in 3D space
I am currently working on a game in XNA 4.0 where I want to implement 2.75D, like in Paper Mario. I feel like it has something to do with z-buffering a Texture2D and drawing that, but I really have no ...
