A web rhythm game. Play the game online: stable branch, master branch.
On desktop, any modern browser should work, and any browser-specific issues are considered bugs and should be reported.
On Android, any modern browser should largely work but may not have good enough WebGL performance for the game to run smoothly. Recommended browsers are WebView-based browsers, and examples include Fulguris, Via, Opera GX, etc.
On iOS, any browser that you can get from App Store probably
have good enough performance for the game to run smoothly,
but there is a bug in the WebKit engine used by Safari and most browsers
on iOS that makes the game hardly playable
(to elaborate, when a touchend event and a touchstart event should happen at roughly the same time,
the touchstart event may not be fired at all).
Fortunately, some of the WebView-based browsers on iOS do not have this bug,
and examples include Via and QQ browser.
Reporting more examples to be included here is appreciated.
The master branch is currently under active development, so it probably has some undiscovered bugs. To ensure that players' gaming experiences cannot be easily affected by the development, the stable branch is used to keep an old version of the game that has been extensively tested and is considered to have no major bugs. Both versions are live on the website: /game for the stable branch and /game-unstable for the master branch.
New features and insignificant bug fixes are only added to the master branch. Only significant bug fixes will be backported to the stable branch.
Note
If you play the game in this way, you still need internet access. However, a feature to use a vendor in place of a CDN for external scripts may be added in the future to allow full offline usage.
Install Ruby, and then run
git clone --recursive https://github.com/sunniesnow/sunniesnow.github.io.git
cd sunniesnow.github.io
bundle install # and resolve all errors if there are any
JEKYLL_ENVIRONMENT=production bundle exec jekyll serve --host 0.0.0.0 --port 4000Now, visit http://localhost:4000/game/ to see the game.
You can also build the static files by running bundle exec jekyll build.
You can see the built files in the _site directory.
Note
Because Imgur blocks requests with Origin being localhost,
when testing related features (e.g. Discord Rich Presence),
you may want to use a different hostname instead of localhost
to access the locally served site.
Note
You can enable HTTPS support by setting JEKYLL_SSL=1 and trusting the generated certificate at _ssl/ca.crt in the browser.
The generated server certificate can be used to enable HTTPS
with the hostname jekyll.local,
which you can use some custom DNS resolver to resolve to 127.0.0.1.
You can change the hostname by modifying _ssl/*.cnf files
and deleting the previously generated _ssl/server.* files.
The entrypoint script can be found at _head.html.
The reason to use ScriptsLoader to load scripts dynamically
instead of traditionally using require or import to manage modular codes
is to make plugins easier to handle.
Some scripts need to be evaluated multiple times due to changing plugins,
and having a ScriptsLoader module to manage this makes it easier.
There are two main logics: the DOM main logic and the game main logic.
The main function of the DOM main logic is Sunniesnow.MiscDom.main(),
and the main function of the game main logic is Sunniesnow.Game.run().
I do not think anyone would want to do this, but it is possible to run Sunniesnow in Node.js environment. Look at the source codes of sunniesnow-record for reference.
Sunniesnow is licensed under AGPL-3.0-or-later.
Sunniesnow has no relation to the game Lyrica by any means, nor does it contain any proprietary assets from Lyrica.
The open-source projects used by Sunniesnow:
- PixiJS (MIT),
- JSZip (MIT or GPL-3.0),
- Mime (MIT),
- audio-decode (MIT),
- marked (MIT),
- DOMPurify (Apache-2.0 or MPL-2.0),
- LiquidJS (MIT),
- wangfonts (GPL-2.0),
- Yuji (OFL-1.1),
- LXGW WenKai (OFL-1.1),
- Noto fonts (OFL-1.1),
- vConsole (MIT).
Sunniesnow's source codes do not contain any files from the above projects. Sunniesnow uses them by letting the client download needed files from public CDN sources.