Code Monkey home page Code Monkey logo

pong's Introduction

pong

Pong with output to VGA display, written in VHDL for implementation on nexys a7 dev board (part no. xc7a100tcsg324-1), built in vivado 2023.2

Creating & building project

Option 1

  1. Open git bash, consider $origin_dir as the root directory of the repo

source $origin_dir/scripts/build_project.tcl

Option 2

  1. Open Vivado 2023.2 GUI
  2. Click Tools > Run Tcl Script...
  3. Select $origin_dir/scripts/build_project.tcl

Output example

Controlling up/down movement of the left paddle with push buttons on the dev board, CPU right paddle just tracks ball vertical position

Logic for control/output of game elements is mostly in hdl/pong_game_logic.vhd

Note: visual distortion in top middle of screen is due to degrading monitor hardware, not errors in the VGA HDL sections

To-do

Features

  • Simulation with verilator and vivado sim/modelsim
  • Try different methods of pseudo-randomizing the initial ball position/velocity
  • Change ball velocity when hitting P1 or CPU paddle
  • CPU difficulty modes
  • Win/Loss record
  • Visual/audio cues & effects

Documentation

  • Further comments on time sync done for some of the VGA related signals in top file
  • Logic walkthrough/state diagrams for hdl/pong_game_logic

pong's People

Contributors

jswenke 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.