Humanities Home page   Office of Digital Humanities
Back     BYU LiveCode Lessons Gateway

Game Loop Stack Assignment

In class we went through the process of creating constant motion elements in a stack using a "game loop", a special set of scripts in the stack and card that constantly send an updateScreen message to the card.

The first example we looked at was the "blastoff" stack, in which we built a simple animated rocket.

We used the same basic framework to create a side-scrolling animation that incorporated a constant-motion scrolling background in addition to a moving vehicle that can accelerate and decelerate. The key is to use the updateScreen handler in the card script to update the object motion on the card.

Using the blastoff.livecode stack and the sideScroller.livecode stack as examples, create your own stack with constant motion objects in it. Successful completion of this assignment will require that you study, understand and modify the card and stack scripts used in the models. You should pay special attention to the updateScreen handler in the cards scripts of the two stacks.

Modify your stack from the models in at least three of the following ways:

Test your stack on a simulator or mobile device and be prepared to demonstrate it to the instructor. Turn your stack into the Application Drop folder on the DigHT 310 server by the next class period.


Back     BYU LiveCode Lessons Gateway
Maintained by Devin Asay.
Copyright © 2005 Brigham Young University.
This page last updated on February 11, 2016 16:34:03.