Overview
Learning Objectives
Evidence Statements
Product Outcomes
Materials
Pens/pencils for the students, fresh whiteboard markers for teachers
Class poster (List of rules, design recipe, course calendar)
Editing environment (Pyret Editor)
Student workbooks
Language Table
Preparation
Seating arrangements: ideally clusters of desks/tables
The BS:2 blank game template preloaded on students’ machines.
- It’s time to look at the World for your game!
Turn to Page 31 in your workbook. What are the things in your world? What datatypes are they?
Open the BS:2 blank game template.
In Bootstrap:1, you started with the shell of a game, with some sample images and functions defined. In this class the game template is just a collection of comments, telling you how to organize your functions and variables. You’ll be writing every line of code yourself. Let’s begin:At the top of the file, where it says # The World is a, define the world structure for your game. (Check Page 32 to jog your memory.) Once you have the world struct, scroll down to where it says # STARTING WORLD and define your first example world: name it worldA. On the next line, add worldB.
- So now you have your world, and you know what’s in it: but what do those things look like? You’ll have to add some images. We’ll use the image-url function. It takes in the URL of any image online (given as a string), and returns that image.
Look back at Page 31 in your workbook. How many things in your game will need their own image?
Using Google Image Search or a similar tool, find images for the background and for each of the characters in your game.
Define new variables for your images, (i.e. PLAYER-IMG, DANGER-IMG, etc.) and use the image-url function to put them into your game file.
Some hints for finding images: Your images should be in PNG or GIF format, and the url should contain the file type (i.e. .png or .gif) at the end. Background images should be 640x480, and character images should generally be no larger than 200px in either dimension. Make sure that the character images have transparent backgrounds! TIP: use animated GIFs for the characters - not only does the animation make the game look a lot better, but these images usually have transparent backgrounds to begin with.You can find students’ images ahead of before class to save time, and use the image-url function to put them into a blank game file for each pair of students.