Skip to content

trevlars/GameSphere

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,412 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GameSphere

A sleek, minimalistic game streaming client for Apple TV, built on the Moonlight streaming platform. GameSphere transforms your Apple TV into a powerful gaming console by streaming games from your PC with a beautiful, TV-optimized interface.

Features

🎮 Enhanced Gaming Experience

  • Elegant TV Interface: Clean, minimalist design inspired by modern gaming consoles
  • Seamless Navigation: Intuitive tvOS-native controls with smooth focus management
  • Left-Aligned Game Grid: Organized, easy-to-browse game library
  • Centered Category Navigation: Clean category browsing with hover effects
  • Hidden Titles Mode: Distraction-free game artwork display

⚡ Smart Connectivity

  • Automatic Wake-on-LAN: Automatically wake sleeping gaming PCs when launching GameSphere
  • Intelligent Host Detection: Smart discovery and management of gaming PCs on your network
  • Manual Wake Controls: On-demand PC wake functionality from settings

🎨 Beautiful Design

  • Transparent Backgrounds: Clean, modern interface elements
  • Focus-Driven UI: Elegant hover states and selection indicators
  • Minimalist Aesthetic: Distraction-free gaming focus

Enhanced Controller Support

  • Full Support: Xbox, PlayStation, and Nintendo Switch Online (NSO) controllers
  • NSO Controller Support: Native support for Nintendo Switch Online controllers including:
    • N64 Controller
    • NES Controller
    • SNES Controller
    • Genesis Controller
  • Seamless Integration: NSO controllers are automatically detected and configured
  • Button Mapping: Intelligent button mapping that translates NSO controller inputs to Xbox/PlayStation equivalents for maximum game compatibility

🎯 Recommended Integrations

  • Playnite Integration: GameSphere is recommended for use with Playnite, a powerful game library manager. For enhanced Playnite integration, check out PlayNiteWatcher which provides seamless connectivity and game management features.

Building

Requirements

  • macOS with Xcode 15+ installed
  • Apple TV (4th generation or later) for testing
  • Apple Developer account for device installation

Build Instructions

  1. Clone the repository:

    git clone --recursive https://github.com/your-username/GameSphere.git
    cd GameSphere
  2. Open in Xcode:

    open Gamesphere.xcodeproj
  3. Configure signing (for device installation):

    • Select "Gamesphere TV" target in Xcode
    • Go to "Signing & Capabilities" tab
    • Select your development team
    • Update the bundle identifier to something unique
  4. Build and run:

    • Select your Apple TV device as the target
    • Press ⌘+R to build and run

Inspiration

GameSphere's user interface design was inspired by the beautiful Hero Playnite Theme by @zeroantix. The Hero theme's minimalistic fullscreen approach and clean aesthetic provided excellent inspiration for creating an elegant tvOS gaming experience.

Wake-on-LAN Feature Details

GameSphere includes advanced automatic wake-on-LAN functionality that seamlessly wakes offline gaming PCs when the app launches. This feature uses intelligent host detection to send magic packets only when needed.

Automatic Wake-on-LAN

  • Automatic: When enabled, GameSphere will automatically send wake packets to offline PCs when the app launches
  • Configurable: Users can toggle this feature on/off in the settings
  • Manual Trigger: Users can manually wake offline hosts from the settings menu
  • User Feedback: Shows notifications when wake packets are sent
  • Smart Detection: Only wakes hosts that have valid MAC addresses and are currently offline

Settings Integration

  • Auto Wake Toggle: Located in Settings → Game Shortcuts → Auto Wake
  • Manual Wake Option: Located in Settings → Game Shortcuts → Wake Offline Hosts
  • Persistent Settings: User preferences are saved and restored between app launches

How It Works

  1. App Launch: When GameSphere launches, it starts host discovery
  2. Host Detection: After 3 seconds, the app checks for offline hosts
  3. Wake Decision: If automatic wake is enabled and offline hosts are found, wake packets are sent
  4. User Notification: A brief notification appears showing how many hosts were woken
  5. Manual Control: Users can manually trigger wake functionality from settings

Technical Implementation

Key Components

  • WakeOnLanManager: Uses existing Limelight wake-on-LAN functionality
  • GameShortcutsViewController: Main controller that handles automatic wake logic
  • GameSphereSettingsViewController: Provides user interface for wake settings
  • DiscoveryManager: Provides host discovery and status information

Key Methods

  • performAutomaticWakeIfEnabled(): Checks settings and triggers automatic wake
  • wakeOfflineHosts(): Finds and wakes offline hosts
  • wakeHost(): Sends wake packet to individual host
  • toggleAutoWake(): Handles user setting changes
  • handleManualWakeOfflineHosts(): Processes manual wake requests

Requirements

  • Gaming PCs must support Wake-on-LAN
  • PCs must be properly configured for Wake-on-LAN in BIOS/UEFI
  • Network must allow Wake-on-LAN packets
  • PCs must have valid MAC addresses stored in GameSphere

Usage

Enabling/Disabling Automatic Wake

  1. Open GameSphere
  2. Go to Settings (gear icon)
  3. Navigate to "Game Shortcuts" section
  4. Tap "Auto Wake" to toggle the feature
  5. The setting will show "ON" or "OFF" to indicate current state

Manually Waking Offline Hosts

  1. Open GameSphere
  2. Go to Settings (gear icon)
  3. Navigate to "Game Shortcuts" section
  4. Tap "Wake Offline Hosts"
  5. Wake packets will be sent to all offline hosts

Development

Logging

Comprehensive logging is included for debugging:

  • Host discovery and status checking
  • Wake packet transmission
  • User setting changes
  • Error conditions

Log messages are prefixed with "GameShortcuts:" for easy identification.

Contributing

This project builds upon the excellent Moonlight streaming technology. Contributions are welcome!

Future Enhancements

  • Wake-on-LAN scheduling
  • Individual host wake controls
  • Wake status monitoring
  • Network wake configuration
  • Wake history tracking

NSO Controller Support

Requirements

  • iOS 17.1+ or tvOS 17.1+ (for native NSO controller support)
  • Nintendo Switch Online controller (N64, NES, SNES, or Genesis)

Setup

  1. Put your NSO controller in pairing mode (hold the sync button)
  2. Connect via Bluetooth in your device's Settings
  3. Launch GameSphere - the controller will be automatically detected
  4. Look for the "✅ NSO Controller successfully configured" message in the logs

Button Mapping

NSO controllers are mapped to provide the best gaming experience:

  • N64 Controller:
    • A/B buttons → A/B
    • C buttons → Face buttons and shoulder buttons
    • Z button → Right trigger
    • L/R buttons → Left trigger/shoulder
    • Analog stick → Left stick
    • D-pad → D-pad

The controller will appear as a Nintendo controller type to the host PC, but inputs are compatible with Xbox/PlayStation controller schemes.

Troubleshooting

NSO Controller Not Detected

  • Ensure you're running iOS 17.1+ or tvOS 17.1+
  • Check that the controller is properly paired in Bluetooth settings
  • Look for detection messages in the app logs
  • Try disconnecting and reconnecting the controller

Button Mapping Issues

  • NSO controllers use a specialized mapping for optimal compatibility
  • The right stick on N64 controllers may be used for C-button functionality
  • All inputs are automatically translated to Xbox/PlayStation equivalents

Support

For NSO controller-specific issues, please include:

  • iOS/tvOS version
  • Controller model (N64, NES, SNES, Genesis)
  • Relevant log messages from the app

About

GameStream client for iOS/tvOS

Resources

License

Stars

3 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages

  • C 72.8%
  • Objective-C 24.8%
  • Swift 0.9%
  • C++ 0.6%
  • JavaScript 0.4%
  • Python 0.2%
  • Other 0.3%