Skip to content

HackEDX-Framework/ArcadeMachine

Repository files navigation

Welcome to CodeArcade

In this Hackathon, You will work in teams on a pre-built virtual arcade machine to add onto existing games or add your own game with the help from each other and our mentoring team.

We will be using the PyGame library to build an arcade machine with a few games in Python.
But our games are missing some features that would make the game more fun to play. We believe you can use your creativity combined with your programming skills to make the games more fun to play.

🎉 Good luck with your hackathon! Remember: start small, test often, and don't hesitate to ask questions!

Tools and Technologies used

Operating Systems Languages Package Managers IDEs and Editors Code Style Documentation
Linux Python PyPI Visual Studio Code BlackFormatBadge ReadMe
macOS YAML PyCharm Git Sphinx
Windows Markdown
JSON

Setting up the project

Prerequisites

Tool/Software Version/Requirement Notes
Python >= v3.13 Required for running scripts and applications. Download Python. Ensure you have at least version 3.13 installed.
Git Latest stable version Used for version control and collaboration. Download Git. Install if you don't have it already.
PyCharm/VSCode Any modern version IDE for development; choose your preference. Download PyCharm (preferred) or VSCode.

Set up the development-environment (IMPORTANT)

With these steps completed, you’re all set to start coding and enhancing the games! 🎉

How to run the games

If you've followed the steps above, you should be able to run the games by running the main.py file in the games folder.

  • If you're using an IDE like PyCharm or vscode, you can run the main.py file by clicking the green play button in the top right corner.
  • If you're using a terminal, you can run the main.py file by typing python main.py in the terminal from the repository folder you cloned earlier.

Now you're ready to start playing! 🎉🎉🎉

The Arcade Machine

When you run the main.py file, you should see a window like this pop up:

Arcade Machine

This is the arcade machine. You can use the arrow keys to navigate the menu and press enter to start the selected game.

The arcade machine displays the games that are in the games folder and registered in it. When you start a game, the arcade machine will run the main game file from inside the game folder.

The main game file is not necessarily called main.py, but it is the file used when registering the game in the arcade machine.
For example, Pinball is registered like this; the main game file is called menu.py.

# main.py
    machine.register_game(ArcadeGame("Mumble Pinball!", "games/pinball/menu.py",
                                     "medium", "2-3 h", "assets/example_pictures/pinball.png",
                                     "Singeplayer game. DING DING DING! Flip the ball around and try to keep the ball in the game! Create your own map!",
                                     "OOP code. Bobby Bounce-a-Lot needs your help to maximize his happiness!"))

Want to add your own game?

  1. Create a new folder in the games folder
  2. Write your game code
  3. Register your game in the main.py file with some description as shown in the example above

Et voilà! your game is now in the arcade machine.

Existing Games

We have already created a few games that you can build upon. These games can be found in the games folder. While functional, they are missing some features that would make them more fun to play. Use your creativity and programming skills to enhance these games!

Each game includes a README file with explanations and ideas (as well as hints) on what you can add. Check them out:

Game Description Link to README
Snake A classic snake game where the goal is to eat and grow without crashing into yourself or walls. Snake README
Pong A two-player paddle and ball game inspired by the original arcade classic. Pong README
Space Shooter A shooter game where you defend against waves of alien ships. Space Shooter README
Toytown Traffic Navigate the city, collect presents, and avoid cars in this game inspired by Pacman. Toytown Traffic README
Pinball A digital pinball game where you control flippers to keep the ball in play. Pinball README

How do I choose a game & what do I do?:

For each game we have individual README files that also include at the top what you will practice while working on the game, so feel free to check that first before commiting!

  1. Read the README.md file to understand game-specific functionality
  2. Explore the code: Start from the main game loop at the bottom of main.py
  3. Find the challenges: Search for "TASK" comments in the code
  4. Test frequently: Run the game after each change to see your progress

Contributing

Done with all the games? Great! Now you can help us improve the arcade machine.
We would like to receive your upgraded version of the arcade machine in a pull request.

  1. Make sure your work is up to date and pushed to your forked repository's main branch.
  2. Create a pull request from your forked repository to this repository's main branch.
    1. Github should automatically detect that you're making a pull request from a forked repository. Go ahead and click the green button to create the pull request.

    2. Please ensure that the title of the pull request is your group name. In the description, let us know if there is anything else we should know about your pull request.

And That's it! We now have your upgraded version of the arcade machine and will use it for further evaluation of our study.
Make sure to finish your pull request before the end of the hackathon since we will only review changes made until the end of the event.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors