While sitting and eating pizza during the first day of Winter Wonderhack, we talked about an idea of having an automated process that generates an image based on shapes. After discussing the idea more, it evolved to an idea for a site that will randomly select pictures and let groups vote on which of the randomly selected pictures should go into a final image.
What it does
Using random images based on several keywords, Randy-Draw will piece together the images into one image, based on user choices of what should go where.
The goal of randy-draw is to create an entertaining and funny experience to have with friends. Due to the odd nature of a lot of the combinations of images, it is very fun to share images generated with it for a good laugh.
The first person to join a drawing becomes the host, meaning that they control the "next" button. Everyone who joins after is a guest. All guests and the host get to select which of the randomly generated options they like the most. When the host clicks "next", the option with the most votes will get put in the final picture.
How we built it
- Python/Flask backend that determines images, locations, size, and stretch factor
- Communication though websockets through socket.io for realtime response and cross-user communication
Challenges we ran into
- Can't easily get a list of images based on keywords from Google Images or another search engine
- Certain images can take a while to load, and it's difficult to make the UI feel correct when this happens
- Some sites don't like links to their images, and will fail to load on the client. Without checking this server-side while scraping, there is no easy was around this.
Accomplishments that we're proud of
- Scraping Google images
- Generating some pretty silly pictures
What we learned
- Working while tired is difficult
- Starting earlier than the last day of the hackathon is probably a good idea
- Google doesn't have a public search API
- It's hard to deploy to Heroku when using socket.io with Python
- When scraping links from a website, check that they work before storing them (although it may take much longer)
What's next for randy-draw
A lot of user experience improvements. There are a few things that feel a bit unnatural (images loading unexpectedly, some things not loading). The host should probably be able to see the status of votes. There also needs to be a lot of code cleanup. A lot of the code was written when tired and just trying to finish quickly so that we could get rest.