Project 8 | ||
In this part of the course you will have to read chapter 8 of the book (The High Level Language), after reading the chapter you will have to read the following instructions to be able to implement project 8. Instructions: Objectives: The major objective of this project is to get acquainted with the Jack language, for two purposes. First, you have to know Jack intimately in order to write the Jack compiler in Projects 9 and 10. Second, you have to be familiar with Jack’s supporting libraries in order to write the computer’s operating system in Project 11. The best way to gain this knowledge is to write a Jack application. The contract: Adopt or invent an application idea, e.g. a simple computer game or some other interactive program. Then specify and build the application. Steps Running and compiling your Jack program
Deliverables You should deliver a README text file that tells users everything they have to know about using your program, and a tar file containing all your source Jack files. Do not submit any .vm files.
Your Game The game that you have to write should be similar to the Square Dance game (see below), and perhaps more sophisticated. As a general guideline, the hardware and software that we developed so far can be used to produce games at a level of sophistication similar to that of cellular phone games, like Snake. Your grade will reflect the complexity of your game. The more sophisticated your game, the more points you'll get (for more details on the grading method, take a look at the grade sheet). Square Dance This simple interactive game allows the user to move a square around the screen. The user can also change the square size during the movement.
When the program starts running, a square of size 30 by 30 pixels is placed at the top left corner of the screen. The program then listens, and responds to, the following keyboard keys:
Movement speed: to control it, you can change the delay constant in the moveSquare method in class SquareGame. Listening to the keyboard and drawing on the screen is done by OS methods invoked by the program. This program looks rather simple but, hey -- it runs on a computer hardware, and involves three different programming languages, that we built from scratch during this course! When this square moves on the screen, about 2 million hardware and software objects interact with each other, and you have full control over every one of them. Source:
Download: the three Jack classes mentioned above are available in the SquareDance.zip file. Resources
|
||