Releasing HTML5 Games for Windows 8

Book description

Windows 8 presents an incredible opportunity for distributing and monetizing HTML5 games, and this guide shows how you can profit from it. You’ll learn everything you need to know about porting your original web-based JavaScript game to the new "touch-first" version of Windows, as well as several options for selling your game in Windows Store.

Windows 8 is a big leap forward for developers because it treats HTML5 as a first-class citizen, alongside C# and C++. Interactive development expert Jesse Freeman explains how Windows 8 works, gets you started with Visual Studio Express (it’s free!), and uses a case study to show you how to port an HTML5 game with ease.

  • Learn which games and JavaScript libraries work best on Windows 8
  • Adjust artwork for different screen resolutions and Windows 8 features
  • Accommodate mouse, keyboard, touch, and other game controls
  • Optimize your game to run well on any Windows 8 device
  • Understand the steps for publishing your game to Windows Store
  • Explore fixed price, trial mode, ad support, and in-app purchase options
  • Use a web-first workflow to ensure your game runs on many other platforms

Publisher resources

View/Submit Errata

Table of contents

  1. Releasing HTML5 Games for Windows 8
  2. Dedication
  3. Preface
    1. Audience
    2. Assumptions This Book Makes
    3. Conventions Used in This Book
    4. Safari® Books Online
    5. How to Contact Us
    6. Acknowledgments
  4. 1. Getting Started with Windows 8
    1. Why Windows 8
    2. What You Need
    3. Windows 8 Hardware
      1. Devices
    4. Windows 8 Versus Windows RT
    5. Introduction to Windows 8
      1. Live Tiles
      2. Charms
      3. Settings
      4. Windows Store
      5. Shortcuts
      6. Windows 8.1
      7. BizSpark and DreamSpark
  5. 2. Getting Started with Visual Studio
    1. What Games Work Best
    2. Introduction to Visual Studio Express
    3. Understanding Visual Studio Project Structure
    4. Moving Your Code Over
    5. Understanding the App Lifecycle
    6. Running Your Game for the First Time
    7. Tips and Tricks for Running Your Game on Windows 8
      1. Disable Touch Behaviors via CSS
      2. File Paths and Loading Locally
      3. Avoid Modernizr Libraries
  6. 3. Screen Resolution and Artwork
    1. Windows 8 Resolutions
    2. Scaling Games for Full Screen
    3. Understanding Snap View
    4. Upscaling Artwork
    5. Designing for Multiple Resolutions
    6. Live Tiles
    7. Splash Screen
    8. Tips and Tricks for Working with Artwork on Windows 8
      1. Use Sprite Sheets or Texture Atlases
      2. Render for Native Resolution
      3. Handling Edge Cases
      4. Set a Maximum Resolution
  7. 4. Handling Game Controls On Windows 8
    1. Working with Traditional Input
    2. Working with Touch
    3. Working with Controllers and Game Pads
    4. Knowing When to Use What
    5. Tips and Tricks for Windows 8 Game Input
      1. Contextual Controls
      2. Avoid Configuration Screens
      3. Instruction Screen
  8. 5. Debugging and Optimization
    1. Using the Console
    2. Debugging and Breakpoints
    3. DOM Explorer
    4. Remote Debugging
    5. Optimizing Graphics
    6. Optimizing Code
    7. Optimizing for the Lowest Common Denominator
    8. Tips and Tricks for Further Optimization
      1. Debug Builds Are Slower Than Production Builds
      2. Avoid Multiple Draw Calls to the Canvas
      3. Use Best Practices
  9. 6. Publishing Your Game to the Windows 8 Store
    1. Reserving Your Game’s Name
    2. Submitting Your Game with Visual Studio
    3. Creating Collateral for Your Game
    4. Submitting Updates and New Releases
    5. Reviewing Your Game’s Stats and Ratings
    6. Tips and Tricks for Publishing a Game to the Windows Store
      1. Privacy Policy
      2. Setup Capabilities
  10. 7. Monetization
    1. Setting a Fixed Price
    2. Trial Mode
    3. Incorporating Ads into Your Game
    4. In-App Purchase
    5. Tips and Tricks for Monetization
      1. Promote Your Game
      2. Incentivize Players to Upgrade from a Trial
      3. Get People to Rate Your Game
      4. Make Compelling IAP Options
      5. Get Reviews
  11. 8. Back to the Web
    1. A Web-First Workflow
    2. Setting Up a Local Web Server
    3. Using Node.js
    4. Project Structure
    5. Modifiying the Default JavaScript File
    6. Tips and Tricks
      1. Modularize Your Code
      2. Test Regularly
      3. Use Automation
  12. 9. Case Study: Heroine Dusk
    1. About the Game
    2. Getting Started
  13. 10. Windows 8 Resources
    1. Port to Windows 8 Task List
      1. Mandatory
    2. WinJS App Lifecycle
    3. Windows Store JavaScript Samples
      1. Live Tiles
        1. Visual Studio Sample
      2. Flyout Panels
        1. Visual Studio Sample
      3. Loading/Saving to Local File System
        1. Visual Studio Sample
      4. Accelerometer Support
        1. Visual Studio Sample
      5. Pen Support
        1. Visual Studio Sample
      6. Splash Screen
        1. Visual Studio Sample
      7. Dialog Boxes
        1. Visual Studio Sample
      8. Trial and In-App Purchase
        1. Visual Studio Sample
    4. Installing Windows 8 on a Mac
  14. About the Author
  15. Colophon
  16. Copyright

Product information

  • Title: Releasing HTML5 Games for Windows 8
  • Author(s): Jesse Freeman
  • Release date: November 2013
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781449360467