![]() |
ANU College of Engineering and Computer Science
School of Computer Science
|
|
|
Graphics2DThe main objective of this lab is to understand what is involved in drawing 2D graphics. In particular it is important that students gain a good understanding of: the use of transformations to draw items, drawing text and fonts, and drawing images.This lab involves improving a very very basic rock climbing game called 'littlewall'. The aim of the game to to get the person to climb to the top of the wall. If you hold down 'A' and move the mouse this will move the person's left hand(S right hand, Z left foot, and X right foot). Holding down the 'space bar' and moving the mouse will move the entire body. Currently the game needs lots of improvement in areas including: game physics, game play, scoring, .... However, in this lab your aim is not to improve the game's physics/play/etc, but just the graphics. Step 1 (3 marks)Obtain a copy of littlewall.jar the simple rock climbing game. Extract the contents of this jar file into a directory(jar xf littlewall.jar). Compile the java files(javac *.java). And run the game(java LittleWall).Visually improve the intro screen by adding: some sort of logo that you have constructed(could be an arrow pointing up, a rock, or anything you like), an 'interesting' large font for the title, game play instructions, and some sort of image. To do this you will need to modify the 'draw' method in 'LittleWall.java'. Visually improve the climber using drawing primitives(not including images) such that the climber has: a head, hair, cloths, a harness, chalk bag, thick arms, thick legs, hands, and shoes. To do this you will need to modify the 'draw' method in 'PlayerSpring.java'. The climber is made up of: XYPoint(s) - giving the location of key points on the body, Spring(s) - giving the relationship between these points, Joint(s) - used for limiting angles between the limbs(currently not really used).
Below is a diagram of the climber with the names for the XYPoint(s) and Spring(s):
To gain full marks for this aspect you must use an affine transform in your code. (e.g. You could scale and angle the image in the intro screen.) Step 2 (1 mark)Re-do your climber so that you use images to make up the person. Note, you should keep a copy of your previous version for marking purposes.Step 3 (2 mark)Add an extra visual aspect to the climber. This aspect must involve a mathematical model along with its visual implementation. Possible additional aspects are:
To gain full marks for this part of the lab you need to provide an overview of the mathematical model you used for the aspect(about 1 A4 page). | |||||||||||||||||||||||||||||||||||||||||||||
|
Please direct all enquiries to: ericm@cs.anu.edu.au Page authorised by: Head of School, SoCS |
| The Australian National University — CRICOS Provider Number 00120C |