PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

New sprite demo

OK, there's a new demo online. URL:
http://www.pocketmatrix.com/phantom/bouncers.zip .
What's cool: 100 sprites, all 80x80 pixels, bouncing on the screen, at 50fps. The sprite code does full clipping to all four sides of the screen, but on average 95% of the 640.000 pixels are on-screen. The total fill-rate of this demo is nearly 32 million pixels.

I will write a tutorial about this demo later this week. With the tutorial I will also publish the source code. This time it's a bit more generalyl applicable than the previous demo, so there's no need to call me a witch. :)
Is there an 80x86 version too?
Sure. I'll upload it in a minute.
I added it to the archive. Please redownload it and have fun. :)
uhm the ptc.dll couldn't be found..... and I don't see it on your page for download:/
btw is it gaffer's openptc library you're using?
I uploaded another new zip file to the site. Please redownload. :) This time it contains the neccessary dll's for the PC. You don't have to copy those to your PocketPC, of course, all you need to install on your PocketPC is the executable for your device plus the .tga file.
got 17 FPS after waiting for about 60 seconds on my EM500. I just copied everything on the MMC.

greets,
Dada
Umm...
it would look sooooo much better with smaller balls. I can't really tell if they are really 100 sprites or just 10 jumping around.

how about 1000 sprites 10x10, can you do that?
Carpe,

I have a demo that will do ~750 8x8 colored sprites at 50 fps.  It should easily do 2000 @ 50 fps if I remove the alpha blending.  It only runs on an iPaq though.

digby:not sure, alpha-blending isn't that slow.. althrought it depends how you implement it... good alpha-blending works around with half the speed of transparent bitmap drawing
Mirek,

Drawing the 8x8 alpha blended sprites to a back buffer is around 1500 @ 50 hz.

Drawing the 8x8 opaque sprites to a back buffer is around 3800 @ 50 hz.

I think my alpha blending code in this demo is pretty optimal, however if you have a demo that does better I'd love to see it.

Your 2x rule of thumb isn't necessarily true.  Ask Jacco to make his recent demo to alpha-blend instead of drawing them opaque.  His throughput should drop more than half because he's no longer able to get the speed up by eliminating the overdraw.  He's going to have to draw every non-transparent pixel of every sprite.

digby:that's true, but only because Jacco is using this trick, normally you wouldn't use it (or you wouldn't use any/much alpha-blending like most games do)
my initial alpha-blender was around 1/3 the speed of simple bitmap copy procedure, but I have optimized it a bit and it can be still optimized quite much (going to do it after my mapeditor is up and working)