Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
XNA is a game framework by Microsoft that allows deployment for Windows, Windows Phone & Xbox 360.
1
vote
Can't find error about playing audio in XNA
I think you should load your content in the LoadContent() method. If you don't have this method in your derived game class, create a method that looks like this:
public override void LoadContent()
{
…
3
votes
How do I draw something when the mouse is clicked?
Note that infinite loops and sleeps should not be used in XNA. XNA (and most other game frameworks) uses a Game Loop which will call Update followed by Draw once per frame, over and over again. …
-1
votes
how to make a spritefont with multiple colors and black?
The reason that sprite fonts are white is so that you can apply your own color in the Spritebatch.DrawString. If I understand correctly, each pixel in your custom font will get multiplied by the Color …
0
votes
Rendering multiple RenderTargets to the screen
In my 2D XNA-based game, I have multiple layers like this too. I just draw the background, then draw the foreground. …
2
votes
Accepted
What is the ideal way to separate presentation and logic, and when is it OK to combine them?
The way I've always done it is to have each object draw themselves. It keeps everything in one place, you don't need to open up the internals for someone else to draw you, and therefore can increase e …
5
votes
Accepted
Distribute XNA as a standalone zip or exe (no installer needed)?
Your co-workers need to have the .Net Framework 3.5 and the XNA Framework 4.0 installed. I don't think there's an easy way around that. …
9
votes
Accepted
How to make a registration for my game?
Your method sounds like it could be detrimental to paying customers. Rule #1 about DRM: Never screw paying customers. Sure, you may lose more copies to the pirates, but your paying customers will than …
7
votes
Accepted
Override close button
As described on the XNA Community Forum, you can get the host Form and listen to the FormClosing event, which allows you to cancel the event. …
0
votes
How to design a GUI / controls system classes
Alternatives that I looked at were Ruminate XNA, and Awesomium (more specifically Awesomium .NET). I ended up picking Awesomium, and MindWorX and I built an Awesomium component for XNA. …
1
vote
XNA Creating a directional vector from two other vectors
I think you need to add a delta time, and movement speed into the equations in MoveVertices. Without these, you are moving one unit per update. Something like the following will make it N units per se …
5
votes
2
answers
582
views
How to circle a target at a constant distance
I have an AI ship that stops approaching when it gets within firing range, and starts strafing around its target. The problem is that it doesn't circle its target very well. The following code attempt …
2
votes
Keeping rotation between two objects
I'm assuming one of the two will have control over the other one, much like a fork-lift. In your drawing, I'm assuming this is the black one, and the red one is the package. You only mention you're ha …
0
votes
Tiling Physics using Farseer
Hmm... I suspect it might have something to do with your circle and not the tiles beneath it. Try making the ground using a single hull and see if you get the same results. If not, it's the tiles like …
9
votes
XNA C# How to draw fonts in different color
For a flexible system, you'll want to make new classes to represent a line of text that can contain multiple sections of text with a given colour.
public class TextSection
{
String text;
Colo …
6
votes
Accepted
2D Particle Explosion
Judging by your description of the problem, and from the following code, I bet you are storing the location of the particles as integers.
Vector2 moveAmount = velocity * elapsed;
xTile.Dimensions.Lo …