Assignments:CustomWackadot
From FANG
Introduction
The basic Wackadot tutorial introduces you to the basic structure of Java programs and in particular how you can write games using the FANG Engine. In this assignment you are going to complete Wackadot, then customize it by putting in sound and images. By completing this assignment, you should learn the basics of:
- Java terminology
- syntax and structure of Java programs
- FANG Engine capabilities
- how to upload and play sounds in games
- how to upload and show images in games
To make the learning more fun and productive, you should choose a partner for this assignment.
What to Do
- Click here to learn about how the parts of a program fit together. You will need to know this information in order to follow the Wackadot instructions. In particular, you need to know that:
- Instance variables are declared inside the class body, but outside of method definitions. Instance variables are a type of field.
Click here to see a correct example, click here and click here to see two common errors of declaring instance variables in the wrong place. - Method definitions are inside the class body, but not inside other method definitions.
Click here to see a correct example, click here and click here to see two common errors of defining methods in the wrong place. - Every open brace must have a matching close brace.
Click here to see a correct example, click here and click here to see two common errors of mismatched braces. - Each method declaration has exactly one corresponding method body.
Click here to see a correct example, click here and click here to see two common errors of misplace code blocks.
- Instance variables are declared inside the class body, but outside of method definitions. Instance variables are a type of field.
- Make sure you have an account on a JavaWIDE enabled site. One place you can get an account is on the FANG Engine Playground.
- Make and test the basic Wackadot. You are welcome to make Wackadot using JavaWIDE, Eclipse or any other IDE, but you will eventually need to upload your applet to a JavaWIDE enabled site. If you are using JavaWIDE, skip the step for making a help file (for now - this is a yet-to-be-added feature of JavaWIDE).
- Visit the tutorial about adding sound to your game. Make your own simple game that plays your own sound when you click. Feel free to use the code from the sample on the tutorial, but be sure to upload and play your own sound. You don't need to turn in the program made on this step. Click here to get some sample sounds.
- Visit the tutorial about adding images to your game. Make your own simple game that shows your own image. Feel free to use the code from the sample on the tutorial, but be sure to upload and show your own image. You don't need to turn in the program made on this step. Click here to get some sample images.
- Using what you learned in the previous two steps about playing sounds and showing images, modify the basic Wackadot by putting in images for the dots and sounds when they collide. Use a pleasant sound when points are added and an unpleasant (but not too unpleasant) sound when points are reduced.
Hint: you can keep all of the colors used in the game logic of Wackadot. Setting the color of an ImageSprite does not change the display of the image, but the ImageSprite does know what color it is. - Add a help screen telling the player how the game works. If you are using JavaWIDE, skip the step for making a help file (for now - this is a yet-to-be-added feature of JavaWIDE).
- Add to and modify the comments in the game. For example, make sure both you and your partner are in the author section, and mention that your game is based upon the original Wackadot.
Extra Credit: make your game multiplayer by following the Networking Wackadot Tutorial.
Turning in Your Assignment
Submit to your instructor a link to your assignment.
- This page was last modified on 17 January 2008, at 17:44.
- This page has been accessed 1,069 times.
- Privacy policy
- About FANG
- Disclaimers
- Powered by MediaWiki!











