• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

WinScape (pushing the limits)

Started by Patrice Terrier, February 04, 2009, 07:49:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Patrice Terrier

This is another attempt to push the Windows window limits.

By the way the next step would be to play AVI or Flash animation in the background.
I shall have a look at José's COM example to play a flv file.
If you know of a nice, smooth, FLV animation, something like clouds moving slowly or lights effects, please let me know.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Eros Olmi

#1
Patrice,

this is one of the best effect I've seen since a lot of time.

Great!
thinBasic Script Interpreter - www.thinbasic.com | www.thinbasic.com/community
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

Patrice Terrier

Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Petr Schreiber

Hi Patrice,

very hypnotic demo as usual.
I just changed %TIMER_DELAY to 20, making it run at 50FPS, and it still uses just 10% CPU power!

But there is one mystery I cannot solve - where in code do you perform the image shifting? :)


Thanks,
Petr
AMD Sempron 3400+ | 1GB RAM @ 533MHz | GeForce 6200 / GeForce 9500GT | 32bit Windows XP SP3

psch.thinbasic.com

Patrice Terrier

#4
QuoteBut there is one mystery I cannot solve - where in code do you perform the image shifting?

See the WinScape's dedicated zaniskin.inc file.

New API(s):

FUNCTION zAnimResetXX(BYVAL N AS LONG, BYVAL RW AS LONG) AS LONG
    STATIC WasN AS LONG
    IF RW THEN WasN = N
    FUNCTION = WasN
END FUNCTION

FUNCTION zAnimUseStretchMode(BYVAL N AS LONG, BYVAL RW AS LONG) AS LONG
    STATIC WasN AS LONG
    IF RW THEN WasN = N
    FUNCTION = WasN
END FUNCTION


Modified API: zMoveBackground


             CALL zComputeAspect(800, 600, rc.nRight, rc.nBottom, xP, yP, xS, yS)
             STATIC FlipMove AS LONG
             IF zAnimUseStretchMode(0, 0) THEN
                CALL GdipDrawImageRectRectI(graphics, Img, xP, yP, xS, yS, xx, 0, 800 * ((ImgW - xx) / 800), 600, %UnitPixel, ImgAttr)
             ELSE
                CALL GdipDrawImageRectRectI(graphics, Img, xP, yP, xS, yS, xx, 0, 800, 600, %UnitPixel, ImgAttr)
             END IF
             IF zAnimResetXX(0, 0) THEN xx = 0: CALL zAnimResetXX(0, 1)
             IF FlipMove = 0 THEN
                xx += 1: IF xx > imgW - 800 THEN FlipMove = -1
             ELSE
                xx -= 1: IF xx < 0 THEN FlipMove = 0: xx = 0
             END IF



...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

Petr,

QuoteI just changed %TIMER_DELAY to 20, making it run at 50FPS, and it still uses just 10% CPU power!

How much when running in stretched mode, and also how much in full screen mode with or without stretching?
and tell me if you use XP or your new VISTA 32x?

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Petr Schreiber

#6
Hi Patrice,

I had chance to test it only on XP box so far, as it is mine. The Vista one is not in common perimeter of my influence :)
Interesting observation - in 800x600 those 2 effects differ, in fullscreen they are both quite demanding - probably reaching some system component bottleneck?

When I render OpenGL quad with scrolling images you use, I get easily 0% even at 1280x1024, so I guess CPU/Memory is not fast enough on my PC.

Quote
WinScape test
==============

PC: AMD Sempron 64 3400+ (1.8GHz); 1GB 533 RAM; GeForce 9500GT 512 DDR3;Windows XP SP2

TIMER_DELAY 20
--------------

Windowed 800x600:
Shift 0-10%
Stretch 50%

Maximized to 1280x1024:
Shift 99% but still smooth
Stretch 99% but still smooth

TIMER_DELAY 40
--------------

Windowed 800x600:
Shift 0-2%
Stretch 33%

Maximized to 1280x1024:
Shift 67%
Stretch 67%

TIMER_DELAY 80
--------------

Windowed 800x600:
Shift 0-2%
Stretch 17%

Maximized to 1280x1024:
Shift 31%
Stretch 31%

TIMER_DELAY 100
---------------

Windowed 800x600:
Shift 0-2%
Stretch 14%

Maximized to 1280x1024:
Shift 28%
Stretch 28%
AMD Sempron 3400+ | 1GB RAM @ 533MHz | GeForce 6200 / GeForce 9500GT | 32bit Windows XP SP3

psch.thinbasic.com

Patrice Terrier

Ok, Petr, thank you for the detailed feedback.

On my HP HDX18 running VISTA X64 and using the Sky background in full HD mode (1920 x 1080),
it ranges between 18-24, whatever the stretch mode being turned on or off.

This means, better to use the full screen mode with a horse race powered computer ;)

As a matter of comparison, on the same computer, MovieBox, playing a full HD MKV movie, ranges between 27-36.

...


Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

The first post of this thread has been updated, to fix the ZIP file corruption caused by the "Server Collapse".

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com