1 of 10

Making Game Images

@BootstrapWorld

2 of 10

The Game Starter File

By now you’ve learned about defining values, composing functions, and reading contracts.

Taken together, that’s a lot of code you’re now able to understand!

It’s time to flex your reading skills, and look at the file you’ll be working with to build your video game.

3 of 10

The Game Starter File

Read through the Blank Game Starter File.

This file contains a lot of code! Some of it you haven’t seen before.

Going line-by-line, talk with your group about what you think each line does.

4 of 10

The Game Starter File

  • What familiar things did you see in the Game Starter File file?
  • What were some unfamiliar things? Any idea what they might do?
  • What data type is GAME-TITLE? What data type is BACKGROUND?
  • What does SCREENSHOT return in the Interactions area?
  • Did anyone try pressing Run? What happens when you press Run?*
  • What do you think image-url does?

5 of 10

Finding Your Game Images

image-url :: String -> Image

  • This function takes in a web address for an image, and produces the image! (Is it in your contracts page?)
  • You can use rotate, scale, etc. with this image!
  • Save a copy to your account

6 of 10

Finding Your Game Images

7 of 10

Finding Your Game Images

Find an image you like, making sure it’s transparent. Then save it using a good name.

8 of 10

Finding Your Game Images

Upload to GDrive, and make sure sharing settings allow anyone with the link to view.

9 of 10

Finding Your Game Images

Open your game file, click “Images”, and select an image

It will insert the code to display the image using image-url.

10 of 10

Finding Your Game Images

  • What functions were most useful in helping you customize your images to make your game look and feel how you want it?
  • How did you make use of function composition in customizing your images?