CS110 Chapter Notes - Chapter 5: Finite-State Machine, Arrow Keys, Frame Rate

57 views11 pages

Document Summary

In this document, another application of fsm is examined. To be specific, moore machine is used because the output (i. e. behavior of playable character depends purely on its state) The list of quadruplets that represent the graphic animation sequence is as follows: The same is done for walk, jump up, jump down, dash, saber type 1 and saber type 2 cycles: the behaviors of the playable character include its position (x and y), health point, state, x-direction velocity, y-direction velocity. Afterward, (when init changes to zero) the y-velocity iteratively halves until reaching zero. At this point, the state is changed into jump down state and init is set to one again. 4: similarly, when jump down loop is initialized, the y-velocity is 10 downwards; afterward (as init becomes zero) the y-velocity increases by 50% until the character"s bottom point intersects with the ground rect (handled by collideg function).

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents