Go Back   Zune Boards > Zune Discussions > Zune Games > Development Discussions

Development Discussions All developers who are coding games may stop by here for any help, suggestions, and everything development related.

Reply
 
LinkBack Thread Tools
Old 11-07-2009, 10:37 PM   #1 (permalink)
Experienced Member
 
Tiptup300's Avatar
 
Join Date: Apr 2008
Posts: 805
Tiptup300 has disabled reputation
Default Zune HD Performance Update XNA

Hopefully a mod won't wrongfully move this into another totally nonsense spot this time, later to just merge it with something not directly related.

To the developers using the Zune HD, has the performance of your games increased at all?



Tiptup300 is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old 11-08-2009, 06:27 AM   #2 (permalink)
Yes. I am a male =__=;
GFX Crew
Premium Member
Global Moderator
Expert Zuner
 
Sebbeh♥'s Avatar
 
Join Date: Jan 2008
Location: New York City
Posts: 3,184
Sebbeh♥ has much to be proud ofSebbeh♥ has much to be proud ofSebbeh♥ has much to be proud ofSebbeh♥ has much to be proud ofSebbeh♥ has much to be proud ofSebbeh♥ has much to be proud ofSebbeh♥ has much to be proud of
Send a message via MSN to Sebbeh♥ Send a message via Skype™ to Sebbeh♥
Awards Showcase
Most Flamboyant Personality 
Total Awards: 1
Default

I already explained to you about the misunderstanding.
Your fault for not being specific. And there you go. Now it won't be moved(And again, I didn't move it).

/leaves topic
__________________

Alternative Sig
Charge's Super Awesome Zune Wallpaper Site
Isn't it funny? You hear a phone ring, and it could be anybody...
but a ringing phone has to be answered, doesn't it?
-The caller




Sebbeh♥ is offline   Reply With Quote
Old 11-08-2009, 09:05 AM   #3 (permalink)
Experienced Member
 
Tiptup300's Avatar
 
Join Date: Apr 2008
Posts: 805
Tiptup300 has disabled reputation
Default

Eh, it's fine, the main problem is my internet's being kinda ghey right now, so the slightlest deviation from the normal places I visit takes a while.



Tiptup300 is offline   Reply With Quote
Old 11-08-2009, 07:14 PM   #4 (permalink)
Experienced Zuner
 
Join Date: Jul 2008
Location: Kingdom Hearts...Duh
Posts: 221
itsthatsguy is on a distinguished road
Default

Yes tiptup, i believe you saw the source code from my old line drawing routine, since it made alot of "dots" it lagged quite a bit, add collisive logic to that and you have 3 lines of-non laggish gameplay before it all goes down, but, with 4.3 (3 right? whats up with skipping .2?) i can draw a good 20 lines before lag, so i believe it has increased ALOT.
__________________
go on, buy the melon you started wanting a second ago...




itsthatsguy is online now   Reply With Quote
Old 11-09-2009, 10:43 AM   #5 (permalink)
Squirt
 
Join Date: Nov 2009
Posts: 10
KawaCoder is on a distinguished road
Default

itsthatsguy -

Average how many "dots" per drawn line did you use for your last experiment?

Just curious. Thanks.

Geo

I wrote a demo to see how many sticks (lines) could be drawn on Zune screen before performance was hit. They are in random length and are randomly sloped. All have the same thickness (3 pixles thick). I ran the program on my Zune 80 and I got about 120 sticks average before performance was hit. Will try on my Zune HD later.

On the following post, l'll try to upload a screen capture to show the drawn sticks. It will be my first attemt on this board.

Apparantly, it wasn't succeful to upload the image. Anyone could point me out?

Anyway, here is the link:

RandomSticks.png - Windows Live

Last edited by Sebbeh♥; 11-12-2009 at 12:36 PM.



KawaCoder is offline   Reply With Quote
Old 11-11-2009, 07:39 PM   #6 (permalink)
Experienced Member
 
Tiptup300's Avatar
 
Join Date: Apr 2008
Posts: 805
Tiptup300 has disabled reputation
Default

What algorithm are you using to draw the lines?



Tiptup300 is offline   Reply With Quote
Old 11-12-2009, 12:15 PM   #7 (permalink)
Squirt
 
Join Date: Nov 2009
Posts: 10
KawaCoder is on a distinguished road
Default

The algorithm is quite simple. You can see it in the code below:
Code:
foreach (Stick stick in sticks)
{
    spriteBatch.Draw(pixelTex, stick.Rect, null, stick.Col,
        stick.Rot, Vector2.Zero, SpriteEffects.None, 0.5f);
}

where:
    pixelTex is a white texture of 1x1 pixel
    stick.Rect is a thin rectangle of a given length
    stick.Col is the color of the stick
    stick.Rot is the angle of the stick
In the Update method, for each update, a stick is created and is added to the list. The creation will stop once the stop flag is signalled. The stop flag is shown below:
Code:
    
double frate = 1 / gameTime.ElapsedGameTime.TotalSeconds;
int frameRate = Convert.ToInt32(frate);
if (frameRate < 30)
    stopFlag = true;
Both codes are in the Draw method.

However, I noticed the frame rate in the display is sometimes flicky when the number of sticks reaches to the final value. I am going to add a running average routine for the frame rate to remove unwanted glitches.

I will start a thread for the demo once I finish my experiment.

Any suggestion is welcome.

Last edited by KawaCoder; 11-12-2009 at 12:27 PM.



KawaCoder is offline   Reply With Quote
Old 11-12-2009, 12:37 PM   #8 (permalink)
Yes. I am a male =__=;
GFX Crew
Premium Member
Global Moderator
Expert Zuner
 
Sebbeh♥'s Avatar
 
Join Date: Jan 2008
Location: New York City
Posts: 3,184
Sebbeh♥ has much to be proud ofSebbeh♥ has much to be proud ofSebbeh♥ has much to be proud ofSebbeh♥ has much to be proud ofSebbeh♥ has much to be proud ofSebbeh♥ has much to be proud ofSebbeh♥ has much to be proud of
Send a message via MSN to Sebbeh♥ Send a message via Skype™ to Sebbeh♥
Awards Showcase
Most Flamboyant Personality 
Total Awards: 1
Default

KawaCoder, please don't double post.
We have the edit button for a reason.

Thank you.
__________________

Alternative Sig
Charge's Super Awesome Zune Wallpaper Site
Isn't it funny? You hear a phone ring, and it could be anybody...
but a ringing phone has to be answered, doesn't it?
-The caller




Sebbeh♥ is offline   Reply With Quote
Old 11-12-2009, 11:32 PM   #9 (permalink)
Experienced Member
 
Tiptup300's Avatar
 
Join Date: Apr 2008
Posts: 805
Tiptup300 has disabled reputation
Default

Quote:
Originally Posted by Sebbeh♥ View Post
KawaCoder, please don't double post.
We have the edit button for a reason.

Thank you.
I don't understand why the forum just doesn't auto-amend...

Also an interesting way I found to find a devices sweet spot is to draw a certain amount of objects based on the current frame rate. Like if the frame rate is 400 it draws 400 sticks usually hitting the performance down to like 30 frames, then the game draws at 30 frames speeding it up till eventually it finds a sweet spot. Although there isn't a real concrete way to get exactly what value this is, it's kind of useful, although not with a fps cap.

Last edited by Tiptup300; 11-12-2009 at 11:38 PM.



Tiptup300 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools