itch.io is community of indie game creators and players

Devlogs

Gareth's Dev Log #4: Bringing Mobile-Friendly Gameplay to the Browser

Career Quest
A browser game made in HTML5

Introduction

As we approach the finish line, I’m proud of what we’ve accomplished. While time constraints meant postponing some features, we’ve created a small but functional game that effectively showcases our original concept.

One tough decision was to delay publishing to the Google Play Store. However, I found a way to utilize our mobile-friendly controls for a browser-based gaming experience on mobile devices, ensuring players can still enjoy the game on their phones.

Goals

  • Implement a detection system to identify mobile web browsers.
  • Enable mobile controls for an optimized browser-based gaming experience.

Steps Taken to Detect If Game Is Running On Mobile

To provide a seamless experience for players using mobile browsers, I implemented a detection system that dynamically adjusts the game’s interface and controls.

1. Setting Up MobileDetection.jslib

2. Integrating MobileDetector in Unity

3. Adapting Gameplay for Mobile

  • Wherever device-specific adjustments were needed, I referenced the MobileDetector and its IsRunningOnMobile() method.
  • With these changes, the game now recognizes when it’s being played on a mobile browser and adjusts the interface to include the mobile controls we previously developed.

Closing Thoughts

While we couldn’t meet all our initial goals, I’m thrilled that players can still enjoy our game on mobile devices via web browsers. This workaround allows us to showcase our mobile-friendly design and keeps the game accessible to a wider audience.

Moving forward, I’d like to revisit publishing on the Google Play Store, as it remains a key milestone for Career Quest. For now, I’m proud of the progress we’ve made and the lessons learned along the way.

Leave a comment