Hi I will post the requirements for my school work (Parallax Scrolling) : Does anyone has done it before, if no then please write the codes for grade 3&4 please. It means that I will study on those to make sure that I understand and try to solve the grade 5 then!
Lab 4 instructions
The goal of this lab is to practice the use of arrays. We will do this by implementing a
parallax scrolling space scene. The scene will contain layers of moving stars to simulate
depth. See Figure 1 for an example of how the finished scene might look. An example of a
moving scene can be found on screenr
.
The application shall use several layers of stars that move from right to left. When the stars
reach the left edge of the screen they shall be removed and another star shall enter from
the right. To get a feeling of depth have the stars in the background move slower and be
darker.
The following requirements have to be met for this lab.
For Grade 3:
1. You must have one layer of stars.
2. The stars shall move from right to left in a smooth manner.
3. When a star exits to the left a new (or the same) star shall appear from the right.
4. A star class shall exist. Each star shall be an object of this class. The class shall at
least store the x, y and size of one star.
5. The star class shall have appropriate methods but one method named move must
exist. The move method shall be called from the world class when the star is
supposed to move.
6. The world class shall use array(s) to keep track of all stars.
7. There must be at least 100 stars in the scene at any time.
For Grade 4:
8. All requirements for grade 3.
9. Introduce a variable speed in the stars class that is used for regulating how fast the
star in moving.
10. All values used for position, speed and size shall be randomized.
For Grade 5:
11. All requirements for grade 4.
12. Add two more layers to the scene. Make sure they add to the depth by having
different speed ranges and colors.
![Twitter](/assets/twitter-4e19209ef84344ee0c433f4c7bad8d49.png)
![Twitter.hover](/assets/twitter.hover-1fb19a5bafc50deace8f88eaec867845.png)