BASIC

Author Topic: Sprite Speed Tester  (Read 5788 times)

MrTAToad

  • Guest
Sprite Speed Tester
« on: 2011-May-26 »
Here is the project and code for the Sprite Speed Tester

[attachment deleted by admin]

Offline XanthorXIII

  • Mr. Polyvector
  • ***
  • Posts: 197
    • View Profile
Re: Sprite Speed Tester
« Reply #1 on: 2011-May-26 »
Cool, thanks for letting me take a look at that. I see that you limited Webos to 100 Sprites, does it run slower with more than 100?
Owlcat has wise

MrTAToad

  • Guest
Re: Sprite Speed Tester
« Reply #2 on: 2011-May-26 »
Yes, the scaling really hammers performance.  100 is a bit iffy, but more or less decent.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10720
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Sprite Speed Tester
« Reply #3 on: 2011-May-26 »
SIZE=10000, FPS=22.5 on my PC. Isn't that enough?
In the Pre - DO NOT use DRAWSPRITE commands for such a huge number of sprites. Use the polyvector / plynewgroup method instead. Texture changing and glDrawXX calls are so expensive on these gadgets.

I have Wumbo's Adventure (15x10 tiles, 32x32 pixles) with a sprite layer for the enemies and a background layer for the hearts running at 60 FPS on the Pre2 with OS 2.x.
« Last Edit: 2011-May-26 by Kitty Hello »

Offline Gary

  • Dr. Type
  • ****
  • Posts: 313
    • View Profile
Re: Sprite Speed Tester
« Reply #4 on: 2011-May-26 »
I get the following error when I try to compile it for PC

..\..\Routines\TAppTime.gbas (failed to open)
"SpriteSpeedTester.gbas"(63) error : user type is not defined : TYPE TAppTime is not declared

Am I missing a plug in?

MrTAToad

  • Guest
Re: Sprite Speed Tester
« Reply #5 on: 2011-May-26 »
You are indeed.  I've included it.

Quote
In the Pre - DO NOT use DRAWSPRITE commands for such a huge number of sprites. Use the polyvector / plynewgroup method instead. Texture changing and glDrawXX calls are so expensive on these gadgets.
Indeed - I just tried to see what it could cope with :)

[attachment deleted by admin]
« Last Edit: 2011-May-26 by MrTAToad »

Offline Gary

  • Dr. Type
  • ****
  • Posts: 313
    • View Profile
Re: Sprite Speed Tester
« Reply #6 on: 2011-May-27 »
Cheers Mr Toad, always like looking at other peoples code as it always teaches me new ways of doing things

I thought my PC was pretty high spec but compared to yours Gernot I need an upgrade :) 10000 sprites was 8 or 9 fps on my Q6700 2.66Ghz quad core with a Geforce GTX 275 and 8GB ram. I dread to think what yours is running  :nw:

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1594
    • View Profile
    • AMpostata Website
Re: Sprite Speed Tester
« Reply #7 on: 2011-May-27 »
size 10000, fps 17

Athlon Dual core 6000 (2x3000) 6gb ram

ATI radeon 4800 512mb
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4240
    • View Profile
    • Portfolio
Re: Sprite Speed Tester
« Reply #8 on: 2011-May-27 »
I get the same error as Gary_Leeds...
I guess I must add Mr Toad´s function to it right?

Edit: ops, never mind, just read the thread in full...

Offline Millerszone

  • Dr. Type
  • ****
  • Posts: 307
  • www.smashedfly.com
    • View Profile
    • Smashed Fly
Re: Sprite Speed Tester
« Reply #9 on: 2011-May-27 »
I'm getting an average of 23.0 FPS at SIZE=10000 and
at SIZE=1000 I get 207 to 230 FPS

Home built PC:
CPU: Quad Q6600 (G0) L728A861 @ 3.5Ghz (originally 2.4Ghz) (oldie but goody)
MOBO: GIGABYTE GA-P35-DQ6 P35
VIDEO: GIGABYTE ATI Radeon HD 4890 1GB GDDR5 256-bit
CPU COOLING: ZALMAN CNPS9700 CPU Cooling Fan/Copper Heatsink
MEMORY: G.SKILL 4GB(2x2GB)
CASE: Antec Nine Hundred with 5 Antec Variable Speed Fans
PSU: RAIDMAX VOLCANO RX-630A 630W ATX12V V2.2/ EPS12V Modular Blue LED Power Supply
STORAGE: OCZ Agility SSD Series 2.5" 120GB SATA II MLC SSD 211MB/158MB
EXT. STORAGE: Western Digital Caviar Green 1.5TB SATA 3.5" Hard Drive
« Last Edit: 2011-May-27 by Millerszone »
Hardware: iMac 27", MacBook Air, PC 3.5Ghz Quad
Developing Tools: GLBasic SDK, Gideros Studio, PureBasic
Developing for: iOS, Android, Windows, OS X, webOS, HTML5

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10720
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Sprite Speed Tester
« Reply #10 on: 2011-May-27 »
Hm. Maybe I did calculate the FPS wrong?
My computer is just a DELL M6500 laptop (see signature).

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3690
    • View Profile
    • Space Fractal
Re: Sprite Speed Tester
« Reply #11 on: 2011-May-29 »
I cant compile this, due missing TAppTime.Gbas and is not included. Remember to include anything, if you include source for it
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

MrTAToad

  • Guest
Re: Sprite Speed Tester
« Reply #12 on: 2011-May-29 »
Its included in my previous post.


Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3690
    • View Profile
    • Space Fractal
Re: Sprite Speed Tester
« Reply #13 on: 2011-May-29 »
sorry, I diddent see that. I should read the whole thread, but would been nice to edit the post to include the missing file too.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline dreamerman

  • Global Moderator
  • Dr. Type
  • *******
  • Posts: 288
    • View Profile
    • my personal website
Re: Sprite Speed Tester
« Reply #14 on: 2011-Jun-04 »
I changed MrTAToad (I hope You don't mind) code a little - added drawing sprite through Polyvector - both normal and rotozoom, to see what speed up it will give...
And I'm really surprised with results, I expected that polyvector would be much faster - Am I doing something in wrong way?

Use:
?DEFINE USEPOLY 1
?DEFINE ROTOZOOM 1
to change drawing options..

my results:
Code: GLBasic [Select]
Radeon 2600XT   => SIZE = 1000
GF2 mx400 (:DD) => SIZE = 100  (You can compare it to mobile devices)

min_fps / max_fps / mostly
---------------RotoZoomSprie-----DrawSprite-----RotoZoomPoly-----DrawPoly

Radeon 2600XT---56/101/~74------215/222/~218----52/147/~100------215/222/~218
GF2 mx400-------22/32/~25--------30/30/~30-------21/29/~25--------30/30/~30--

[attachment deleted by admin]
« Last Edit: 2011-Jun-25 by dreamerman »
Check my source code editor for GLBasic - link