Sprite3D engine [DX9]

Developed or developing a new product in PureBasic? Tell the world about it.
dige
Addict
Addict
Posts: 1405
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Post by dige »

50fps @ ATI Radeon 9550, Athlon 64x2, WinXPx32
User avatar
IceSoft
Addict
Addict
Posts: 1694
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Post by IceSoft »

Here another DirectX9 speed test (written by me):

Please use the star0.png from eddys speedtest.
There are a 32bit and a 64 bit version.
You can change the DeltaSpeed with the mouse wheel.
You can add 50 new sprites with the left mouse button.
Right mouse button removes 50 sprites.

I got ~249 FPS with 500 sprites.

http://www.datafilehost.com/download-6be0b2d9.html

Screenshot:
Image
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
User avatar
Deeem2031
Enthusiast
Enthusiast
Posts: 216
Joined: Sat Sep 20, 2003 3:57 pm
Location: Germany
Contact:

Post by Deeem2031 »

Wow, what a difference between 32 and 64bit:

32bit - 500 Sprites: ~1380 fps
64bit - 500 Sprites: ~1640 fps

And still 90 fps with 64bit 10000 sprites - nice work!

Eddys Speedtest only reaches 68 fps. :?
irc://irc.freenode.org/#purebasic
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

Previous test didn't run on my machine. This one does. 750 fps at 500 with a movie playing on the second monitor ;-)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
Deeem2031
Enthusiast
Enthusiast
Posts: 216
Joined: Sat Sep 20, 2003 3:57 pm
Location: Germany
Contact:

Post by Deeem2031 »

@blueznl: You need to put the Engine3D.dll in the directory to start eddys speedtest. Dunno why we don't have to with IceSofts, maybe wrong subsystem? Or is it the PBs DX9? :?
irc://irc.freenode.org/#purebasic
User avatar
IceSoft
Addict
Addict
Posts: 1694
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Post by IceSoft »

You can test my speed example with your own sprite too.
Rename your sprite to: star0.png (=128x128) (e.g.: Rename star1.png (512x512) to star0.png)
Transparent color is $0.
Each sprite size is working (I hope so)
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

:idea: I have to code a CreateSpriteParticles if I want the same result.
This lib becomes huge.
Last edited by eddy on Sun Apr 05, 2009 8:59 pm, edited 1 time in total.
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

I'll add this feature in the main demo.
Damn, I've headaches because of all trigo calculations :wink:

FPS ~ 1000

Image
Last edited by eddy on Sun Apr 05, 2009 10:22 pm, edited 1 time in total.
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
IceSoft
Addict
Addict
Posts: 1694
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Post by IceSoft »

@eddy,
about your 2nd speed test:
You write on the title screen: count 500
But it looks like there are not all 500 particles on the visible screen area the whole time ;-)
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

It's a single mesh-entity. All particles are rendered at the same time.
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
Deeem2031
Enthusiast
Enthusiast
Posts: 216
Joined: Sat Sep 20, 2003 3:57 pm
Location: Germany
Contact:

Post by Deeem2031 »

Nice work, now it's even faster than IceSofts speedtest: ~2220 fps
irc://irc.freenode.org/#purebasic
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

Deeem2031 wrote:Nice work, now it's even faster than IceSofts speedtest: ~2220 fps
Good... This sprite type will be dedicated to particles FX.
I don't plan to generalize this.

Before :
1 particle = 1 Mesh = 1 entity = N effects
After :
N particles = 1 Mesh = 1 entity = N effects
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
IceSoft
Addict
Addict
Posts: 1694
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Post by IceSoft »

eddy wrote: Before :
1 particle = 1 Mesh = 1 entity = N effects
After :
N particles = 1 Mesh = 1 entity = N effects
What does it mean?
It is only so fast because is is only a N to 1 relationship (Particles to Meshes relationship)?
Or little bit easier: It is only so fast because it is only one sprite?
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

IceSoft wrote:
eddy wrote: Before :
1 particle = 1 Mesh = 1 entity = N effects
After :
N particles = 1 Mesh = 1 entity = N effects
What does it mean?
It is only so fast because is is only a N to 1 relationship (Particles to Meshes relationship)?
Or little bit easier: It is only so fast because it is only one sprite?
I think he means that instead of creating 1 mesh for each particle, he's only using 1 mesh for displaying all particles on it...

So instead of having thousand of triangles on the scene, eddy has reduced it to just 4 (8 maybe?)
Post Reply