I wrote a component to display current FPS.
The most important part of it is:
public override void Update(GameTime gameTime)
{
elapseTime += (float)gameTime.ElapsedRealTime.TotalSeconds;
frameCounter++;
if (elapseTime > 1)
{
FPS = frameCounter;
frameCounter = 0;
...
1- What is the best XNA book, which can teach the 2d & 3d game programming from basic to advance? Is it possible after reading that book create professional looking 3d games???
2- Any suggestion how can become professional game developer with XNA, and create cool 3d games?
3- Is it XNA industry standard for creating games?
4- Is ther...
It's my first time trying to make anything really interesting in C# and I was trying to make a simple form or game screen where the user could define a custom resolution/screen ratio etc. or to automatically detect the max screen size/ratio and output? its my first game, so I was wondering if it was possible or if there would be any majo...
Is there any way to use HTML/CSS to do the user interface for a XNA game? I would need to programmatically be able to update the HTML, as well as handle events.
Or is there another framework I should be using? This thread looks promising: http://stackoverflow.com/questions/909671/ui-library-for-xna
Also, whatever I use has to work on t...
Using XNA 4.0, I am currently playing songs from the user's PC/XBox360 using the following:
Microsoft.Xna.Framework.Media.MediaPlayer.Play(Song song);
I see that MediaPlayer has a static Property PlayPosition that, as I've researched, used to be a get/set property, but it has been updated to get-only.
Are there any other meth...
I want to draw a 2d, filled, circle. I've looked everywhere and cannot seem to find anything that will even remotely help me draw a circle. I simply want to specify a height and width and location on my canvas.
Anyone know how?
Thanks!
...
I'm using Box2dx (ported to C#; optimized for XNA). It handles collision resolution, but how can I tell if two objects are currently colliding?
This is the function I'm trying to write:
public bool IsColliding(GameObjectController collider1, GameObjectController collider2)
Where collider1.Model.Body is the Box2d Body, and collider1.M...
I'm developing a game with zombie running around in a swamp. I want AIs to have functionality like "chase this target" or "run away". A major stumbling block is pathfinding. Is there a good pathfinding/AI engine in XNA, or should I roll my own?
Does anyone have any experience with this: http://www.codeplex.com/simpleAI?
...
I'm using Box2dx with C#/XNA. I'm trying to write a function that determines if a body could exist in a given point without colliding with anything:
/// <summary>
/// Can gameObject exist with start Point without colliding with anything?
/// </summary>
internal bool IsAvailableArea(GameObjectModel model, Vector2 point)
...
I'm doing pathfinding where I use force to push body to waypoints. However, once they get close enough to the waypoint, I want to cancel out the force. How can I do this? Do I need to maintain separately all the forces I've applied to the body in question?
I'm using Box2dx (C#/XNA).
Here is my attempt, but it doesn't work at all:
i...
I have started creating a game, and I added a second project, it's the standard XNA Windows game 3.1 project, and since the other project already had a Main to start the program and the 2nd is for game data, where as the first was for the drawing and graphical side of things (menu's etc) I thought I would remove the Main method, and now ...
Hi,
I'm porting my application from Winforms+XNA to WPF (+ XNA?) and I would like to know if the combination WPF + XNA makes sense or not. If it brings some advantages or if it is rather a bad choice.
A few points about my game:
It's a desk game with simple 2D animations (movement)
Main window contains panels like available games/pla...
I have a class called Sprite, and ballSprite is an instance of that class. Sprite has a Vector2 property called Position.
I'm trying to increment the Vector's X component like so:
ballSprite.Position.X++;
but it causes this error:
Cannot modify the return value of 'WindowsGame1.Sprite.Position' because it is not a variable
Is it ...
Give a Coordinate, how can I color a single pixel in XNA? i.e.
Coordinate(10,11).Color = Color.Red
...
Using either XNA OR just the usual c# win forms application, which would be the best way to create the feature that enables text messages to be sent from me to my friend over the internet?
I don't know if this matters or not, but I now have 3 Mobile Broadband internet... so it's like... Wireless internet, does that matter?
...
I would like to iterate through an array that covers every pixel on my screen. i.e:
for (int y = 598; y > 0; y--)
{
for (int x = 798; x > 0; x--)
{
if (grains[x][y])
{
spriteBatch.Draw(Grain, new Vector2(x,y), Color.White);
}
...
I am trying to rotate an object to face the direction it is moving in. We want it to face the normalized velocity vector.. help... pls...
...
I want to use OpenSteer for my game that I want to be compatible with the Xbox 360. I have heard that since it is a wrapper for a C++ library, it will work in XNA on a PC, but not on the Xbox. Is there no way to make it compatible?
UPDATE: The C++ version may not be, but what about OpenSteerDotNet?
...
What would be a better parctice, writing the drawing method inside the GameObject class or in the Game class?
GameObject obj = new GameObject();
obj.Draw();
Or
GameObject obj = new GameObject();
DrawGameObject(obj);
...
Hello.
I'm trying to create a good way to handle all possible collisions between two objects. Typically one will be moving and hitting the other, and should then "bounce" away.
What I've done so far (I'm creating a typical game where you have a board and bounce a ball at bricks) is to check if the rectangles intersect and if they do, i...