Snake on a Globe

Posted In: Fun | Game | Geography

Navigate the globe to the specified cities eating as many apples as you can

I coded a unique twist on the classic snake game, Snake on a Globe, where your mission is to eat as many apples as you can when given their location and find the best ways to navigate the globe.

The game includes the largest cities in the world and tests your geographical knowledge about country and city locations. Your challenge is to move to the next apple and city in the most efficient manner, moving only along lines of longitude or latitude. But remember you are on a sphere so you can move around the globe in any of four directions: over the poles and east and west.

Instructions

  • Use the arrow keys (or WASD or IJKL) to move up, down, left and right along the lines of longitude and latitude to try to get to the named city.
  • The score increases for each apple you eat and there are extra bonus points for the largest cities. For each apple you eat, your body gets longer
  • The game calculates the least number of steps to move between one apple and the next and your score will start to decline once you exceed this number of steps. The game will remind you that your score is going down because it will be shown in red.
  • The game ends when your score goes to zero (i.e. you took too long to eat an apple) or if you collide with your own body. One caveat is that you can cross over the poles without hitting your own body if you are on a different line of longitude.
  • See how many apples you can eat and whether you can get a high score.
  • Sources and Tools:
    The list of cities and their population is from Simplemaps. The game is coded with Three Globe and Three.js, 3D javascript libraries in javascript and HTML and CSS.

    Snake on a Globe game




    2 Comments »


    2 Responses to Snake on a Globe

    1. Ryan K says:

      Needs a way to speed up the game.
      Also needs a way to pause

    2. davo says:

      feature request: option to disable the sound

    Leave a Reply

    Your email address will not be published. Required fields are marked *