Inspiration

Growing up, I've always loved using Google Maps. So much so that it became a game I often played with my friends. We would challenge each other to find our homes, schools, or favourite places as quickly as possible when placed in random locations. This playful interaction with maps sparked a passion for discovering new places, immersing myself in diverse cultures, and learning about their significance and history. However, I often found that traditional methods of learning about geography and culture lacked the gamification that could make the experience engaging and memorable.

This realization inspired me to create Globe Dash. I envisioned a location discovery game that could transform the way we learn about new places and appreciate the history and culture behind them. By gamifying the experience, I hope to inspire curiosity that transcends the game itself, leading to real-life exploration and experiences. Every location is more than just a pin on a map, it embodies a richness or history, culture, human experiences, and natural wonders waiting to be discovered.

What it does

Globe Dash is an interactive game that utilizes Google Maps Platform's Photorealistic 3D maps to create an engaging location discovery experience. Players can choose between three different game modes: Classic, Hidden Gems, and Continent Challenge. Each game mode has a set of instructions/prompts that are passed to Google's Gemini-1.5-pro generative AI model to provide tailored locations and bite-sized educational content.

  1. Classic Mode: Players race against the clock to identify well-known landmarks and locations as quickly as possible.

  2. Hidden Gems: Players are tasked with discovering lesser-known locations, encouraging exploration off the beaten path and discovering new locations.

  3. Continent Challenge: Players focus on each continent locations, racing against time to identify well-known locations unique to that region.

Difficulty Levels

Players can select a difficulty level: Easy, Normal, or Hard. Each difficulty level adjusts the game parameters:

  • Easy: 90 second time limit, map labels, wider movement range, and less altitude restriction.
  • Normal: 60 second time limit, map laps, and normal altitude restrictions.
  • Hard: 45 second time limit, no map labels, limited movement and high-altitude restrictions, making the gameplay more challenging and competitive.

Gameplay Mechanics

At the start of the preview one of two will happen. Either players receive a 30-second preview of the target location, accompanied by a polygon with a 3D map pin indicating the target location or a random location to throw players off during preview. The goal behind this is to encourage players to learn to be familiar with locations and their surroundings and not blindly trust the preview. During this preview, players also receive:

  • The target location name
  • A short description
  • Fun facts about the location -Cultural and historical significance

The ultimate goal is to reach the target location in the quickest time possible, encouraging not only speed but also knowledge retention about the places being explored, utilizing Google Maps Platform's Photorealistic 3D maps for an engaging 3D experience.

How I built it

The development process involved a combination of technologies and thoughtful design:

1. API Integration:

  • Google Gemini-1.5-pro: Utilized for generating location prompts and educational content, allowing for a dynamic and personalized gameplay experience.
  • Firebase: Implemented for user authentication, real-time data storage and tracking user progress, ensuring a seamless experience.
  • Google Maps Platform JavaScript Maps API: Used the API for rending the 3D maps and providing the camera controls and challenging gaming experience.

2. Frontend Development:

  • Framework: Buit using React with Vite for fast development and a smooth user experience.
  • Package Manager: used pnpm for efficient dependency management.

Challenges I ran into

  • API Costs: I initially considered using the Places API for location data but decided against it to avoid incurring hefty bills. An alternative was to rely on Google's Gemini-1.5-pro modal to generate the location data and run for validation on that data to ensure accurate target location data. This was a great solution and quite cost-effective.

  • Duplicate Location Generation: The Gemini API occasionally returned duplicate location data, which would get sent to the backends' location bank and resulted in players seeing the same location twice. To address this, I created a collection in firestore called locationHistory to track locations, preventing players from seeing the same location during a single game session. This was to enhance the game's location diversity and encourage replayability.

  • Rate Limiting: Managing the rate limits imposed by Gemini-1.5-pro was a challenge and was crucial as I relied heavy on the model's generation. At first, after each round a call to the API would be performed to generate the next location, but that resulted in hitting the rate limit faster. So, a second solution was generating a batch of location data into a location bank collection on firestore. This reduced the API calls, but I've also managed to add a global location bank collection to distribute the locations to players who have not played those locations yet. This helped in reducing having each player call to the API for new locations, as each player would first go through the global location bank and before reaching its threshold, we would generate new locations and add it to the global bank.

Accomplishments I'm proud of

  1. Gameplay Functionality: The core gameplay mechanics, including dynamic discovery and user engagement strategies, I've implemented effectively, creating a smooth and enjoyable experience for players.

  2. API Management: Not only was I able to utilize the Google's Gemini-1.5-pro effectively for my game, I was also able to avoid excessive API costs.

  3. Prompt Generation: I was able to use a prompt in such a modular and flexible way that could be easily updated and expanded without fully rewriting the entire codebase.

What I learned

Throughout the development of Globe Dash, I gained invaluable insights into various aspects of game development:

  • Game Development: I learned about the intricacies of designing engaging gameplay mechanics and maintain player interest.
  • Scalability: Developed strategies for scaling the application to accommodate a growing user base while managing performance.
  • Distributed Gameplay: Gained experience in creating a distributed gameplay environment that minimizes extra API costs and adheres to rate limiting, ensuring a reliable user experience.

What's next for Globe Dash

Looking ahead, I have several exciting plans for Globe Dash:

  • Multiplayer Mode: Introduce a cooperative multiplayer mode where players can play against players around the world or against their friends.
  • Custom Game Modes: Develop tailored game modes for educators or players who want to focus solely on one country, city, or region. This will enhance the educational aspect of the game.
  • Weekly Challenges and customization: Plan to introduce weekly challenges to keep the game fresh and exciting. As well as add player customization, which could range from adding your country flag on the leaderboard, achievement title and more.

Built With

Share this project:

Updates