Fishing

Video:

http://www.youtube.com/watch?v=RclcgR2XTss&feature=youtu.be

Concept:

In this project we are creating an experience that mergers the viewers online identity via facebook profile with an interactive aquatic fishing environment. The viewer will be able to log in to facebook and generate a representative fish that will swim around a virtual in a manner dependent upon the viewers likes and interests on their facebook profile. They will be able to interact with this fish in various physical ways including using a fishing pole to attempt to catch their fish and other fish in the pond.

Process:

  API’s,getting and parsing data:

   Since the IMDB api is really slow. We pre-fetched the movie/tv/game imdb information and store it in our own server. We use Facebook’s javascript api to allow users to login and give us their likes. With the user’s facebook likes, we query our copy of the imdb database if the like is a movie, game, or tv show to get the rating, # votes, year of that title. Alternatively, if the like is a music artist, we use the last.fm api to get the number of listeners and playcount for that artist.

The following is how we calculate the mainstream value from the likes:
foreach movie
mainstream_val += (rating/movie_top_rating + votes/movie_top_votes)/2
foreach tvshow
mainstream_val += (rating/tvshow_top_rating + votes/tvshow_top_votes)/2
foreach game
mainstream_val += (rating/game_top_rating + votes/game_top_votes)/2
foreach artist
mainstream_val += (playcount/music_top_playcount + listeners/music_top_listeners)/2;
mainstream_val /= numlikes;
We then use ajax to send the user’s facebook uid, their name, mainstream value, and fish color they’ve selected on the login page to a database which can be queried by the processing application. The processing application sends the server the id of the last fish it received the the server can send back only new fish that have been added since that id was seen. The server sends this request for new fish every second or so concurrently with the drawing of the fish so there is little delay between the user’s facebook submission and the fish being added.
Fish algorithm:
   The fish are rendered via an algorithm made by Nicolas Tang (found on openProcessing). If the fish are within a radius of 350 pixels from the lure, we use an update_angle function to steer them towards the lure. We also adjust their speed such that they will quickly proceed towards the lure, but slow down when they get close to it.
   Fish may like some lures more than others(based on mainstream value). If they like the lure, they will swim towards it faster.To prevent the fish from swimming off of the screen, they are programmed to detect each edge (top, bottom, left, and right). If the fish is too close to an edge and its angle indicates it is moving closer, the fish will decelerate. Once the fish’s speed reaches a minimum, we use the update angle function to steer them towards the center.
This entry was posted in Project 3, Uncategorized. Bookmark the permalink.

Leave a Reply