I used this : http://blogs.msdn.com/shawnhar/archi...framerate.aspx
as a starting point. You have to change it, for example remove the loadAllContent checks and change the LoadGraphicsContent and Unload one to just LoadContent() methods. Also have to add Content.RootDirectory = "Content" to the constructor.
Last edited by sableholic; 06-18-2008 at 02:45 PM.
I used this : http://blogs.msdn.com/shawnhar/archi...framerate.aspx
as a starting point. You have to change it, for example remove the loadAllContent checks and change the LoadGraphicsContent and Unload one to just LoadContent() methods. Also have to add Content.RootDirectory = "Content" to the constructor.
Is it possible if you could just send the copy of game source code you have to me? I'm new to VS and XNA games studio.
Is it possible if you could just send the copy of game source code you have to me? I'm new to VS and XNA games studio.
Right Click the RaycasterXDemo [Zune] Project and choose Add->New Item->C# Class File
Rename it to FrameRateCounter.cs
Open that file and select all and then paste in the following:
Code:
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
namespace RaycasterXDemo
{
public class FrameRateCounter : DrawableGameComponent
{
ContentManager Content;
SpriteBatch spriteBatch;
SpriteFont spriteFont;
int frameRate = 0;
int frameCounter = 0;
TimeSpan elapsedTime = TimeSpan.Zero;
public FrameRateCounter(Game game)
: base(game)
{
Content = new ContentManager(game.Services);
Content.RootDirectory = "Content";
}
protected override void LoadContent()
{
spriteBatch = new SpriteBatch(GraphicsDevice);
spriteFont = Content.Load<SpriteFont>("Fonts\Font");
}
protected override void UnloadContent()
{
Content.Unload();
}
public override void Update(GameTime gameTime)
{
elapsedTime += gameTime.ElapsedGameTime;
if (elapsedTime > TimeSpan.FromSeconds(1))
{
elapsedTime -= TimeSpan.FromSeconds(1);
frameRate = frameCounter;
frameCounter = 0;
}
}
public override void Draw(GameTime gameTime)
{
frameCounter++;
string fps = string.Format("fps: {0}", frameRate);
spriteBatch.Begin();
spriteBatch.DrawString(spriteFont, fps, new Vector2(33, 33), Color.Black);
spriteBatch.DrawString(spriteFont, fps, new Vector2(32, 32), Color.White);
spriteBatch.End();
}
}
}
and save it. Then open up Game1.cs and add the following line:
Beats me. Silverlight is more event-driven than XNA, plus it doesn't get full hardware power and all the other things. But it seems rather close to the Zune (at least my 8GB) that it was worth porting. Maybe I'll make a Silverlight maze game like your Zune game.
Wow.. i never knew 8GB zune was that slow. Do you need a map generating tool for the maze?
Also, I think i'm gona delay the release of the maze game. I think i'll add the zuneblade into this game so I can make different levels for the game while listening to some music. The problem is that I don't know how to get the zuneblade into this game and how to add levels. So i'll have to seek help from other developers from zuneboards.
I found out a trick for optimizing the FPS. If you create the sprites bigger, like 300pixel length and width.. etc, it won't lag.
Anyways... with 2-3 large sprites, It's impossible for me to get it to lag I don't know the exact fps because the fpscounter doesn't work for me or I've done something wrong. When I have about 50 sprites showing at a time, it's pretty choppy (10fps~) for half a second before everything goes smooth again.
There's a new download in the Source Code area for RaycasterX that includes some changes. It seemed (though I didn't test that thoroughly nor really measure the FPS) to help out on my 8GB Zune by moving all the math to Update instead of Draw. So anyone building with RaycasterX will likely want to update to the new version found here: http://www.codeplex.com/raycasterx/S...leCommits.aspx.
Hey. I have a (hopefully) related set of questions.
1) What kinds of files could I use for gun animations?
2) Does anyone want to help me make my ZPortal3D game using RaycasterX (seeing as i'm a n00b to raycaster (and c#))
#EDIT#
Oh yeah, just to show you how powerful the engine actually is. On the Zune. My average FPS is 20. Best is 29. On Halo Custom Edition , Runing a blank map, on a machine about 100 (?) times the size of zune my best was 67 and average was 60. that is a performance lapse meaning the Zune is better than my machine by about 20/60=1/3. The zune has 2/3rds of the performance of a machine 100 times the size of the zune. AND the zune is a 4GB! ZOMG
Last edited by Maxassin; 07-13-2009 at 08:31 AM.
Reason: 1 thing I had to say
Hey. I have a (hopefully) related set of questions.
1) What kinds of files could I use for gun animations?
2) Does anyone want to help me make my ZPortal3D game using RaycasterX (seeing as i'm a n00b to raycaster (and c#))
#EDIT#
Oh yeah, just to show you how powerful the engine actually is. On the Zune. My average FPS is 20. Best is 29. On Halo Custom Edition , Runing a blank map, on a machine about 100 (?) times the size of zune my best was 67 and average was 60. that is a performance lapse meaning the Zune is better than my machine by about 20/60=1/3. The zune has 2/3rds of the performance of a machine 100 times the size of the zune. AND the zune is a 4GB! ZOMG
I really hope you're joking. I really hope you just forgot a /sarcasm tag.
DID U FINISH THE FIRST PERSON SHOOTER OR WHAT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
please i would like to know
I am still working on it. I need to find the source code for the portal gun. and i need to program controls, And I need to figure out how to make map on raycast, and I will be done.
Hey. I have a (hopefully) related set of questions.
1) What kinds of files could I use for gun animations?
2) Does anyone want to help me make my ZPortal3D game using RaycasterX (seeing as i'm a n00b to raycaster (and c#))
#EDIT#
Oh yeah, just to show you how powerful the engine actually is. On the Zune. My average FPS is 20. Best is 29. On Halo Custom Edition , Runing a blank map, on a machine about 100 (?) times the size of zune my best was 67 and average was 60. that is a performance lapse meaning the Zune is better than my machine by about 20/60=1/3. The zune has 2/3rds of the performance of a machine 100 times the size of the zune. AND the zune is a 4GB! ZOMG
Please excuse me if I'm wrong, but wasn't it determined a long time ago by several professional developers on this site that the Zune is just too slow for Raycasting? I've been on this site since (more or less) the beginning of Zune games and apps, and several people have picked up and put down this project.