Bootstrap:Reactive 🖼Show image
Bootstrap:Reactive goes deeper into programming, building events and data structures on top of the foundation laid by our intro courses, allowing students to build far more sophisticated programs. Students learn how the world-based event loop that drives their Bootstrap:Algebra game works, and use it to create animations using simple datatypes for their world. They then learn about data structures, and design a World structure for a sophisticated game of their own design. Bootstrap:Reactive is aligned to the CSTA standards and K-12CS frameworks.
The final project in Bootstrap:Reactive can be used as the Create Task for AP CS Princples!
If you’re teaching remotely, we’ve assembled an Implementation Notes page that makes specific recommendations for in-person v. remote instruction. We provide all of our materials free of charge, to anyone who is interested in using our lesson plans or student workbooks.
- Reviewing the Basics
While learning a new programming language, students review the major concepts and material from Bootstrap:Algebra, including Contracts, Expressions dealing with numbers, strings and images, Variable definitions, Function definitions, and the Design Recipe.
- Introduction to Data Structures
Students discover the need for compound data — data structures — using 2-dimensional animation. They learn the syntax for data blocks, constructors and dot-accessors, and practice each by creating a “digital bakery”.
- Structures, Reactors, and Animations
Students create a complete animation (of a sunset) from scratch, and learn how to use data structures to capture the essence of an animation. They apply the put-image function to draw single frames from data structure instances, and write a function to generate new frame data from previous frame data. They learn how to use reactors to combine their data and functions into a full running animation.
- Functions That Ask Questions
Students are introduced to conditionals using if-expressions, on both built-in data (like numbers) and on programmer-defined data structures. They then use conditionals to implement an animation that goes through distinct phases. They also learn about helper functions, which abstract away frequently-used code to improve readability and reduce duplication.
- Key Events
Students are introduced to another type of event, called on-key. They define a key-event handler that modifies a reactor state to move a character when certain keys are pressed. To handle multiple possible keys, students return to the subject of piecewise functions, giving them more practice with Pyret’s if expressions.
Beginning with a working program, students refactor the code to be more readable, and practice using drawing functions in Pyret
- Your Own Drawing Functions
Starting with a bare-bones reactor, students brainstorm possible animations, and write their own draw-state functions
- Build Your Own Animation
Students create a game of their own design using what they have learned so far.
- Adding Collisions
Using what they know from Bootstrap:Algebra, students write a distance function and collision detection function to handle collisions in their games, this time using the Data Structures and Reactor from their games.
Students extend their State structure to include a score, then modify their game code to change and display that score.
- Adding Levels
Students parameterize other parts of their game, so that the experience changes as the score increases. This track delves deeper into conditionals and abstraction, offering students a chance to customize their games further while applying those concepts.
- Making Pong
Students use the Animation Design Worksheet to decompose a 2-player game of Pong, and implement it in Pyret.
- Going Deeper: Nested Structures
Students refactor code from a simple animation to include structures within structures, and see how to use nested structures in their own games and animations to manage complexity.
- Feature: Timers
Students parameterize other parts of their game, so that the experience changes as a new data field, a timer, changes. This track delves deeper into conditionals and abstraction, offering students two possible uses for a timer feature, and a chance to customize their games further while applying those concepts.
- All the lessons
This is a single page that contains all the lessons listed above.
Of course, there’s more to a curriculum than software and lesson plans! We also provide a number of resources to educators, including standards alignment, a complete student workbook, an answer key for the programming exercises and a forum where they can ask questions and share ideas.
These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, and 1738598). Bootstrap:Reactive by Emma Youndtsmith, Emmanuel Schanzer, Kathi Fisler, Shriram Krishnamurthi, Joe Politz and Dorai Sitaram is licensed under a Creative Commons 4.0 Unported License. Based on a work at www.BootstrapWorld.org. Permissions beyond the scope of this license may be available by contacting schanzer@BootstrapWorld.org.