Day 6 Unit 1

Unit 1. Squish the Bug! – Natural Selection

Today, we are going to start building a game that simulates the process of natural selection. To simulate means to imitate to a certain degree. Simulation is something that scientists do frequently to understand what is happening in complex systems.

Before we start developing this game, Let’s begin by watching this video together.

Why did dark-colored rock pocket mice first appear in a population of light-colored rock pocket mice?

Why do dark-colored rock pocket mice on dark lava flows have white bellies?

Are mutations always good or bad?

What is natural selection? How does it affect the traits of a population?

Another video for natural selection:

Open the starter game to get started!

Starter Game: https://scratch.mit.edu/projects/315600955/

Step 1:

Squish the Bug!

How will we know which bugs we have already squashed? Paint a new costume for your beetles that will be the costume when they are clicked on. Then use the event and looks blocks to make your beetles look squashed when they are clicked on.

Step 2:

Growing population!

This beetle population is special because they can clone themselves! However right now we only have one bug. Use the control blocks to clone our bugs and grow our population forever.

After you set up the population to grow, use a “when I start as a clone” and a motion block to make the new bugs pop up all over your background in random positions.

HINT: Beware of major swarms! Consider using another control block to slow down the growth of the beetles to clone only about every second.

Step 3:

Keeping track of the bugs!

We want to know exactly how many beetles we have at all times. Use a variable block to make sure every time a new beetle appears we add 1 to the “large beetles” variable.

Step 4:

Squashed bugs!

Bugs that have already been squished should not be included in our “large beetles” variable. Use a variable block to make sure every time we squish a bug, the “large beetles” variable changes by -1 so we have an accurate count of bugs.


So far, we have built the game with elements of natural selection, including “inheritance”, “reproduction” and “survival”. But, there are more elements to natural selection, such as “variation”, and “differential survival or reproduction”. We are going to continue developing this game tomorrow to include those elements. But, for now, let’s go back to the games we were working on last week.