Skip to content

angel-jane/Assembly-Cat-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Assembly Cat Game

alt text

You take care of a virtual cat by interacting with it using keyboard inputs. The goal is to keep the cat happy, healthy, and clean by feeding it, petting it, letting it rest, and cleaning up after it. The cat's well-being is tracked with four primary stats:

States:

  • Hunger (0 = full, 100 = starving)
  • Happiness (0 = sad, 100 = very happy)
  • Energy (0 = exhausted, 100 = energetic)
  • Cleanliness (0 = dirty, 100 = clean)

The game simulates the passage of time and changes the cat's state accordingly.

Purpose of this Project

Taking care of cats is very relaxing and is a stress reliever. The purpose of making this game is to create an interactive cat simulation game with the use of Assembly Language. With the homely feeling, relaxing and taking care of your cat, you can also learn the logic with branch and jump instructions with Mars 4.5 MIPS. Making this game has been a huge milestone for me, as I have learned a lot through debugging and solving problems along the way.

Creating this project has not only helped me learn more about Assembly language, but also made the learning part fun.

How to Play?

In the game, you interact with your virtual cat using keyboard inputs. Here’s a simple step-by-step guide:

  1. Start the Program
    • Run the program in the MIPS simulator MARS 4.5.
    • Open the cat_game.asm file into the app.
    • Click Tools > Keyboard and Display MMIO Simulator for the Input, then click Connect to MIPS.
    • Click Tools > Bitmap Display for the Display.
      • Alt text
      • Then, copy the settings above for the display.
      • Click Connect to MIPS.
    • Click the Screw Driver Icon or the key F3 to assemble.
    • Click the Green Play Icon or the key F5 to run.
  2. Use the Keyboard to Interact
    • F to Feed the cat
    • P to Pet the cat
    • C to Clean up poop
    • S to Show current cat status
    • Q to Quit the game
  3. Monitor Cat's Status
    • The cat has four main needs:
      • Hunger
      • Happiness
      • Energy
      • Cleanliness
    • If you don’t interact, the cat:
      • Gets hungry over time.
      • May poop randomly.
      • Sleeps if idle too long.
      • May meow or seek attention.
  4. Use S often to monitor its well-being.
  5. Watch the Cat Change States.
  6. Loop Continues Until You Quit
    • The game keeps running in a loop.
    • Press Q anytime to quit.

Cat Feedback

Messages are printed to the console based on interactions, such as:

  • "Cat is eating!"
  • "Cat is happy from petting! purrrrrrrr"
  • "Cat fell asleep... zzz"
  • "Cat made a mess!"
  • "You cleaned up the mess!"

Cat States

The cat can be in various behavioral states:

  • Idle
    alt text
  • Eating
    alt text
  • Sleeping
    alt text
  • Pooping
    alt text
  • Meowing, Purring, Rubbing
    alt text

Graphics

The cat is displayed using sprites on a 256×256 bitmap screen. Sprites represent different cat states and are drawn at a fixed position. When the cat’s state changes, the screen area is cleared and redrawn.

Limitations

There are several limitations of the game due to time constraints. The following are:

  • Incomplete sprites.
    • The pooping animation is not complete, just recycled from the idle animation with poop.
    • Reused purring sprite in meowing and rubbing as well.
    • No status in the Bitmap Display.
  • Only a few user interactions with the cat.
  • The cat won’t die when the stats go 0, because free will. 😀

AI Decleration

I wouldn’t have made this without ChatGPT (mainly), Claude, and Cursor. They are my team, through thick and thin. I was able to complete the code for a week while staying sane. Thank you.

About

Take care of your black cat! CS222 PIT Final Project. The purpose of making this game is to create an interactive cat simulation game with the use of Assembly Language. With the homely feeling, relaxing and taking care of your cat, you can also learn the logic with branch and jump commands with Mars 4.5 MIPS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors