Presentation is loading. Please wait.

Presentation is loading. Please wait.

StarLogoTNG 101 Treasure Hunt Game Unit Lesson 6: Terrain.

Similar presentations


Presentation on theme: "StarLogoTNG 101 Treasure Hunt Game Unit Lesson 6: Terrain."— Presentation transcript:

1 StarLogoTNG 101 Treasure Hunt Game Unit Lesson 6: Terrain

2 Today’s Agenda Review and share ideas Mini-lesson on using the terrain editor Activity on using terrain editor Mini-lesson on new blocks that change terrain Programming activity on using new blocks in treasure hunt game Wrap-up

3 Review How do you code the following game features? When you create the treasure, set their size randomly (from size 1 to size 3). When the player collides with a treasure, the score gained is equal to the size of the treasure times 100 (e.g., size 1 treasure is worth 100 points, etc.). When a moving enemy agent collides with a treasure, the color of the treasure is set to orange. If the player collides with an orange treasure, the score is reduced by the size of the orange treasure times 100.

4 Terrain Recall first program. What did the “terrain” in spaceland look like? The color patches, hills, craters, platforms, etc. are created using the terrain editor.

5 Terrain Editor Click on “Edit Terrain” in Spaceland so that the editor pops up. A grid overlay will also appear. Now, when you click, hold, and drag on the terrain, you can create a patch of any size and then modify it using the options in the editor. Besides repeatedly clicking on the buttons in the editor to raise or lower patches, you can also use keyboard shortcuts plus the mouse wheel. Mouse over each option of the editor to see a short description, keyboard shortcuts, and mouse wheel shortcuts. Make the selected region “level” with a height of 0. Raises the selected region in a mound (hill) shape. Lowers the selected region in a pit (crater) shape. Raises the height of the selected region in a platform shape. Lowers the height of the selected region in a platform shape.

6 Draw Tab Click on the Draw tab. You can use the tools here to draw with your mouse on the terrain and even import an image to put on the terrain. Adjust the sliders to make different colors. For more information on these tools, see tutorial “How to use the Draw Tab.pdf”. If you want to match the colors to the colors blocks, see “RGB values of color blocks.doc”.

7 Terrain Editor Practice File menu > Open project “terrain practice.sltng” Save next version Set up and Run the project once. Report your score. Use the terrain editor to make one change to the terrain in Spaceland. Predict how your change will affect the score. Set up and Run the game. How did your modifications affect the score?

8 Terrain Editor Practice Challenge! In 10 minutes, design a terrain so that during one run of the game (full 30 sec) in which the turtles move forward 1 step forever, the score is as close to zero as possible. Your terrain should have some patches that are higher than 0 and some patches that are lower than 0.

9 New block: Stamp Found in the Terrain drawer. Takes a color argument. When executed by an agent, the agent changes the color of the area that it is currently standing on to the color argument.

10 New block: Build Found in the Terrain drawer. Take a pink number argument that specifies a change in height. When executed by an agent, the agent increases the height of patch that it is currently standing on by the value of the pink block.

11 New block: Dig Found in the Terrain drawer. Takes a pink block that specifies a change in height. When executed by an agent, the agent decreases the height of patch that it is currently standing on by the value of the pink block.

12 New block: Yank Found in the Terrain drawer. Take a pink number argument that specifies a change in height. When executed by an agent, the agent increases the height of patch that it is currently standing on by the value of the pink block. How is Yank different from Build?

13 New block: Stomp Found in the Terrain drawer. Takes a pink block that specifies a change in height. When executed by an agent, the agent decreases the height of patch that it is currently standing on by the value of the pink block. What is the difference between Stomp and Dig?

14 Programming Activity Open the current version of your “treasure game your initials.sltng” Save next version Brainstorm ways to use Stamp, Build, Dig, Yank, and Stomp blocks in your treasure hunt game. Hint: If you do use these blocks in your game, you should include a “clear patches” block in the Setup block. How can you use them in collisions? Or as keyboard controls? Implement one or two of your ideas.

15 Wrap Up What strategy did you use to make a terrain that would give you a score close to 0 in first program? What terrain blocks did you add to your treasure game? How do they change the game? What worked? What didn’t work? What challenges did you have? What was fun? What questions do you have? What new game ideas do you have?


Download ppt "StarLogoTNG 101 Treasure Hunt Game Unit Lesson 6: Terrain."

Similar presentations


Ads by Google