AP Computer Science A Resources - Long Nguyen

How to Write a Platformer Game in Java

In this short video series course, we will learn how to write a platformer (or side-scrolling) game like Super Mario. We will write this game from scratch with very basic algebra without relying on any physics engine! Here's a short 2-minute preview of the game. The entire Youtube playlist for this curriculum can be found here. The webpage including labs for the curriculum is here.

Coding Challenges

A series of coding challenges. Most are mathematical in focus and require some trignometry. The distribution code is included and provides a template for completing the code. Processing is used for the animation challenges.

  1. Ball Bounces Off Angles
  2. This animation challenge simulates a ball drop on an uneven ground. (Demo, Tutorial, Distribution Code) Solutions can be found here.
  3. Inverse Kinematics: Pulling A String
  4. This animation challenge simulates pulling a string with the mouse. (Demo, Tutorial, Distribution Code)
  5. Billiard Ball Collisions
  6. This animation challenge simulates collisions of billiard balls in 2D. (Tutorial, Distribution Code) Solutions to the two-ball case and the many-ball case with the glitch fix.

Final Projects

Below are some of the most creative programming projects from my students at Boston Latin School. All are written in Java using the Processing IDE and ported to Javascript using ProcessingJS for the browser. I have only tested this on Google Chrome. Let me know if there are any errors. The basic requirements are that their programs are object-oriented with at least three or more objects and that inheritance and polymorphisms are used in a sensible way. Click on the project title to play.
  • Eel: 3D Snake Game by Adam Grant.
  • Tetris by Jason Mar.
  • Space Wars by Ricky Ciliberto.
  • Shooter by Ricky Ciliberto.
  • Tiny Tanks by Ben Givertz.
  • Star Wars Galaga by Damon Prum.
  • Tron by Rachel Lee.
  • Space Invaders by Kathy Mei.
  • Flippy Bird by John Mikulskis.
  • Crazy Snakey by John Mikulskis.

Từ khóa » Nguyen Cs