Group members: this is the place for your learning diary. Use this to post your zipped-up site at least once each unit, and your reflections as often as you wish (at least once per unit). Please write your reflections directly in the post, not as attached files. Where you do need to attach documents, such as for unit 1 designs, use PDF, PNG or JPG formats. You can attach files using the 'Embed content' link in the editor.
QUICK COURSE LINKS: Add blog post - Read latest group posts - FAQs: Course process : Site design : HTML : CSS : JavaScript : JQuery : AJAX : Misc : Podcasts for each unit
Updated resource pages: Unit 1 - Unit 2 - Unit 3 - Units 4 & 5 - Unit 6 - Unit 7
Create star at regular intervals at a random position on the canvas. When stars are created, they will fade in, increasing in size and opacity, and then fade out, decreasing in size and opacity. After fading out the stars will be deleted.
Contains main loop and objects that manipulate the canvas. The controller object was created to separate the main loop from the details of drawable objects and how they are manipulated. Personally, I find inner objects to be ideal for creating new levels of abstraction and maintaining a clean and workable base of objects. When objects contain too much functionality I find it difficult to read and navigate through the source code.
CONTAINS:
- Controller
INIT
- Set up canvas and context for drawing
- Create Controller that will manipulate all objects
- Set frame rate
Main Loop
- Update Controller
- Draw all objects contained within Controller
Contains and coordinates all objects.
CONTAINS:
- BgStar
- BgStarController
INIT
- Create new ImgCache containing all images that will be used on the banner
- Create a list starTypes
- Create associative array objects to store objects
- Create BgStarController
UPDATE (Function is called in the main loop)
- Update objects
- Garbage Collection
Draw (Function is called in the main loop)
- Draw Background
- Draw all objects
ObjectInterface is and interface for all instances that will be drawn to the screen, and that will be stored in the objects associative array from Controller. All objects are given three attributes.
Implements ObjectInterface, generates several different random attributes. Fades in and then sets it’s delete attribute to true once it’s fade cycle has completed.
INIT
- Randomize several attributes:
- Create Fader object
- Create Img to draw itself to screen
UPDATE
- Fader.fade fade object that runs through a series of opacities from 0 to 1 then back down from 1 to 0
- isDelible checks if objects fade cycle has completed, and if so sets delete equal to true
DRAW
- Draws itself with Img.draw passing in requires arguments such as scale, opacity, and rotation speed
Spawns new BgStars.
INIT
- Create new Timer for spawning stars
UPDATE
- Timer.tick, if timer fires spawn new star
Aspiring software engineer and video game developer.
The Landing is a social site for Athabasca University staff, students and invited guests. It is a space where they can share, communicate and connect with anyone or everyone.
Unless you are logged in, you will only be able to see the fraction of posts on the site that have been made public. Right now you are not logged in.
If you have an Athabasca University login ID, use your standard username and password to access this site.
We welcome comments on public posts from members of the public. Please note, however, that all comments made on public posts must be moderated by their owners before they become visible on the site. The owner of the post (and no one else) has to do that.
If you want the full range of features and you have a login ID, log in using the links at the top of the page or at https://landing.athabascau.ca/login (logins are secure and encrypted)
Posts made here are the responsibility of their owners and may not reflect the views of Athabasca University.
We block sites that track your web browsing without your permission. If a link is greyed out, click once to enable sharing, once more to share.
Comments