OFFLINE ACCESS
FairFate is a level 99 Robotic Supreme Overlord Wizard which requires no internet to operate properly.
I’m showing my age, but I can remember the first Flash Games on the web. That we could play them offline, or with the worst internet known to mankind, kinda baffles me.
I wanted to reproduce this, so much like Spotify’s PWA for offline music listening, I added an Offline Sync function. It means you can access your favorites anytime, anywhere, with or without an internet connection. It should sync through to all your devices, with no need for a separate app (unless????).
YOUR OFFLINE LIBRARY
From your library, you can download any game you own. All the necessary data, from the game details to the actual game files and assets, are fully available for offline use. You’ll have a downloads manager and everything else you need to swap in and out of current campaigns or supplements you’re using. Store and track your progress! Never again will you miss a solo journaling entry due to travel or internet outages, never again will your forgetful players show up without their character sheets.
KEY FEATURES
More than just a simple download button, the Offline Sync is a suite of powerful, coordinated services.
-
Smart Caching and Storage: The system manages your device’s storage efficiently. It monitors your available space (
StorageQuotaService) and can even request persistent storage for more reliability. When space gets low, it uses smart eviction strategies (like LRU - Least Recently Used) to automatically clear out old data (CacheEvictionService). -
Download Manager: You have complete control over your downloads. The
DownloadQueueServicelets you see what’s downloading, pause or resume the queue, set priorities for different items, and track real-time progress. -
Automatic Background Sync: When you’re offline, you can use your games as normal. Once you reconnect, the
BackgroundSyncServiceworks quietly in the background to sync any updates or changes, ensuring your library is always up-to-date.
CONFIGURATION & CONTROL
You’re in control of your offline experience. The OfflineConfigService provides a settings area where you can manage your preferences, such as setting a maximum cache size, choosing an eviction strategy, and deciding if downloads should only happen over Wi-Fi.
NETWORK IMPACT
I had mentioned earlier that Service Workers if used correctly would contribute significantly to reducing server calls and device power consumption.
Servers:
- Fewer Server Requests: A Service Worker acts like a proxy on the user’s device. When you revisit a site, instead of fetching assets like logos, fonts, and stylesheets from the server again, the Service Worker intercepts the request and serves the file directly from a local cache on your device.
- Less Server Workload: Every request a server has to handle—finding a file, processing data, and sending it back—consumes electricity. By serving assets from the cache, the server doesn’t have to do this work. This reduces the server’s CPU load, which in turn lowers its energy consumption and, by extension, the carbon footprint of the data center.
- Less Data Transfer: Sending data across the internet requires energy at every step: from the data center to network routers, through undersea cables, to cell towers, and finally to the user’s device. By caching files locally, Service Workers minimize this data transfer, saving energy across the entire network infrastructure.
Devices:
- While the impact is most significant on the server side, Service Workers also help reduce power consumption on the user’s own device (like a phone or laptop).
- Wi-Fi and Cellular: The most power-hungry components in mobile devices are often the Wi-Fi and cellular (4G/5G) parts. Activating these to send and receive data drains the battery. By serving content from the local cache, the Service Worker avoids waking up these networks, conserving battery life.
- Faster Page Loads: Because the device isn’t waiting for the network, pages load almost instantly. This means the screen and processor are used for a shorter period to complete the task, contributing to a small but a reduction nonetheless in power use.
Discussion
No comments yet. Be the first to share your thoughts!