Skip to content

Developed a Python-based maze-crawling application using a PS5 controller interface. This project highlights skills in software-hardware integration and low-code UI design, demonstrating expertise ideal for advanced software engineering.

Notifications You must be signed in to change notification settings

BrianLesko/maze-runner

Repository files navigation

Maze Runner Game

This code implements a Maze running game using a wired Dualsense (PS5) controller. Use the touchpad as the input. The code is rritten in Pure Python in under 100 lines. Created by Brian Lesko for Learning Purposes.

 

 

Dependencies

This code uses the following libraries:

  • streamlit: for building the user interface.
  • numpy: for creating arrays.
  • matplotlib: for saving image data
  • io: for saving image data
  • hidapi: for accessing usb connections on the host device

 

Usage

Run the following commands:

pip install --upgrade streamlit hidapi matplotlib streamlit
streamlit run https://github.com/BrianLesko/maze-runner/blob/main/app.py

This will start the local Streamlit server, and you can access the chatbot by opening a web browser and navigating to http://localhost:8501.

 

How it Works

The app as follows:

  1. The hidapi library is used to initiate a connection to the PS5 controller
  2. The dualsense class is used to decode the received bytes
  3. Scikit-learn is used to resize maze images
  4. Streamlit is used to display the decoded bytes from the touchpad
  5. If the touchpad pixel overlaps with a wall, you lose a life
  6. If you reach the goal you make it to the next level
  7. The app stops after a set number of loops
  8. The user can download their artwork

 

Repository Structure

repository/
├── app.py # the code and UI integrated together live here
├── customize_gui # class for adding gui elements
├── dualsense.py # The class used to decode received bytes from the wired controller
├── requirements.txt # the python packages needed to run locally
├── .gitignore # includes the local virtual environment named my_env
├── .streamlit/
│   └── config.toml # theme info for the UI
└── docs/
    └── preview.png # preview photo for Github

 

Topics

Python | Streamlit | Git | Low Code UI
External device | HIDapi | decode bytes | PS5 | Sony | Dualsense | communication | Remote control 
custom classes
Self taught coding | Mechanical engineer | Robotics engineer

 


 

╭━━╮╭━━━┳━━┳━━━┳━╮╱╭╮ ╭╮╱╱╭━━━┳━━━┳╮╭━┳━━━╮ ┃╭╮┃┃╭━╮┣┫┣┫╭━╮┃┃╰╮┃┃ ┃┃╱╱┃╭━━┫╭━╮┃┃┃╭┫╭━╮┃ ┃╰╯╰┫╰━╯┃┃┃┃┃╱┃┃╭╮╰╯┃ ┃┃╱╱┃╰━━┫╰━━┫╰╯╯┃┃╱┃┃ ┃╭━╮┃╭╮╭╯┃┃┃╰━╯┃┃╰╮┃┃ ┃┃╱╭┫╭━━┻━━╮┃╭╮┃┃┃╱┃┃ ┃╰━╯┃┃┃╰┳┫┣┫╭━╮┃┃╱┃┃┃ ┃╰━╯┃╰━━┫╰━╯┃┃┃╰┫╰━╯┃ ╰━━━┻╯╰━┻━━┻╯╱╰┻╯╱╰━╯ ╰━━━┻━━━┻━━━┻╯╰━┻━━━╯

 

X Logo             GitHub             LinkedIn

follow all of these or i will kick you

 

About

Developed a Python-based maze-crawling application using a PS5 controller interface. This project highlights skills in software-hardware integration and low-code UI design, demonstrating expertise ideal for advanced software engineering.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published