StarLogoTNG 101 Treasure Hunt Game Unit Wrap Up Today’s Agenda • Review • Mini-lesson and programming practice on set camera and ID • Finish making the treasure game • Create documentation for playing the game • Optional programming activity • Wrap-up Review • The treasure game has a global variable called “mana.” When students accumulate 5 or more mana points, they can spend it by activating a “bonus” mode.” Implement the bonus mode feature. • This “bonus mode” is a global boolean variable, meaning that it’s true when the bonus mode is activated and false when not in bonus mode. • When the bonus mode is true, all the hazards behave like treasures for a certain period of time. At the end of the time, the bonus mode is set back to false. Set Agent Camera, ID, and views • In first person games, it’s helpful to start the game from the player’s perspective. • You do this using the following blocks when you create the player agent in Setup: How will your game end? What are the conditions for winning and losing the game? – Time limit? – Collecting a certain number of treasure? – Losing all “lives”? – Losing all “energy?” – When all the players die? How will you let the player know when the game ends? – Say bubble? – Play a sound? – Agents do a little dance? Documentation for Your Game • “How to Play” document/manual – A few sentences on why the game is fun and what it’s about – Objective of game – how to win – Keyboard controls – Screen shots? • Comments for other programmers – Explain different parts of your program Comments • To add a comment, right-click on any block in the canvas and select “add comment.” • A yellow text box will appear. Click the arrow to make the box larger and type your comments. • You can resize the comment box. Comments • To see which comment box goes with which block, leftclick on the comment box and follow the dotted line. • To delete a comment, right click on the block that the comment is attached to, and select “delete comment.” Optional Programming Activity • Open the current version of your “treasure game your initials.sltng” • Save next version • Swap computers w/ another classmate, play his or her game for a while, and program one more game features to improve his or her game. • Write comments describing any code that you added or changed. To get StarLogo TNG for your home computer Website: http://education.mit.edu/starlogo-tng/download Get your parent/guardian’s permission first! Register, download, install On-line reference of blocks: http://education.mit.edu/starlogo-tng/documentation Wrap Up • • • • What What What What was fun? challenges did you have? questions do you have? new game ideas do you have?
© Copyright 2026 Paperzz