Giter VIP home page Giter VIP logo

joystick_game's Introduction

Joystick game - Pong🏓


description

this is a simple game made using pygame that is controlled by a joystick that is connected to arduino uno micro-controller.

gameplay

In this game, you are controlling a player that is moving up and down across the screen, then you have to move the player so that a moving ball hits the player, that causes the ball to bounce back.

The objective is prevent the ball from getting past your player.

Getting started

to get started, make sure you have python installed in your system and then clone this repository

git clone https://github.com/Aurumdev952/joystick_game

install dependencies

cd joystick_game
pip install pygame pyserial

after that, make sure you have arduino uno micro-controller and a joystick module connect them according to this scheme

scheme

after that, upload the code in joystick_game.ino and make sure to modify the PORT constant in PONG-GAME.py according to the serial port you have connected to.

to run the game, use:

python PONG_GAME.py

Known issues

different joysticks may give different values for resting positions which may lead to wierd behaviours, to fix this open the Serial monitor and check the values being outputed, then check the second value when the joystick is in resting position, then go into PONG_GAME.py and modify the BASE constant to the value you found. That should fix that issue.

about

this game was developed by Crash Devs.

joystick_game's People

Contributors

aurumdev952 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.