Skip to content

shadjensen/FrogGame

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frog Controller Game

This project is a multiplayer game where players control frogs using a web interface. The game is built using Python, Pygame for the game logic, Flask for the web server, and Socket.IO for real-time communication between the server and the clients.

Project Structure

  • main.py: This is the main script of the game. It contains the game logic, the Flask server setup, and the Socket.IO event handlers.
  • map_builder.py: This script is used to build the game map. It listens for keyboard events and creates MapComponent instances accordingly.
  • rotate_colors.py: This script is used to generate different color variations of the frog sprites.
  • templates/index.html: This is the HTML template for the web interface of the game. It includes the buttons for controlling the frogs and the Socket.IO client-side script. *imgs/: This directory contains the original frog sprites. *color_rotated_imgs/: This directory contains the color-rotated frog sprites generated by rotate_colors.py.

How to Run

To run this project, you need to have Python and the required packages installed. You can install the required packages using pip:

pip install pygame flask flask_socketio pillow pynput

Then, you can run the main.py script to start the game and the server:

python main.py

The connection address is printed to the terminal, and you should re-run the server the first time and adjust the on-screen text to be correct.

port_string = "Your connection address/text here"

Adjust in main.py.

Colors

Colors can be adjusted in main.py - once that's done, run map_builder.py to generate the alterations.

Game Controls

The game can be controlled using the buttons on the web interface:

  • Up: Makes the frog jump up.
  • Left: Makes the frog move to the left.
  • Right: Makes the frog move to the right.
  • Grab: Makes the frog grab an object.

TODO:

Playtest notes:

  • Minimum max height for players to spawn, to avoid spamming.
  • Sometimes freezes screen - no error message?

Refactor to make the code actually usable Try out joystick?

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 59.1%
  • JavaScript 32.8%
  • HTML 8.1%