Monday, 7 September 2015

Class Responsibility and Collaboration Cards

This weeks lecture was looking more at action script and helped to reinforce some programming concepts of ActionScript. I am glad that I have already done Python coding and JavaScript in the previous semester as this ActionScript work is helping to cement areas that I am already familiar with.

Its also nice that I did not work a lot in JQuery last semester as the ActionScript syntax is very similar to vanilla JavaScript, so I have yet to find myself struggling as I did when trying to learn Python and JavaScript simultaneously.

The main take away from this weeks lecture was the concept of  CRC cards to planning out our prototypes classes. Breaking down the individual elements of the prototype into what values they contain, what actions they take, and what other classes they need to interact with. This process has made me think a lot more about the design of my code and what parts can be recycled and what parts I can get away with hard coding.


From my initial time is the lecture I came up with the following classes:

In lecture Card

PLAYER:

Attributes

  • y Position (Will only be moving left and right)
  • x Position
  • Inventory (To hold Treasure)
    • This was something that I initially had overlooked. In my head you just get the treasure but I had not considered where it would be stored until doing this exercise

Abilities

  • Move right (Considering a system where player cannot move back but will need to test)
  • Add Item (Or take treasure)

Collaborators

  • Screen (To know where to be)
  • Lock (If locked cannot move past dumpster)
  • Treasure (To pick it up ^.^)
  • Dumpster? (Will it be enough to know about the lock and the treasure?)
In lecture card

LOCK:

Attributes

  • Password (Numbers in an array)
  • State (Locked or Unlocked)
  • x Position
  • y Position 
  • Indicator (Some way of knowing which value on the dial is active)

Abilities

  • Unlock
  • Originally had spin left and right but have subsequently moved this to a new class called dial after further looking at the class cards.

Collaborators

  • Dumpster
  • Combo Panel (Help Panel?)
  • Sound
  • Stage
  • Dial
In lecture Card

DUMPSTER:

Attributes

  • Lock
  • Contents
  • x Position
  • y Position

Abilities

  • Open
  • Empty? (Seems like a duplicate if player has take item)

Collaborators

  • Player
  • Lock
  • Treasure
In Lecture Card

COMBINATION PANEL

The combination panel came about from the exercise as an idea of how to help communicate to the player what actions they needed to take to unlock a lock.

Attributes

  • Lock Progress (How many off the password numbers have been hit)
  • x Position
  • y Position
  • Turn Indicator (Which way to turn the lock next)

Abilities

  • Display direction (Which way to turn)
  • Display Number (eg 1/4 numbers hit)

Collaborators

  • Lock
  • Sound
In Class Card

SCORE

Another aspect of the game which I had previously not considered, how does the user know how much more money they need to collect or what their goal is.

Attributes

  • Target (Money to be earned)
  • Current
  • Progress (Current % of target)
  • x Position
  • y Position

Abilities

  • Update (Refresh score when loot is collected)

Collaborators

  • Treasure (Maybe?)
  • Player

In Class Card

SOUND

Attributes

  • Volume
  • Playstate (Playing, paused, off)
  • Sound (The sound clip itself)

Abilities

  • Play Sound

Collaborators

  • Lock
  • Combo Panel

In Class Card

TREASURE

Attributes

  • Value
  • Image

Abilities

  • Obtain (Probably another duplication with players take item)
  • Display (potentially some sort of animation also)

Collaborators

  • Dumpster

Implied in most of these cards in the fact that they will need to collaborate with the stage and have both and X and Y position on the stage to display. I did some more refined work on the cards but it will have to wait for another post.

No comments:

Post a Comment