In this eleven-session course, students learn Java by building a 2D robot game with libGDX. Java connects directly to FTC robot programming, while libGDX provides engaging visual results without requiring a complex game engine.
Students use Android Studio to write and run code, and Git with GitHub to save and share their work. These are practical development tools they can continue using in FTC and future programming projects.
No previous Java experience is required. Students should be familiar with basic coordinates, angles, and distance. Before the course, each student must create a GitHub account and provide their username to the instructor.
Open and run the starter game, draw the robot, and control its movement with the keyboard. Introduces the edit-run-observe workflow, variables, coordinates, arithmetic, keyboard input, and simple conditionals.
Improve movement so it behaves consistently at different frame rates, and use named constants for game settings used in multiple places. Introduces delta time and constants.
Add an obstacle that stops the robot at its edge. Inline rectangular collision detection and response introduce comparisons and Boolean logic.
Add collectible balls and scoring. Managing several balls introduces loops, collections, parameters, a Boolean return value, and named methods that keep the code readable.
Turn collected balls into ammunition and fire several independently moving projectiles. Introduces classes, objects, constructors, and encapsulation.
Add a goal and award points for successful shots. Missed projectiles disappear after leaving the window, completing the collect-fire-score game loop.
Add rotation controls and draw the robot at its stored angle.
Make forward, backward, and strafing movement follow the direction the robot is facing. Introduces angles and trigonometry through visible movement while keeping upward-only firing.
Make fired balls travel in the direction the robot is facing and disappear when they hit the obstacle. Reinforces angles, vectors, collision detection, classes, constructors, encapsulation, and delta-time movement.
Replace direct robot movement with four mecanum wheel powers. Uses kinematics to connect the game to FTC drivetrain programming while reinforcing methods, arithmetic, vectors, and debugging.
Keep combined mecanum wheel power within allowed limits while preserving their proportions. Reinforces arithmetic, normalization, and controlled debugging. Mirrors actual maximum power limitations on real physical robot drivetrains.
Students finish with a playable game, practical experience with Java and libGDX, familiarity with Android Studio and GitHub, and greater confidence reading, testing, and changing code.