Mr GW Game
For your assignment you must draw, and animate, the main character of the game, called Mr GW. Mr GW is a simple human-ish shape and can move in steps across the screen from left to right and back again.
- You must have Mr GW drawn in the bottom left of the screen. All of Mr GW must be visible on the screen.The screen must beexactly512 pixels wide and 348 pixels high. Mr GW must move left and right across the screen when the user presses the left and right cursor keys on the keyboard respectively.
- When Mr GW reaches the right hand edge of the screen he must not be able to move past the edge of the screen (i.e. at this point pressing the right cursor key will do nothing). Similarly for the left hand side of the screen.Mr GW must move approximately 64 pixels each time a key is pressed and in this way will get fully across the screen in 6 moves (i.e. after 6 presses of the right cursor in succession, Mr GW won't move anymore and is near the right edge of the screen).
- You must add a door that opens and closes on the right hand edge of the screen. The door is in Mr GW's 6th slot (i.e. the spot he moves to last). This door will start open and then close after a "random" amount of time. The minimum random time is 3 seconds and the maximum is 8 seconds. After another random amount of time (also between 3 and 8 seconds) the door closes again. This pattern repeats. Mr GW can only move into this last slot if the door is open. If the door is closed and he tries to move into that slot, nothing happens.