ICM Assignment Week 2

This is a rough homework because I really got overwhelmed this week.

Long story short, this is the link:

http://yangyang.blog/pages/DodgeEyeball/index.html

Since I am using a p52dcollide library, I do not know how to play it in the alpha editor.

 

(didnot refine, please don’t read)

Problems and solutions:

  1. random color
    1. symptom:
      1. if in setup, error: unknown variable
      2. if in draw, the color change continuously.
    2. solution:
      1. Create a global variable to store the color first.
  2. how to create an array of object, and display them one by one?
    1. symptom:
      1. Firstly I want to create them all then display them one by one, did not work
      2. Then I tried to create them one by one, then use a for loop to display them, error: cannot display a thing that does not exist;
    2. solution:
      1. DIY timer to create them one by one
      2. set a counter to make sure for loop does not go to the one have not been created;

Problem unsolved:

  1. How to compare if an object collided with an object in an array?

Leave a Reply

Your email address will not be published. Required fields are marked *