Author Topic: WinScape (pushing the limits)  (Read 6483 times)

0 Members and 1 Guest are viewing this topic.

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2382
  • Gender: Male
    • www.zapsolution.com
WinScape (pushing the limits)
« on: February 04, 2009, 07:49:51 PM »
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.

...
« Last Edit: August 08, 2011, 05:27:43 PM by Patrice Terrier »
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Eros Olmi

  • Sr. Member
  • ****
  • Posts: 380
  • Gender: Male
    • thinBasic
Re: WinScape (pushing the limits)
« Reply #1 on: February 04, 2009, 09:55:13 PM »
Patrice,

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

Great!
« Last Edit: February 04, 2009, 10:24:52 PM by Eros Olmi »
thinBasic Script Interpreter - www.thinbasic.com | www.thinbasic.com/community
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2382
  • Gender: Male
    • www.zapsolution.com
Re: WinScape (pushing the limits)
« Reply #2 on: February 04, 2009, 10:23:09 PM »
Eros,

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

Offline Petr Schreiber

  • Sr. Member
  • ****
  • Posts: 411
Re: WinScape (pushing the limits)
« Reply #3 on: February 05, 2009, 10:04:09 AM »
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

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2382
  • Gender: Male
    • www.zapsolution.com
Re: WinScape (pushing the limits)
« Reply #4 on: February 05, 2009, 12:52:46 PM »
Quote
But 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):
Code: [Select]
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
Code: [Select]

             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
 

...
« Last Edit: February 05, 2009, 01:05:14 PM by Patrice Terrier »
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2382
  • Gender: Male
    • www.zapsolution.com
Re: WinScape (pushing the limits)
« Reply #5 on: February 05, 2009, 02:56:34 PM »
Petr,

Quote
I 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

Offline Petr Schreiber

  • Sr. Member
  • ****
  • Posts: 411
Re: WinScape (pushing the limits)
« Reply #6 on: February 05, 2009, 07:03:40 PM »
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%
« Last Edit: February 05, 2009, 07:15:16 PM by Petr Schreiber »
AMD Sempron 3400+ | 1GB RAM @ 533MHz | GeForce 6200 / GeForce 9500GT | 32bit Windows XP SP3

psch.thinbasic.com

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2382
  • Gender: Male
    • www.zapsolution.com
Re: WinScape (pushing the limits)
« Reply #7 on: February 05, 2009, 07:48:41 PM »
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

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2382
  • Gender: Male
    • www.zapsolution.com
Re: WinScape (pushing the limits)
« Reply #8 on: August 08, 2011, 05:23:27 PM »
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