Sprite3D() - Improvements / Questions
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
PB does 550 sprites before degrading fps below screen refresh, for blitz around 600. Not too different. I don't know how fair the comparison is, though. Often the author of something like this will have a "favourite" going in. Not saying that's the case here, no evidence of partiality so far.
Last edited by netmaestro on Wed Feb 22, 2006 4:32 am, edited 2 times in total.
BERESHEIT
Heh, this was requested beforeBlade wrote:could be very useful, but if we had the chance to modify the color of the four single corners, thanks to the hardware gourad-shading much more nice effects could be added.Code: Select all
SpriteColor3D(#mysprite,r,g,b)
Give the same color to the four corners to have a solid color.
And don't forget that with R G B there is a fouth channel: A (for alpha!)


-
- Enthusiast
- Posts: 113
- Joined: Tue Oct 05, 2004 9:05 pm
- Location: germany
- Contact:
Blitz 300 sprites: 19 fps.
PB 300 sprites: 58 fps.
The Blitz version looks like this:

The PB version looks like this (for some reason the screencapture didn't catch the text):

I'll let the pictures speak for themselves and don't say anything that can be used for saying that I am taking every opportunity to criticize PB and its function set.
Edit: By the way, here's a screenshot from the unmodified (just fetched it from SmartUpdate) Sprite3D.pb example. Aren't those pink areas supposed to be transparent? (From file: TransparentSpriteColor(0, 255, 0, 255) ; Our pink is transparent
)

PB 300 sprites: 58 fps.
The Blitz version looks like this:

The PB version looks like this (for some reason the screencapture didn't catch the text):

I'll let the pictures speak for themselves and don't say anything that can be used for saying that I am taking every opportunity to criticize PB and its function set.
Edit: By the way, here's a screenshot from the unmodified (just fetched it from SmartUpdate) Sprite3D.pb example. Aren't those pink areas supposed to be transparent? (From file: TransparentSpriteColor(0, 255, 0, 255) ; Our pink is transparent


Personally I'd rather see that the existing commands works before adding new ones.What are your thoughts on the above proposed commands/functions?
blitz: 0 sprites
memory access violation
pb: 1600 sprites (are those sprites supposed to be b&w?)
trond, what kind of hardware do you have?

pb: 1600 sprites (are those sprites supposed to be b&w?)
trond, what kind of hardware do you have?
( 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... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
try to resize balloon.bmp to 128x128, it should work with blitz.blueznl wrote:blitz: 0 spritesmemory access violation
pb: 1600 sprites (are those sprites supposed to be b&w?)
trond, what kind of hardware do you have?
I made a little test with purebasic and directx :
dxspeedtest
speedtest & speedtest2 are the same, except that I use software vertex processing in the second one.
unfortunately it's not possible to turn vsync on/off during the execution (or I don't know how, with dx9).
(sorry for the big dll

vsync on, full screen:coma wrote:I made a little test with purebasic and directx :
Speedtest ran at 75fps until 590 sprites, then it started to lag occasionaly (like 1 or 2 times a second it would slow down, then pop back up to 75)
Speedtest2 ran at 75fps until 580 sprites.
Very close.... I have a NVidia MX440 with a P4-HT @ 2.6GHz. For reference, the original blitz basic version ran up to 750 sprites before the lag started. Interestingly enough, turning off vsync (as can be done in the blitz version) got rid of the lag, although tearing could then be seen. It seems that the sprite code runs about 30% slower in the purebasic version versus the blitz basic version. Is that a good trade off for a smaller EXE? Well... not in my opinion, particularly for games.
Lets see how PB4 does.

I only put speedtest2.exe because I think that hardware vertexprocessing doesn't work with all the gfx cards (the proper way would be to do a test of hardware capabilities :roll: )
there's not a big difference between the two versions in a such program (not the case when there's 3d meshs with a lot of vertices).
but the goal is not to compare my two versions
there's not a big difference between the two versions in a such program (not the case when there's 3d meshs with a lot of vertices).
but the goal is not to compare my two versions

hate to say it, but laptop hardware is, euh, rather... weird 
i'm not expecting anything on laptop hardware, to be honest, and i guess fred's not going out of his way to support all sorts of exotic hardware
(don't say: but other programs work! sometimes following the rules may result in code that doesn't run on all hardware / software platforms, as those hard / software implementations do not entirely follow the rules themselves... one language may work, another one may not)

i'm not expecting anything on laptop hardware, to be honest, and i guess fred's not going out of his way to support all sorts of exotic hardware

(don't say: but other programs work! sometimes following the rules may result in code that doesn't run on all hardware / software platforms, as those hard / software implementations do not entirely follow the rules themselves... one language may work, another one may not)
( 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... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
-
- Enthusiast
- Posts: 109
- Joined: Sun Jan 01, 2006 9:34 pm
- Location: Wales, UK
- Joakim Christiansen
- Addict
- Posts: 2452
- Joined: Wed Dec 22, 2004 4:12 pm
- Location: Norway
- Contact:
WOW!!! This is AMAZING. On my POS system, I get 1100 sprites with test 1 before it starts to take a FPS hit and nice and smooth with 1100 sprites. Please make this into an easy to use third-party solution for 2D stuff we can use with PB.I made a little test with purebasic and directx :
dxspeedtest
speedtest & speedtest2 are the same, except that I use software vertex processing in the second one.
Specs:
Celery 1GHz
512MB RAM
Geforce FX 5200 128MB