IMGD 4000 (D 08)
Individual Homework Assignment #1
Hello Chess
Due by Web Turn-In: Midnight, Sunday, March 22
(See general homework instructions for turn-in details.)
The purpose of this assignment is to get you up to speed as quickly as possible with the software tools (jME, etc.) that you will need for the homework assignments and to shake down the homework submission process:
- Make sure that Java 1.6 (full development environment, not just JRE) is installed ("java -version"). Homework has been tested on Windows and MacOS (should work on Linux also, but not tested).
- Download chess.zip (17.5MB) from the Course Materials section of the myWPI site for this course. This file contains:
- Java source, class and javadoc files for a simple text-based chess game in the package edu.wpi.imgd4000 (main class Match). This code will not be needed until the next homework.
- 3D models for a complete chess set (six black and six white pieces) in jME binary format (art by Jacob Lubinsky).
- Jar files and native libraries (Windows, MacOS and Linux) for runtime jME 2.0 and Darkstar 0.9.8.
- The 'turnin' directory with examples of how to prepare your homework for web turn-in according to the instructions.
- If you are planning to use Eclipse for your homework (highly recommended), you may import chess.zip as an Eclipse project via: File > Import > General > Existing Projects > Next > Select Archive File > Browse > Open > Select All > Finish.
- Make sure you don't already have a project named chess.
- Do not select "Archive File" instead of "Existing Projects" under "General" above!
- Special note for MacOS users: Due to an unfortunate library version interaction you need to remove the swt.jar and jme-swt.jar libraries from the chess project classpath via: Referenced Libraries > right click > Build Path > Remove.
- Download the "complete" precompiled version of jME 2.0 and the associated javadoc from the jMonkeyEngine download site. Unpack both of these zip files at a convenient location for reference purposes. (Note that the javadoc on the jME site is not as up-to-date as the download.)
- Note that jME_2.0.jar (16.7MB) contains both the source and class files for all of jME (including test and tutorial examples).
- Expand this file in place via "jar xf jME_2.0.jar" to facilitate examining jME source code (especially for tests and tutorials).
- To start learning about jME:
- Study the introductory tutorials.
- Follow the instructions in README.txt to run the test example chooser.
- Register with the online forum. Mention that you are a WPI student in your first posting and, of course, be polite and respectful.
Technical Requirements
Your basic assignment is to create a chess board with moveable pieces, which will look roughly like the rendering below. Note that this assignment does not include providing controls to actually move the pieces (that's part of the next assignment).
The code you write for this homework will be the foundation for the three following assignments in the course, so write it carefully and clearly!
- Create a standard 8x8 black and white chess board by correctly placing and coloring instances of com.jme.scene.shape.Quad.
- Hint: You need to call setLightCombineMode(LightState.OFF) on the board node to make the colors show.
- Place the chess pieces provided on the board. Make sure you follow the correct board layout, i.e., "white on right, queen on her color". See the Chess program in the unnamed package of the chess project for an example of how to correctly load models as resources, i.e., via the classpath.
- (Re-) orient the board so that the players can easily see the position of all the pieces and will be able to pick his/her own pieces with the mouse (you don't need to actually implement the picking until the next assignment).
- Hint: Use Camera.setLocation() and Camera.lookAt()
- The main class for this homework should be called Chess in the unnamed package to facilitate turning it in according to the instructions.
Please post any questions to the myWPI discussion board for the course.