Giter Site home page Giter Site logo

pokehunter's Introduction

PokeHunter

PokeHunter is a web application inspired by the popular Pokemon Go app. The objective is to explore the world and catch all 150 Pokemon. A special message will appear after catching all the Pokemon. ๐Ÿ˜ƒ

PokeHunter was built by Joyce Chau and Kenneth Truong.

pokehunter

Example Features

Catching Pokemon

catching pokemon

Caught Pokemon

caught pokemon

Architecture and Technologies

The project was implemented with the following technologies:

  • React for overall structure and DOM manipulation
  • Google Maps API for displaying the world map
  • Vanilla Javascript and jQuery for additional DOM manipulation
  • Webpack to bundle and serve up the various scripts
  • Cloudinary for image storage

Technical Implementation

2 days were dedicated to researching and integrating the Google Maps API. Custom markers, info windows, and additional overlays were added to the map.

Snippet of adding Pokeball markers to the map:

addPokeballMarker(map) {
  const randomPokeball = POKEBALL_MARKERS[Math.floor(Math.random() * POKEBALL_MARKERS.length)];
  const lat = Math.random() * (MAX_LAT - MIN_LAT) + MIN_LAT;
  const lng = Math.random() * (MAX_LNG - MIN_LNG) + MIN_LNG;
  const pokeballMarker = new google.maps.Marker({
    position: { lat, lng },
    icon: randomPokeball,
    map: map
  });

  this.pokeballs.push(pokeballMarker);

  pokeballMarker.addListener('click', () => {
    pokeballMarker.setMap(null);
    this.pokeballs.splice(this.pokeballs.indexOf(pokeballMarker), 1);
    this.addPokeballMarker(map);
    this.pokeballs.forEach((pokeball) => pokeball.setMap(null));

    const markerLat = pokeballMarker.getPosition().lat();
    const markerLng = pokeballMarker.getPosition().lng();

    map.panTo({ lat: markerLat, lng: markerLng });
    map.setZoom(10);
    this.addPokemonMarker(map, markerLat, markerLng);
  });
}

pokehunter's People

Contributors

joycechau avatar kennethtruong avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.