MultiClock: a screensaver for macOS that displays the time using 24 clocks

Overview

MultiClock

MultiClock is a screensaver for macOS that displays the current time using 24 clocks. MultiClock is very configurable, with a variety of hand and dial styles and the ability to customize the color of each independently.

Preview

Note: This gif has a low framerate. The screensaver itself operates at a fluid 60 FPS.

Preview animation of MultiClock screensaver showing 24 clocks rotate to show the numbers 1234, then a pattern, before rotating back to midnight. Configuration sheet for the screensaver, showing customizable colors and alternate hand and dial designs

Download

FAQ

What about 24-hour time support?

If you have macOS set to 24-hour time, the screensaver will automatically use 24-hour time as well. (Well, it's supposed to, anyway...)

Development

  1. Clone the repo
  2. Open MultiClock.xcodeproj
  3. The 'macOS' build target allows you to preview the screensaver and control it manually. Take a look at the bottom of ClockScene.swift to see some keyboard shortcuts. Add your own to test out animations!

Adding Animations

If you'd like to add animations to ClockSaver, the public methods on the Animation class make it easy--they're very similar to SKActions. For example, a sequence of animations may look like this:

queue(animations: [
    Animation.display(pattern: inwardPointPattern),
    Animation.wait(duration: 5),
    Animation.positionBothHands(minuteDegrees: -45, hourDegrees: -225),
    Animation.spinBothHandsWithDelay(by: 180, delay: 0.2),
    Animation.currentTimeClock(),
    Animation.wait(duration: 5),
    Animation.positionBothHands(minuteDegrees: -225, hourDegrees: -225),
    Animation.positionBothHands(minuteDegrees: 0, hourDegrees: 0),
    Animation.currentTimePrint(),
])

Completed animations should go in ClockController.swift. Bump up the Int.random() call and add a new case to the switch. Then submit a PR if you think the animation is cool :)

Why are all the degree references in negative? Because I'm too lazy to go back and make them positive after reworking the animation system. Submit a PR fixing it, if you want!

Authors

Credits

MultiClock was inspired by ClockClock 24 by Humans since 1982.

Comments
  • Remove use of NotificationCenter

    Remove use of NotificationCenter

    I had a theory that the freezing part of this issue https://github.com/amiantos/multiclock/issues/6 was because of my use of NotificationCenter.default, namely that when firing the 'animationComplete' messages, they were being received by both instances of the screensaver, which made things get wonky. I didn't do anything to prove this theory, beyond the work of this PR.

    I removed any usage of NotificationCenter and replaced it instead with completion handlers. It seems like this fixed the issue with multiple instances of the screensaver as well as fixed a millisecond or two delay when progressing through the animation queue, which is a nice benefit. Overall much better to do it this way, though it did mean I had to add a bunch of completionHandler arguments to stuff in the Animation file...

    opened by amiantos 2
  • Screensaver v1.1 Prep

    Screensaver v1.1 Prep

    • change version number for screensaver to 1.1
    • fix offset modern (thick) dial
    • replace modern (indices) dial
    • replace shout hands
    • add LCD style hands
    • add traditional style hands
    • replace apple watch hands (new version has transparent center hole for bg color to show through)
    opened by amiantos 1
  • macOS target beeps on every keystroke

    macOS target beeps on every keystroke

    Consider adding to ClockScene.swift:

        /// without this, it beeps on every keystroke, recognized or not.
        override func keyDown(with event: NSEvent) {
          if let character = event.characters {
            switch character {
            case "c","o","p","q","r","t","w":
              break
            default:
              super.keyDown(with: event)
            }
          }
        }
    
    opened by DavidPhillipOster 1
  • Animation Improvements

    Animation Improvements

    Added some new patterns (including some random position generators) and animations... also removed the Int.random() call and replaced it with a preset array that is shuffled() at launch and then run through repeatedly, to avoid animations playing too frequently.

    enhancement 
    opened by amiantos 0
  • Add/improve animations

    Add/improve animations

    • some existing animations can be improved (check out how the inwardPointPattern resolves itself in the demo gif/video in the readme compared to how it resolves itself in the actual screensaver for an idea)
    • I'm sure there's plenty of cool animations and patterns to come up with and add
    enhancement 
    opened by amiantos 0
  • Erratic performance

    Erratic performance

    I'm not sure if it's just my MacBook, but when the screensaver is running on the internal Retina display, the frame rate and behavior can be really weird. Doesn't happen on the lower res external monitor. Maybe there's a memory leak or something? It's weird no one else has opened an issue about this, though...

    opened by amiantos 1
  • Dual Screen Issue

    Dual Screen Issue

    I have a dual screen via Display Link and my second Display Screen is a few miliseconds delayed. So I have observed that on one screen it was 9:19 and the second 9:20.

    opened by floriangrotz 5
  • Mac target builds with warnings

    Mac target builds with warnings

    After a build using git clone as of this writing, with the macOS target:

    multiclock/Shared/Nodes/Assets.xcassets:1:1: The image set "thumbnail" has 2 unassigned children.
    multiclock/Shared/Nodes/Assets.xcassets:1:1: The file "[email protected]" for the image set "thumbnail" does not exist.
    multiclock/multiclock/Shared/Nodes/Assets.xcassets:1:1: The file "Thumbnail.png" for the image set "thumbnail" does not exist.
    Ambiguous Content Group
    multiclock/multiclock/Shared/Nodes/Assets.xcassets: warning: Ambiguous Content: The image set "thumbnail" has 2 unassigned children.
    
    Missing Content Group
    multiclock/multiclock/Shared/Nodes/Assets.xcassets: warning: Missing Content: The file "Thumbnail.png" for the image set "thumbnail" does not exist.
    
    multiclock/multiclock/Shared/Nodes/Assets.xcassets: warning: Missing Content: The file "[email protected]" for the image set "thumbnail" does not exist.
    
    opened by DavidPhillipOster 1
Releases(screensaver-1.1)
Owner
Brad Root
👨🏼‍💻 Software Engineer. For fun, I design and build open source software for Apple platforms. For money, I work on Lingo for @TheNounProject.
Brad Root
Kill The Snake - second life for all time classic game

KillTheSnake Kill The Snake - second life for all time classic game Snake is almost 40. It was cloned many times, but core rules remained about the sa

Valery Sigalov 0 Oct 25, 2021
Chess Timer - Time calculation application developed for chess game

Chess Timer Satranç oyunu için geliştirilmiş süre hesaplama uygulaması

Nurşah ARİ 0 Jan 8, 2022
Snake implemented in SwiftUI for macOS

Snake Snake implemented in SwiftUI for UI. Inspired by this amazing tweet. Live Streams I did all of this will streaming. Here are links to those stre

Sam Soffes 19 Apr 5, 2022
PlayCover is a project that allows you to sideload iOS apps on macOS( currently arm, Intel support will be tested.

PlayCover Run iOS apps & games on M1 Mac with mouse, keyboard and controller support. Intel macs support will be implemented later. Installation Just

Alexandr 3.9k Jun 30, 2022
3D Shoot'em Up written with OpenGL ES 1.1/2.0 running on iOS, Android, Windows and MacOS X.

SHMUP This is the source code of "SHMUP" a 3D Shoot 'em up that I wrote in 2009. It is very inspired of Treasure Ikaruga, the engine runs on iOS, Andr

Fabien 242 Dec 16, 2022
2D ECS game engine in 100% Swift + SwiftUI for iOS, macOS, tvOS

OctopusKit A 2D game engine based on ECS and written in 100% Swift for iOS, macOS and tvOS. If you've tried making a game in Swift while sticking to t

null 335 Dec 12, 2022
PokaPlayer's native client for iOS and macOS

PokaNative PokaPlayer's native client for iOS and macOS Installation Get the ipa file from Releases. Use some software like AltStore to install the ip

PokaPlayer 5 Feb 12, 2022
GameOfLife for macOS in Swift & SwiftUI

GameOfLife John Conway's Game of Life for macOS written in Swift & SwiftUI. Start with a random grid Choose the grid dimenssion Adapt the grid dimensi

null 2 Aug 30, 2022
Cards - A SharePlay enabled card game for iOS & macOS

Deal ♣️ Overview A simple demo app showing the implementation of a card game acr

Oliver Binns 5 Jul 3, 2022
A peer-to-peer rock, paper scissors game for iOS and macOS

RPS - Rock, Paper, Scissors! Source code for my first SwiftUI tutorial. RPS utilizes the MultipeerConnectivity framework to connect devices directly w

Joe Diragi 3 Nov 14, 2022
The iOS version of 2048, made using SpriteKit

2048 This is a derivative and the iOS version of the game 2048. In the very unlikely case that you don't know what it is, you can check it out here. M

Danqing Liu 1.1k Dec 31, 2022
Simple memory game written in Swift 4 using VIPER Architecture.

Viper Memory Game Simple memory game written in Swift 4.2 using VIPER Architecture. The Memory Game is a deck of cards where the user needs to find ma

Mati 23 Jun 6, 2022
A game developed using UIViewPropertyAnimator

Save the Dot Apple introduced UIViewPropertyAnimator for iOS 10. We can use this new API to control interactive animations. To experiment UIViewProper

Jake Lin 805 Nov 12, 2022
A Component Piece (a game) for a larger app (KoyaQuest) using SpriteKit

NyonindoChallenge This is a game that is intended for inclusion in a larger app (called KoyaQuest). I have created a separate version because of probl

null 0 Oct 25, 2021
A Peggle game implemented in swift using UIKit

Ocean Peggle Author: Tian Fang This is a Peggle game implemented in swift using UIKit. Credits octopus png from pngtree.com pumpkin png from pngtree.c

Tian Fang 1 Mar 8, 2022
🎯 Bull's Eye is the simple game which is consist in guessing the random number (1 ... 100) by using a slider.

The very first project made in ?? Swift language called Bull's Eye. ?? Bull's Eye is the simple game which is consist in guessing the random number (1

Wiktor 0 Nov 14, 2021
The Classic game TicTacToe made using SwiftUI and MVVM architecture

The Classic game TicTacToe made using SwiftUI and MVVM architecture

Mehrdad 0 Oct 20, 2022
BabySortingToyGame - Build a little game for babies to sort shapes in the correct location. This is made in SwiftUI using drag gestures.

This is a demo to build a little mini-game "for babies". It's inspired in this kind of games:

Pedro Rojas 17 Oct 23, 2022
Gamer-s-Collection - An app for searching and saving favorite games using rawg.io api and Core Data

Gamer-s-Collection - An app for searching and saving favorite games using rawg.io api and Core Data

Rıdvan İmren 1 Aug 19, 2022