Junk Food Attack: A Top-Down Shooter Game

Try the Game

Junk Food Attack is a browser-based top-down shooter game where players defend their health against waves of junk food. The main aim is to encourage healthy eating habits through engaging gameplay.

The game features a human character who must survive increasingly difficult waves of junk food by dodging and shooting them. Players can move in all directions and use lasers to destroy incoming threats.


Inspiration

Imagine the fast food ads everywhere. This game aims to make you hate junk food and inspire you to eat healthy whole foods.


What It Does

  • Players control a human character who is attacked by junk food.
  • The goal is to defend oneself by dodging and shooting junk food enemies.
  • Includes a signup and login feature to store and track high scores.

How I Built It

  • Game Logic: Developed in JavaScript for seamless hosting on S3.
  • Assets: Game characters and backgrounds designed in Canva.
  • Storage: Used S3 to store game assets.
  • Authentication: Integrated Amazon Cognito for user authentication (username and password).
  • Database: Leveraged DynamoDB to store high scores.
  • Automation: Created a Lambda function to auto-confirm users during signup.

Challenges I Ran Into

I ran into multiple challenges. Firstly I created the game in python then asked AmazonQ to help deploy in AWS. It suggested me to convert into javascript and deploy in S3, it was very challenging to change the entire codebase. Secondly, creating cognito cluster pool with IAM access to allow Dynamo DB was confusing spent a bit of time there but eventually figured out my mistake. After creating pool, and store the user it showed the user is not confirmed was trying different methods but Amazon Q gave me precise lambda function and test case which fortunately worked. Finally, the game flow was dredged me will not say it was too hard but consumes quality time.


Accomplishments that I am proud of

I am proud of completing this game, hosting this game, using multiple AWS Services(Amazon Q, S3, Cognito, DynamoDB, S3), coded a game in Javascript from Python, Mastered nitty gritty details of IAM permissions.


What I learned

My first and foremost learning was to stay consistent and iterate different possibilities again and again. Then obviously tried Amazon Q instead of Copilot which was awesome. Finally learned to identify use cases for different storage in AWS.


What's Next for Junk Food Attack

  • Unity Development: Plan to recreate the game in Unity for a more robust and scalable experience.
  • Inspiration from Big Games: Inspired by large-scale games like Clash of Clans hosted on AWS, I aim to build more complex games.
  • Promoting Healthy Habits: Continue creating games that encourage kids to develop healthy eating habits.

Built With

Share this project:

Updates