How-To's > How do I build a game?


See the following links for tutorials and examples of how to build JavaFX game applications.

  • Brick Breaker
    This sample contains a single-user game. It incorporates the following important game concepts:
    • Controlling an onscreen object with user input
    • Displaying onscreen events by using animation
    • Keeping track of scores and lives
    In this game users control an onscreen bat by using a keyboard or mouse. The bat is used to propel a ball to break a wall of bricks. The more bricks you break, the higher your score. Players are assigned a a number of lives. Every time the bat misses hitting the ball, the player loses a life.
  • Pac-Man New window
    This multipart tutorial walks you though building this popular game as a JavaFX application. In the first part, you create the data model for the maze, which controls drawing the maze. In the second part, you create the Pac-Man character and the following actions that it can execute:
    • Open and close its mouth
    • Walk the maze
    • Change its location based on user input
    • Gobble dots
    In the final part of the tutorial, you create the ghost characters.
  • WishtreeNew window
    This game prototype is a multiuser application that includes the following components of game applications:
    • A JavaFX rich client for user interaction
    • A server handling communication among multiple clients
    • A database for data persistence

Last Updated: November 2009
[Return to How-To's Home]



Rate This Article
Leave a Comment or Suggest a Topic

Do you have comments about this article? We welcome your participation in our community. Please keep your comments civil and on point. You may optionally provide your email address to be notified of replies—your information is not used for any other purpose. By submitting a comment, you agree to these Terms of Use.

 

English
日本語
한국어
简体中文
русский
Português do Brasil