Inspiration

The inspiration for GUESS THE FACE came from my interest in visual memory and the thrill of fast-paced reaction games. I wanted to create a game that challenges players' ability to recognize faces quickly while adding difficulty through different poses, styles, and angles. This game tests memory, focus, and reaction time in a fun, engaging way.

What it does

GUESS THE FACE presents players with a sequence of faces. The goal is to click the button when the same face reappears. If you successfully identify a matching face, you gain an extra life. If you fail to make at least one correct guess within 60 seconds, you lose a life. Players have three lives, and if they lose all lives, the game ends. Faces with different poses, angles, or styles are counted as different images, adding complexity. To prevent cheating, the guess button disappears for 3 seconds after each click.

How I built it

I used a set of 1,200 unique faces of both Indian and world celebrities to ensure a diverse range of appearances. One of the most challenging aspects was programming certain faces to reappear after a set time, which players have to recognize. I managed this by assigning unique names and using various programming logics to track and repeat the images.

The game was built using HTML for structure, CSS for styling, and JavaScript for game mechanics. I used JavaScript to handle the face sequence generation, timers, and player interactions. CSS was used to create dynamic animations to enhance the visual appeal.

Challenges I ran into

One of the main challenges was handling the logic to differentiate between similar-looking faces that varied due to pose, angle, or style. Managing the database of 1,200 celebrity faces and ensuring that they repeated at the right intervals was a significant task. Timing the guess button’s 3-second disappearance was also tricky, as it needed to align perfectly without disrupting the game flow.

Accomplishments that I'm proud of

I’m proud of creating a smooth, engaging game that keeps players mentally active. I successfully implemented the logic with 1,200 unique faces and designed a gameplay loop that remains both challenging and enjoyable. The anti-cheating feature, where the button disappears, adds an extra level of difficulty that I’m particularly pleased with.

What I learned

I learned a lot about balancing game mechanics with user experience. Managing timing in reaction-based games was key, and I gained valuable experience in handling state management in JavaScript. I also learned how to optimize performance when working with a large number of images and maintaining a responsive game interface.

What's next for GUESS THE FACE

This is just a prototype, and I plan to expand it by adding additional mini-games and enhanced game statistics. Future developments include introducing leader boards, integrating multiplayer options, and expanding the variety of faces.

Built With

Share this project:

Updates