CMPT 166 Lecture Notes - Lecture 9: Global Variable, Local Variable, Ellipse

90 views9 pages

Document Summary

In these notes you will learn: how to make an object move by itself in a straight line at different speeds, how to increment numeric variables, the distinction between local variables and global variables. We"ve seen how to make things follow the mouse using the mousexand mousey variables, and so now lets turn to the topic of making things move on their own. The basic trick for making a 2-dimensional animated object move is to change it"s (x, y) location on each call to draw(). In this course we are not concerned with the actual physical equations that govern the movement of objects. As long as the movement looksgood enough, then we will leave it at that. This is a pretty common approach when you are making animations for simple video games, where how things look is often more important than accurately simulating the real world.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents