Skip to content

nhathout/TiltGolf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TiltGolf logo

TiltGolf is a tilt-controlled golf game that runs on a BeagleBone with an attached LCD. An IMU senses tilt and a kernel-space driver streams those readings to the Qt game. The UI presents arcade-style menus and levels, while the physics layer keeps the golf ball rolling realistically around the different levels.

Demo

TiltGolf gameplay demo

View the full MP4 demo

Project Links

Hardware & Software Stack

  • BeagleBone Black + LCD cape – what the game renders on.
  • Custom IMU moduleIMU.* and the kernel driver provide filtered tilt angles.
  • Qt 5 widgets UImain.cpp, MainWindow, MenuScreen, and GameScreen deliver the UX optimized for touch.
  • Physics layerPhysicsEngine.*, GameController.*, and GameView.* synchronize IMU input with Box2D-style ball motion.

Building the Qt Application

The checked-in Makefile was generated by qmake for the EC535 BeagleBone cross toolchain. If you are on that toolchain:

cd tiltgolf
make          # uses qmake-generated rules and the arm-linux-g++ compiler

For native desktop experimentation you can regenerate host build files:

cd tiltgolf
qmake tiltgolf.pro
make
./tiltgolf    # runs the Qt UI on your workstation

ℹ️ Ensure Qt 5.15 (or later) development packages and a C++17-capable compiler are installed.

Prebuilt BeagleBone Binary

  • tiltgolf/tiltgolf_final is the ready-to-run executable for the BeagleBone + IMU + LCD setup if you prefer not to run make.
  • Copy to the board and run it.

Box2D Test (runs on Mac)

The Box2DTest.cpp file is a lightweight SFML window that drives a Box2D world for tuning forces, damping, and collisions before pushing to hardware.

Prerequisites

  • Box2D 3.x headers/libraries available on your system (e.g., via package manager).
  • SFML 2.5+ development packages (sfml-graphics, sfml-window, sfml-system).

Build & Run the Test

mkdir -p build
g++ -std=c++17 tiltgolf/Box2DTest.cpp -I/usr/include -o build/Box2DTest \
    $(pkg-config --cflags --libs sfml-graphics sfml-window sfml-system box2d)

./build/Box2DTest

Screens & Levels

Main menu TiltGolf menu mock Free play menu
Level 1 Level 2 Level 3 Level 4
Level 5 Level 6

Hardware

TiltGolf CAD v1 TiltGolf CAD v2

Physics Engine Test

Box2D physics engine test

About

TiltGolf is a tilt-controlled golf game that runs on a BeagleBone with an attached LCD touchscreen.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors