How do I create a windows screensaver?

0 favourites
  • 4 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Hi!

    I know there are some screensavers able to show webpages. Someone uploaded one to the forums a long time ago. But this time I'm trying to make a standalone windows screensaver. It is simply a nw.js windows app I rename as ".scr" (instead of ".exe").

    These are the things I have managed to solve:

    1) the app has to be maximized -- I solved it with nwjs maximize action.

    2) Keyboard press / mouse move detection has to be built into the program -- I solved it by storing mouse.AbsoluteX and mouse.AbsoluteY and comparing distance() travelled from stored values to current ones, but I had to add a delay between nwjs maximize action and mouse position storing. Keyboard press and touch events are easier to detect.

    3) On any event from (2), screensaver window has to close. It took me some time to imagine where to find the window close action. It is on browser object. Nice to know that,... The main reason I never made apps for tizen was I had to include a close action, and I didn't where to find it.

    Here are the things I can't manage to solve:

    4) Configuration screen. It is called with a special command line argument ("/c" or "/c number"), but nwjs doesn't have a method or value to return command line arguments.

    5) Attach to hwindow. When a screen saver preview is requested by user in desktop configuration menu, the program recieves an hwindow as command line argument. In case I solve (4) and want the screensaver be able to show a test version on the desktop configuration menu, I should be able to attach nwjs.window to a given hwindow, or at least detect hwindow position and size to mimickize it.

    Is there some plugin to make (4) or (5) possible?

    EDIT -- I removed some uppercase.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You're better off querying Google/asking StackOverflow this question.

  • Ok. I've read about nvjs argv:

    I expected someone made a plugin so i didn't need to manually alter javascript code sent to nwjs.

  • People still use screensavers? Invest your time into something more useful imo.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)