Wednesday, September 9, 2015

Week 6/7: CRC Cards and the making of IP1

In this week 6's session we created Class Responsibility and Collaboration (CRC) cards which really helped me to consider and plan out how to structure and build the code for the game.

For IP1 I'll probably only be focused on 2 main elements of the game: The frog and the vehicles.

Frog Class:

Attributes:

  • X & Y Position
  • Starting position
  • Orientation
  • Speed
Behaviours:
  • Move forward, left & right
Collaborators:
  • Vehicles (check for collisions)
  • Safe zone (position when it's crossed the road)
Vehicle Class:
Attributes:
  • Type of vehicle, ie truck, car, etc.
  • X & Y position
  • Speed
  • Direction (left to right and vice versa)
  • Colour
Behaviours:
  • Moves in one continuous direction
Collaborators:
  • The frog (check for collision)

For future prototypes, I've also considered:
  • Character Class - each Guess Who character will need different attributes concerning their appearance, ie is it wearing a hat, what colour, glasses, facial hair etc. It will also need a status (ie is it the chosen one or not). The chosen characters attributes will also affect and inform the clues given on screen.
  • Clues/Cluebox - this will display clues about the chosen character that players will have to guess. It needs to know which is the chosen character in order to give the appropriate clues to the player


CRC cards

In week 7, I have started working with the Actionscript 3 code. The Pong tutorial was really helpful in my game's code. Setting the location of the frog and truck objects and the movement and speed has been based on Peter's tutorials. I also followed this Adobe Masterclass webinar on making a Frogger game for some guidance (https://edex.adobe.com/resource/2c28f6fe2a/), although he built this using the Action panel and the timeline. Nevertheless it was useful in helping to consider the separate classes and objects I needed and how to structure some of the functions.

I decided to use the 0-9 number keys as the controls, since I'm not adding the Guess Who tile board interactions at this stage. These will control the forward movement of the frog, but can only be used once (as the tile flips can only happen once in Guess who).

Also instead of using the arrow keys for orientating the frog left and right, I decided these will just move it in a right or left direction which is I think is a lot easier to understand, and since there will only be a limited number of movement keys.

Other things to consider will be how to make the number controls only able to be used once and communicating this to the player visually. I'll also need a way to restart the game if the frog dies or if the player wins.

Starting the code the Frog class

No comments:

Post a Comment