Fireworks Screensaver v1.0 Beta 3

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Fireworks Screensaver v1.0 Beta 3

Post by Joakim Christiansen »

About:
------
A nice screensaver showing some amazing fireworks!

Secret keys:
- : Faster
+ : Slower
I : Show info

Version history:
----------------
1.0 Beta 2:
Added: Preview is now displayed
Added: A new explosion type
Fixed: Any other key closes it

1.0 Beta 3:
Changed: I did some tweaking here and there to make it look bether
Added: XP skin support for the config window
I guess this will be the last beta?

Image<-- crappy images... it looks much bether
Click to download

Fireworks Screensaver 1.0 Beta 3 - "100% CLEAN" AWARD

I'm gonna use this one myself, I love it! ;D

BTW: It would be nice if you would report your FPS, i'm getting 48 at default settings, and 800-1000 on 0 delay.
And does the preview and config work on all windows versions?
Last edited by Joakim Christiansen on Fri Jun 09, 2006 5:42 pm, edited 6 times in total.
I like logic, hence I dislike humans but love computers.
mskuma
Enthusiast
Enthusiast
Posts: 573
Joined: Sat Dec 03, 2005 1:31 am
Location: Australia

Post by mskuma »

Hi Joakim, I'm getting 44 FPS on a Toshiba P4 3GHz laptop (graphics: NVidia GeForce FX Go 5200). Thanks alot for showing.
benny
Enthusiast
Enthusiast
Posts: 465
Joined: Fri Apr 25, 2003 7:44 pm
Location: end of www
Contact:

Post by benny »

One of the best 2D Plot()-only fireworks I have seen :!: Looks fascinating ... N1

[edit]a screensaver should exits when any key is pressed (except the keys which
are used of course) - just my opinion :roll: [/edit]
regards,
benny!
-
pe0ple ar3 str4nge!!!
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 »

Very nice job, JLC! I like it. But it isn't playing in the preview window? Just in main saver mode.
BERESHEIT
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

That preview mode is hit or miss with screensavers.
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 »

That preview mode is hit or miss
No, it isn't. Implemented correctly it is completely reliable. But there are a couple (very easy) bases you have to cover or you'll have problems.
BERESHEIT
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post by Joakim Christiansen »

I didn't implement a preview mode yet, if there was a easy way where I could just scale the screen or something then it would be cool.
a screensaver should exits when any key is pressed (except the keys which
are used of course) - just my opinion :roll:
I'll try to make it that way then!
I like logic, hence I dislike humans but love computers.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Yea I always tap the "windows" button when i deactivate teh screensaver. I rarely touch the mouse.
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post by Joakim Christiansen »

Dracflamloc, done!
Now any other key closes it, just download it again!

Now I have to pounder with the preview stuff, booooring...
I like logic, hence I dislike humans but love computers.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Cool stuff. Pretty similar to the one most linux distros have!
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Terrific.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

A request though: Can you please have it not change the screen resolution and also work with dual monitors?
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 »

How to do the screensaver preview window
===============================

1. Get your DisplayHwnd from the ProgramParameter
2. Open a window with the #WS_CHILD style and set parent to DisplayHwnd
3. OpenWindowedscreen with AutoStretch set to 1.
4. Set your WindowCallBack to the proc shown

Code: Select all

Procedure PreviewCallback(hWnd, Message, wParam, lParam)
  Select Message
    Case #WM_CLOSE
      End
  EndSelect
  Result = DefWindowProc_(hWnd, Message, wParam, lParam)
  ProcedureReturn Result
EndProcedure

; Once you've determined that it's preview mode and you
; have the PreviewHwnd, do this:

GetClientRect_(DisplayHwnd, @PSize.RECT)
OpenWindow(0,0,0,PSize\right,PSize\bottom,"",#WS_CHILD,DisplayHwnd) 
OpenWindowedScreen(WindowID(0),0,0,width,height,1,0,0) 
SetWindowCallback(@PreviewCallback())     
Then just run your display code normally.

IMPORTANT:
Screen width and height are the same for preview and main display. You will get automatic scaling with the Autostretch parameter
set to true in your OpenWindowedScreen() command, so if your main saver window is 1024*768, open the windowed screen that same size.

Note that you're not processing PureBasic Events in the callback, you must ProcedureReturn the DefWindowProc.
Last edited by netmaestro on Sun Aug 06, 2006 6:17 am, edited 7 times in total.
BERESHEIT
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post by Joakim Christiansen »

Thank you netmaestro, i'll see what I can do!
I like logic, hence I dislike humans but love computers.
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post by Joakim Christiansen »

Beta 2 is out:
Added: Preview is now displayed
Added: A new explosion type
Fixed: Any other key closes it

Now I will try to tweak the fireworks and make it even nicer ;)
I like logic, hence I dislike humans but love computers.
Post Reply