Sprite3D() - Improvements / Questions

Advanced game related topics
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

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
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

Blade wrote:

Code: Select all

SpriteColor3D(#mysprite,r,g,b)
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.
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!)

8)
Heh, this was requested before :) Im hoping it'll show up in PB4 :)
THCM
Enthusiast
Enthusiast
Posts: 276
Joined: Fri Apr 25, 2003 5:06 pm
Location: Gummersbach - Germany
Contact:

Post by THCM »

I get about 6000 sprites using 1280x1024x32 with 60hz.
The Human Code Machine / Masters' Design Group
xperience2003
Enthusiast
Enthusiast
Posts: 113
Joined: Tue Oct 05, 2004 9:05 pm
Location: germany
Contact:

Post by xperience2003 »

i get
blitz 80 fps, 1050 sprites
pb 72 fps, 1050 sprites

..pb-version isn't smooth

athlon 2k+ , radeon9550
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Blitz 300 sprites: 19 fps.
PB 300 sprites: 58 fps.

The Blitz version looks like this:
Image

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

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 :))

Image
What are your thoughts on the above proposed commands/functions?
Personally I'd rather see that the existing commands works before adding new ones.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

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?
( 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... )
coma
Enthusiast
Enthusiast
Posts: 164
Joined: Fri Aug 15, 2003 3:46 am
Location: Canada

Post by coma »

blueznl wrote: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?
try to resize balloon.bmp to 128x128, it should work with blitz.


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 :D )
aaron
Enthusiast
Enthusiast
Posts: 267
Joined: Mon Apr 19, 2004 3:04 am
Location: Canada
Contact:

Post by aaron »

coma wrote:I made a little test with purebasic and directx :
vsync on, full screen:

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. :D
coma
Enthusiast
Enthusiast
Posts: 164
Joined: Fri Aug 15, 2003 3:46 am
Location: Canada

Post by coma »

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 :D
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

blueznl wrote:trond, what kind of hardware do you have?
A ProSavageDDR (and I can't upgrade because it's a laptop).

If I resize the balloon to 128x128 it looks like this (and it behaves strange like laaaag fastfastfast laaaaaaglaaaag fastfast):
Image
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

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)
( 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... )
Steve Elliott
Enthusiast
Enthusiast
Posts: 109
Joined: Sun Jan 01, 2006 9:34 pm
Location: Wales, UK

Post by Steve Elliott »

Some good suggestions syntax error, 3d sprites are very useful.

But if this is implemented I just hope the exe's don't end up the size of Blitz BASIC!
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

Heya Fred, are there any plans on implimenting any of these commands?
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post by Joakim Christiansen »

Shannara wrote:Heya Fred, are there any plans on implimenting any of these commands?
It would rock! :D
Lyon
User
User
Posts: 59
Joined: Tue Mar 28, 2006 9:26 pm

Post by Lyon »

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.
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.

Specs:
Celery 1GHz
512MB RAM
Geforce FX 5200 128MB
Post Reply