Giter Site home page Giter Site logo

amiantos / lifesaver Goto Github PK

View Code? Open in Web Editor NEW
210.0 8.0 10.0 9.32 MB

Conway's Game of Life implemented as an artistic, abstract macOS screensaver and tvOS app using SpriteKit

Home Page: https://amiantos.net/lifesaver

License: Mozilla Public License 2.0

Swift 97.89% Shell 0.26% Rich Text Format 1.11% Ruby 0.74%
conways-game-of-life spritekit gamekit game-of-life screensaver macos abstract visualization artificial-life art tvos conway conway-game gameoflife

lifesaver's Introduction

Life Saver

Life Saver is an abstract, artistic implementation of Conway's Game of Life built with SpriteKit. With a variety of settings and color schemes, Life Saver should satisfy designers and geeks alike. Comes in two flavors: a macOS screensaver, and an Apple TV app.

🖥  Screensaver

📼 Watch a YouTube video to see it in action.

Life Saver Screensaver

📺  Apple TV

Life Saver tvOS Main menu Life Saver tvOS Preset menu

To Install from Source

  1. git clone https://github.com/amiantos/lifesaver.git
  2. Open Life Saver.xcworkspace
  3. Pick a target and run!

lifesaver's People

Contributors

amiantos avatar lordlycastle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lifesaver's Issues

High CPU Usage by legacyScreenSaver Process on MacBook M1 After Sonoma 14.X Update

Environment:

  • Device: MacBook M1
  • OS: Sonoma 14.X
  • Application: LifeSaver Screen Saver

Issue Description:
After updating my MacBook M1 to Sonoma 14.X, I've started experiencing an issue with the LifeSaver screen saver causing excessive CPU usage. Specifically, the legacyScreenSaver process consumes over 100% CPU. This issue began immediately following the OS update.

Steps to Reproduce:

  1. Update the MacBook M1 to Sonoma 14.X.
  2. Use LifeSaver as the screen saver.
  3. Observe the legacyScreenSaver process's CPU usage in Activity Monitor.

Expected Behavior:
The legacyScreenSaver process should not consume excessive CPU resources, allowing the screen saver to run smoothly without impacting system performance.

Actual Behavior:

  • The legacyScreenSaver process exceeds 100% CPU usage when the LifeSaver screen saver is active.
  • Restarting the MacBook and changing the screen saver temporarily resolves the issue, but it reoccurs when switching back to LifeSaver.
  • It appears that the screen saver might be causing the legacyScreenSaver process to persistently use CPU resources in the background, even when not active. Additionally, entering the screen saver seems to compound the CPU usage each time, suggesting possible resource allocation or release issues.

Troubleshooting Steps Taken:

  • Changed the screen saver to default
  • Restarted the MacBook M1 or kill process 'legacyScreenSaver-x86_64'

Request:

  • Could the compatibility of LifeSaver with Sonoma 14.X on MacBook M1 be investigated?
  • Is this issue observed on other Mac models, particularly those not using Intel processors?

Additional Information:

  • This problem was not present before the Sonoma 14.X update, indicating a potential compatibility issue with the new OS version.

Thank you for your attention to this matter. I look forward to any updates or suggestions for resolving this issue.

SCR-20240228-qigr

Hue Integration

It might be cool if Life Saver TV integrated with Hue lights, changing hue lights around the TV to match the dominant colors on the television.

Preset randomizer

Might be cool to have a setting that randomizes between color presets and/or setting presets

Optimization

I could reduce memory usage by sharing the SKTexture between all nodes. 🤦‍♂

PKG seems to be built in unexpected way

While trying to unpack lifesaver-1.1.pkg I'm getting following error:

% pkgutil --expand lifesaver-1.1.pkg ./lifesaver
pkgutil(37305,0x11926a5c0) malloc: can't allocate region
*** mach_vm_map(size=255086697644032) failed (error code=3)
pkgutil(37305,0x11926a5c0) malloc: *** set a breakpoint in malloc_error_break to debug
[1]    37305 abort      pkgutil --expand lifesaver-1.1.pkg ./lifesaver

Sometime you run in environment there you can't provide administrator user and password. For such environments you would use screensaver name.saver file to install it only for local user. This is I'm trying to unpack your wallpaper.

Optimize Neighbor Generation

With the optimization from #8, Life Saver could support even greater quantities of nodes, however the CPU bottleneck on launch for neighbor generation is huge. If I use the looping matrix from Ant Saver, it may greatly speed up neighbor generation.

Visual glitches / issues

I think due to general bugginess with SpriteKit, there's some wonkiness with certain color combos or just in general. I see blocks switching their colors without fading in, stuff like that.

Bloom Effect

It would be cool if a bloom effect could be added to living cells. If you use the "Noun Project" preset and squint from a distance it looks a bit like the effect in LIMBO, looks really cool. I tried a quick implementation using an SKEffectNode but handling all the fading and animations seems trickier than expected.

Does not work with MacOS 12.2.1

After the latests upgrade to MacOS 12.2.1, Lifesaver no longer works and instead gives a messages as screensaver that this screensaver doesn't work with this version of MacOS and to please contact the author.

Unsure if this is relevant too (and unable to check), I am running an M1 chip.

tvOS Version

  • Might be cool to expand the tvOS version with a full tvOS UI

Implement Hashlife

It might be fun to try to learn how hashlife works and implement it for even more optimization

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.