Top Banner
Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020 Copyright: D. Michael Ploor All Rights Reserved Page 1 of 36 Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation: The CDC (Center for Disease Control) uses a simulation to model the spreading of the Corona Virus infection. In the simulation, the CDC changes different settings to model what will happen based on their decisions. Then the CDC can see how these decisions play out before making recommendations to the public. In this simulation, you will test how Social Distancing helps limit the spread of infection. Complete Sample Lesson Please visit www.g-w.com/video-game-design for textbook samples and lessons by this author. Also, visit www.clickteam.com for tutorials, software licensing and to join the Clickteam community. NOTE: This is a FREE draft quality production and does not fully represent the higher quality of the professionally edited and published lessons found in the textbooks. Enjoy
36

Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Jun 22, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 1 of 36

Build a Corona Virus Infection Simulator

Essential Question:

How does Social Distancing help you avoid the Corona Virus?

Situation:

The CDC (Center for Disease Control) uses a simulation to model the spreading of the Corona Virus

infection. In the simulation, the CDC changes different settings to model what will happen based on

their decisions. Then the CDC can see how these decisions play out before making recommendations to

the public. In this simulation, you will test how Social Distancing helps limit the spread of infection.

Complete Sample Lesson

Please visit www.g-w.com/video-game-design for textbook samples and lessons by this author.

Also, visit www.clickteam.com for tutorials, software licensing and to join the Clickteam

community.

NOTE: This is a FREE draft quality production and does not fully represent the higher quality of

the professionally edited and published lessons found in the textbooks.

Enjoy

Page 2: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 2 of 36

Table of Contents

Build Design and Programming

Software Installation Page 03

Game Map Construction Page 03

Sprite and Object Composition Page 05

Programming Page 11

Module and Subroutine Programming Page 24

Game Tuning and Extension Activities Page 27

Build Resource Lists

Game Object List Page 28

Game Map Page 28

Pseudo Code Page 29

Event List Editor Page 31

STEM Activities

STEM Review Page 33

Science Activities Premium Item (Not Included) Page 37

Technology Activities Premium Item (Not Included) Page 39

Engineering Activities Premium Item (Not Included) Page 41

Math Activities Premium Item (Not Included) Page 43

Cross Curriculum Activities

Reading Extension Premium Item (Not Included) Page 45

Writing Extension Premium Item (Not Included) Page 46

Math Extension Premium Item (Not Included) Page 47

Science Extension Premium Item (Not Included) Page 48

Social Studies Extension Premium Item (Not Included) Page 49

Page 3: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 3 of 36

How to Begin:

1. Download and install Fusion 2.5 Free Edition software from Clickteam.com

2. After installing, launch Clickteam Fusion 2.5 Free Edition.

3. Close any pop-up windows and maximize your view to full screen.

4. Click File > New to start a new game build. This will open the Storyboard Editor.

5. Double Click on the Thumbnail for Frame 1 to open Frame 1 in Frame Editor view. In this view, you

will design the game and build all of the game assets.

6. Click File > Save. Save the game as Corona_Simulator in a location such as your computer desktop

or other location.

Frame Editor Setup:

7. To help align the game art, you will use the SNAP feature to better place the game art into a grid.

8. Locate the Grid Setup button and click it to open the Grid Setup window.

9. Set the Origin to X=0 and Y=0 if not already input by default.

10. Set the Size to Width=32 and Height=32 if not already input by default.

11. Click the Snap to option box to apply a feature that will snap the image to the closest grid point.

12. Click the Show Grid option box to show where the grid point are on the frame.

13. Click [OK] to apply these setting and close the window. This will allow you to make this game as a

tile based game where each game object fits into a tile on the game map.

Page 4: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 4 of 36

Adding Objects to the Frame:

14. Click Insert > New Object from the menu bar. This will open the Create new object window.

15. Select All Objects from the Left side menu.

16. Select Active from the Right side menu.

17. Click [OK] to load this object type and close the window. Your mouse pointer will change to a + to

indicate that it is loaded with an object.

18. Click anywhere on the white part of the frame to place a new Active object on the frame.

19. Double click on the new Active Object to open the object in Image Editor view.

Page 5: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 5 of 36

Graphic Modification:

20. Click the Clear button to erase the default image. The canvas area will clear and display a

faded checkerboard. Checkerboard indicates transparent.

21. Click the Fill button from the left side tool panel.

22. Click the Foreground block and then the Blue color swatch to load the Fill tool with Blue.

23. Click anywhere on the cleared canvas (currently checkerboard filled) to fill the entire canvas with

Blue.

24. Click [OK] to apply the change and close the window.

25. Click on the Blue block object to make it the current object. As a current object, the Properties

Panel will display the information for this object.

26. Find the About tab on the Properties Panel.

27. Change the name of this object to Wall.

28. Click the Size and Position tab on the Properties panel.

29. Set the Position to X=15 and Y=15 to move the object to the top left corner of the game map.

Page 6: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 6 of 36

30. Save your work by clicking the Save button from the Standard Toolbar at the top of the

software window.

Creating All the Game Art Objects:

31. Using the skills from above, insert a new Active object anywhere on the frame.

32. Rename this object as Uninfected, set the Position to X=105 and Y=70, and the Size to Width=16

and Height=16.

33. Double click the Uninfected object to open in Image Editor view.

34. Clear the canvas.

35. Using the Tool panel, change the Zoom by moving the zoom slider to the far right. This will make

the canvas view larger and easier to see. NOTE: you can use the Maximize button in the top right

corner of the window to view the Image Editor full screen. See image on next page.

Page 7: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 7 of 36

36. Click the Ellipse tool from the Tool panel, change the Ellipse attribute to FILLED.

37. Set the Foreground color to a Bright green color swatch just like you did for the Blue Wall.

38. Locate the Coordinate indicator box under the [Play] button. You will use exact coordinates on the

canvas to draw the circle properly.

39. Move your mouse on the canvas until the coordinate indicator reads ( 0, 0 ).

40. Click and drag from ( 0, 0 ) to ( 17, 17 ), then release to draw a perfect circle on the canvas.

41. Click [OK] to apply the changes and close the window.

42. Save your work.

Drawing on Your Own:

43. Using similar skills, create a new Active object with the following properties:

Property Setting

Name Spacing

Position X = -100 , Y = 100 (Note: this is off the frame)

Size Width = 32 , Height = 32

44. Open the Spacing object in Image Editor view.

45. Using skills learned earlier, create an OUTLINED perfect circle with Outline Size = 2 in Light Blue

color. NOTE: Due to Zoom setting, the circle may not be edge to edge on the canvas. See image on

next page.

Page 8: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 8 of 36

46. Click [OK] to apply the changes and close the window.

47. Save your work.

Game Scene Assembly:

48. Right Click (Control + Click on MAC) on the Wall object to open the contextual menu for this object.

49. Select Duplicate from the menu. Duplicate allows for quick copies to be applied to the game map.

50. Change the settings to Rows = 1 and Columns = 20 as shown below.

51. Duplicate the same Wall object in the Top Left corner with Rows = 15, Columns = 1 to build

downward.

52. Duplicate the Wall object in the Top Right corner with Rows = 15 and Columns = 1.

53. Duplicate the Wall object in the Bottom Left corner with Rows = 1, Columns = 20.

54. Select any Wall object and click Edit > Copy.

55. Select Edit > Paste and position the + mouse pointer anywhere on the frame.

56. Change the Position to X = 143 , Y = 271. You can drag and release the Wall object to see the

position, or simply use the Properties panel and type that setting in.

Page 9: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 9 of 36

57. Hold down the [CTRL] key and drag the last placed Wall object one tile to the right and release. This

will copy and paste a new Wall tile in that space. Alternatively, you can use the Copy and Paste

process from steps 54 and 55.

58. Using the skills you have learned build the following design on the game map:

59. Using similar skills, Duplicate the Uninfected object with Rows = 8, Columns = 6, Row Spacing = 4

and Column Spacing = 4 as shown below.

60. Click on any of the duplicated object. Notice that the name of any object is the same as every other

incidence of the object. Each of these objects with the same name can be programmed as a group

with each incident following the same instructions.

61. Save your work.

Cloning Objects:

62. Similar to duplicating, an object can be cloned. If you clone an object, it will be an exact copy but

will have a different name. A cloned object will need different programming as well.

63. Right click (Control + Click MAC) on any Uninfected object in the bottom row and select Clone

Object. See image on next page.

Page 10: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 10 of 36

64. You only need one clone, so use the default settings Rows = 2 and Columns = 1. Click [OK]. One

object will appear below the rest.

65. Set the Properties of the cloned object as follows: Name = Me ; Position ( X=263, Y=135 ).

66. Using skills you have learned, change the Fill color of the circle to Purple.

67. Using the skills you have learned, clone the Me object and set the Properties as follows:

Property Setting

Name Infected

Position X = -25 , Y = 103 (Note: this is off the frame)

Fill Color RED

68. Using the skills you have learned, clone the Spacing object and rename it Spacing 2 positioned

directly below the original.

69. Save your work.

Object Movement:

70. Click on an Uninfected object to display its Properties.

71. On the Movement tab, change the Movement Type to Bouncing Ball.

72. Adjust the Movement Speed and Bounce settings as shown below: See image on next page.

Right click on Bottom Row

Movement tab

Page 11: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 11 of 36

NOTE: Bounce Randomizer occasionally changes the angle of the bounce so the ball does not get stuck

73. Using similar skills apply the same Movement setting to the Me object.

74. Using similar skills apply the same Movement setting to the Infected object.

75. Save your work.

76. Locate the Run Frame button on the Toolbar. Your game will open and the balls will fly off in

random directions but not bounce off of anything. Bouncing needs programming to occur.

Programming:

77. Click the Event Editor button on the Toolbar to enter the programming mode.

78. A single line of programming is called an Event. An Event consists of a Condition and an Action.

Events are best defined as an IF / THEN statement.

IF the Condition is TRUE,

THEN do the selected Actions.

For example:

IF the Start button is clicked,

THEN the game will begin.

79. Click on the words New condition on Line 1 of the Event Editor. A New Condition window will

appear.

80. Click on the Uninfected object (green ball) to display the contextual menu for the object.

81. Select Collision > Another object and click Another object. This will open the Test a collision

window.

Action occurs

Page 12: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 12 of 36

82. Click on the Wall object (Blue square) to select it and click [OK]

83. This built the Condition IF a Collision between Uninfected (green ball) and the Wall (blue square).

84. Right click (Mac Control + Click) in the cell below the Uninfected object (green ball) and select

Movement > Bounce. This applies an ACTION that will occur if the condition is True.

85. Hover the mouse pointer above the green checkmark to display the programming inside the

checkmark.

86. Read the Event by inserting the word IF at the beginning and THEN in the middle.

It reads: IF Collision between (Green Ball) and (Blue Square) THEN (Green Ball) Bounce.

87. Using similar skills program the following:

IF a Collision between the Infected object (Red Ball) and the Wall (Blue Square)

THEN the Infected object (Red Ball) Movement will Bounce.

88. The IF / THEN statement you programmed is not actual code, it is referred to as Pseudo Code.

Pseudo Code is English language for what you are programming. The programmer must translate

the Pseudo Code into the code needed for the program to work.

89. On Line 3, program the following Pseudo Code:

IF a Collision between the Me object (Purple Ball) and the Wall object (Blue Square)

THEN the Me object (Purple Ball) movement will Bounce.

90. Save your work.

91. Run Frame and see if the balls bounce around the room.

92. Close the preview window and return to Fusion 2.5 Free Edition to continue programming.

Faster Programming:

93. On Line 4, program the following Pseudo Code:

IF THEN

Page 13: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 13 of 36

IF a Collision between the Uninfected object (green ball) and the Uninfected object

(green ball)

THEN the Uninfected object (green ball) movement will Bounce.

94. To speed things up, right click (MAC Control + Click) on the 4 for line 4 and choose Copy.

95. Right click (MAC Control + Click) on the 5 for line 5 and choose Paste.

96. In line 5, double click on the first of the Uninfected objects (green ball) and choose the Infected

object (red ball) and click [OK]. The programming was quickly edited instead of built from scratch.

97. In line 5, drag the checkmark from the Uninfected (green ball) to the Infected object (red ball). This

will copy the programming checkmark to the new location.

98. When creating Pseudo Code whereby two Actions need to occur for the same condition, the

conjunction AND can be used. Read line 5 to make certain it matches the following Pseudo Code:

IF a Collision between the Infected object (red ball) and the Uninfected object (green

ball)

THEN the Uninfected object (green ball) movement will Bounce.

AND the Infected object (red ball) movement will Bounce.

99. Using similar skills, copy and paste line 5 into line 6.

100. Edit line 6 to match the following Pseudo Code:

IF a Collision between the Me object (purple ball) and the Uninfected object (green ball)

THEN the Uninfected object (green ball) movement will Bounce.

AND the Me object (purple ball) movement will Bounce.

NOTE: You will have to select the unnecessary Green Checkmark and delete it from under the

red ball column. You can select it and press [Delete] or right click and select Delete from the

menu.

101. Paste line 5 on line 7 as well.

102. Edit line 7 to match the following Pseudo Code:

IF a Collision between the Infected object (red ball) and the Infected object (red ball)

THEN the Infected object (green ball) movement will Bounce.

Remember to delete the unneeded green checkmark under the green ball.

103. Copy and paste line 7 to line 8.

104. Delete all green checkmarks on line 8.

105. Program the condition side of line 8 to match the following Pseudo Code:

Page 14: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 14 of 36

IF a Collision between the Infected object (red ball) and the Me object (purple ball)

106. Click the Event List Editor button on the Toolbar. This displays the entire programming in a

convenient IF / THEN format. Notice that the THEN portion is indented. Indenting the second line is

referred to as intercalating. This helps programmers organize code into a format that is easier to

read. See image on next page.

Page 15: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 15 of 36

107. Save your work. Run the frame and check that all the objects are bouncing off of each other

and the walls.

Hot Key Combinations:

108. Click the Event Editor button from the Toolbar.

109. Click line 8 to select it. You can use key combinations to copy and paste to speed up

programming. NOTE: you can use any other method of copy and paste if you cannot use hot key

combinations.

110. While holding down the Control [Ctrl] key on the keyboard (Command on Mac), also press the

[C] key to Copy. This will copy line 8. This is usually written as (Control + C) or (Command + C) on a

MAC.

111. While holding down the Control [Ctrl] key on the keyboard (Command on Mac), press the [V]

key four (4) times. This will paste 4 copies of line 8. This is usually written as (Control + V)

112. Edit lines 9 through 12 to match the Event List Editor shown below:

IF

THEN

Page 16: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 16 of 36

113. Save your work

Creating Buttons:

114. Click the Frame Editor button on the Toolbar to add more objects to the game map.

115. Select Insert > New Object from the Menu bar.

116. Select Button from the left side menu of the Create New Object window and click [OK].

117. Click anywhere on the frame to place the Button.

118. Double click on the button to change the text inside the button.

119. Type in the following: Add Infected

120. Modify the following Properties for this button:

Property Setting

Name Add

Position X = 480 , Y = 0

Size Width = 110 , Height = 32

121. Clone the Infected button and paste anywhere on the frame.

122. Modify the following Properties for the cloned button:

Property Setting

Button Text Social Distancing

Name Distancing

Position X = 96 , Y = 0

Size Width = 110 , Height = 32

Spacing Object

Spacing Object

Spacing Object

Spacing 2 Object

Button

Page 17: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 17 of 36

123. Clone the Infected button again and paste anywhere on the frame.

124. Modify the following Properties for the cloned button:

Property Setting

Button Text Reset Simulation

Name Reset

Position X = 480 , Y = 448

Size Width = 110 , Height = 32

125. Save your work.

Programming Buttons:

126. Change views to the Event Editor view.

127. On line 13, click the text New condition.

128. In the New Condition window, hover the mouse pointer over the Button icons to reveal

the button names.

129. Select the Add button and click Button Clicked ? from the menu.

130. Right click In the cell where line 13 intersects with the Create New Object column.

131. Select Create Object from the menu.

132. Choose the Infected object from the right side panel and click [OK]. A Create Object window

will pop-up so you can choose the location to spawn the Infected object.

133. Enter the coordinates X = 100 and Y = 350. Notice that a dashed X moves to that location on the

game map. You could have also clicked on that location to place the X.

134. Click [OK] to save the setting and close the window.

135. Hover over the green checkmark on line 13 and read the event. It should match the pseudo

code below:

IF the Add Button is clicked

THEN Create an Infected object (red ball) at coordinates (100, 350)

136. Using similar skills, program line 13 with the following pseudo code:

IF the Distancing Button is clicked

137. Right click where line 13 intersects with the Create New Objects column and select Create

Object from the menu.

138. Choose the Spacing object and click [OK] to close the window and display the Create Objects

window.

Page 18: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 18 of 36

139. This time, you need to select the Relative to: option instead of entering fixed coordinates.

Relative to will retrieve the coordinates of an object and apply the location from where that object

is. This works great because the objects are moving.

140. Select the Uninfected object from the window. The Create Object window should display as

shown below:

141. Click [OK] to close the window and apply the settings.

142. Hover the mouse pointer over the green checkmark on line 13.

143. Read the event. It should read as follows: IF the Distancing button is clicked, THEN create a

Spacing object at (0,0) relative to the Uninfected object (green ball). NOTE: All objects are on Layer

1 for this game design.

144. Next, you need to program an additional action to line 13. Right click where line 13 intersects

with the Create New Objects column and select Create Object from the menu.

145. Using skills you learned, program the following pseudo code:

AND create a Spacing 2 object at (0,0) relative to the Me object.

146. On line 15, program the following pseudo code condition:

IF the Reset button is clicked

147. Right click in the cell where line 15 intersects with the Storyboard Controls icon.

148. Select Restart the application from the menu.

149. Change to the Event List Editor view.

150. Compare your programming to the image below. Debug if needed.

Relative to

Page 19: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 19 of 36

151. Save your work.

152. Click the Run Application button on the Toolbar. Run Application will run all of the frames

of the game instead of Run Frame that runs only event on a single frame of the game.

153. Click the [Add Infected] button. A red ball should be added to the game.

154. Click the [Social Distancing] button. Light blue circles should go around the green balls and

purple ball.

155. Click the [Reset Simulation] button. The game should restart from the beginning.

156. Close the preview window and return to Fusion 2.5 software with the Event Editor displayed.

Debugging Simulation:

157. The simulation is clearly not working correctly. The circles did not move with the objects so

nothing was able to collide to spread the disease.

158. On line 16, click the text New condition.

159. Click the Special Condition icon.

160. Select Always from the menu.

161. Right click in the cell where line 16 intersects with the Spacing object.

162. Select Position > Select Position from the menu. A Select Position window will pop-up.

163. Select Relative to:, choose the Uninfected object (green ball) and click [OK].

164. Make sure your window matches the image below. Click [OK] to apply the settings and close the

window. See image on next page.

Spacing object

Spacing 2 object

Position > Select Position

Page 20: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 20 of 36

165. Hover over the green checkmark on line 16.

166. Read the event and make sure it matches the pseudo code below:

IF Always,

THEN position the Spacing object at (0,0) relative to the Uninfected object

(green ball)

167. Using similar skills, add another Action to line 16 to match the following pseudo code:

AND position the Spacing 2 object at (0,0) relative to the Me object

168. Save your work. Test by clicking the [Social Distancing] button such that the circles travel around

the screen with the objects. Debug if needed.

Catching the Corona Virus:

169. The simulation uses person to person contact to catch the infection. When the Infected person

touches an Uninfected person, the Uninfected person must be changed to Infected.

170. Using the skills you have learned in this lesson, add another Action to line 5 to match the

following pseudo code:

AND Create a new Infected object (red ball) at (0,0) relative to the Uninfected

object (green ball)

171. Using the skills you have learned in this lesson, delete the green checkmark in the cell where

line 5 intersects under the Uninfected object (green ball).

172. Right click in the cell where line 5 intersects with the Uninfected object (green ball).

173. Select Destroy from the menu.

174. Read the programming in line 5 to make sure it matches the pseudo code below:

IF the Infected object collides with an Uninfected object,

THEN create an Infected object relative to the Uninfected object

AND Destroy the Uninfected object

AND set the movement of the Infected object to Bounce

Page 21: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 21 of 36

175. Review the Event List Editor to match your programming for line 5.

176. Save your work.

177. Run the Application and press the [Add Infected] button. A red ball will appear and start

infecting people. Those people will infect others and almost everyone will get infected. Notice the

Spacing circle around one Uninfected person as well as the Me person. The circles should follow the

movement of the objects as they bounce around the game map.

Debugging:

178. The objects placed off screen are being added to the simulation at the start. These should not

appear unless the correct button is pressed.

179. In the Event Editor start a new condition on line 17.

180. Click on the Storyboard Controls icon and choose Start of frame from the menu.

181. Complete the programming of line 17 using the following pseudo code:

IF at the Start of the Frame,

THEN Destroy the Spacing object

AND Destroy the Spacing 2 object

AND Destroy the Infected object

182. Save your work and Run the Application to see that the error is fixed.

183. Run the Application. Wait a few moments for the people to start moving and spreading out.

Click the [Add Infected] button to introduce one infected person into the simulation. Notice how

quickly the infections spreads without any Social Distancing.

184. When all the people are infected except the Me object, click the [Restart Simulation] button to

replay the simulation. Wait a few moments for the people to start moving and spreading out. Click

the [Social Distancing] button to help keep the people apart. Although Social Distancing is

supposed to help keep the infection away, it is not fool proof. The infection can still be transmitted

if infected people get too close, sneeze in your direction, or you handle infected items and touch

your eyes and nose without washing your hands. Click [Add Infected] button to introduce an

infected person to the simulation. Notice that with all the people bumping into each other, that

Social Distancing breaks down and people get infected.

Did You Get Infected?

Page 22: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 22 of 36

185. Currently, the Me object does not interact with the Infected object. The simulation is supposed

to end when the Me object gets infected. That feature will be added later after we add some items

to collect data on the simulation.

Data Counters:

186. Simulations are designed to collect data and help interpret data with different variables. To

collect data in this simulation, you will use Counter objects to store the data.

187. In Frame Editor view, click Insert > New Object.

188. Select the Counter object and click [OK].

189. Place the Counter anywhere on the frame.

190. Double click on the Counter to edit in Image Editor view.

191. Zoom in and select the Fill tool.

192. Change the Foreground color to Yellow and use the Fill tool to fill the 0 with yellow.

193. At the bottom of the Image Editor, click the Frame 2 to display the 1.

194. Fill the black 1 with yellow.

195. Repeat the fill process until all the numbers are yellow instead of black.

196. Click [OK] to apply the settings and close the window.

197. Modify the following Properties for this Counter object with the following:

Property Setting

Name Total Infected

Position X = 468 , Y = 224

Size Width = 20 , Height = 32

198. Clone the Total Infected counter and modify the cloned counter Properties as follows:

Property Setting

Name Start Time

Position X = 148 , Y = 480

Size Width = 20 , Height = 32

199. Clone the Start Time counter and modify the cloned counter Properties as follows:

Property Setting

Name Stop Time

Position X = 148 , Y = 512

Size Width = 20 , Height = 32

200. Clone the Stop Time counter and modify the cloned counter Properties as follows:

Property Setting

Name Encounters

Position X = 308 , Y = 480

Size Width = 20 , Height = 32

201. Applying the skills you have learned, edit the color of only Frame 1 (the Zero number) as shown:

Counter Name Number Color

Start Time Light Green

Stop Time Light Blue

Encounters Red

Page 23: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 23 of 36

Editing the Zero number of each counter will help tell them apart for programming.

It will be changed back to Yellow later.

202. Save your work.

Inserting Text Strings:

203. Programmers use the term String to describe a piece of text.

204. Click Insert > New Object and select the String object from the Right side panel.

205. Click anywhere on the frame to place the String.

206. Double click on the word Text to open the textbox for editing.

207. Replace the word Text with the word Encounters.

208. Click off of the String to save the edited text.

209. Click once on the String again to select it.

210. Edit the string Properties as shown below:

Property Setting

Name String Encounters

Position X = 320 , Y = 448

Size Width = 150 , Height = 17

211. With the string still selected, locate the text tool in the Toolbar.

212. Click the Font button . When the Font window opens, change the Font: to Tahoma, Font

Style: to Bold, and Size: to 12 points. Click [OK] to save the change and close the window.

213. Click the Color button . Select the Yellow color swatch.

214. Clone the String Encounters object and modify the cloned object with the Properties below:

Property Setting

Text Time

Name String Time

Position X = 160 , Y = 448

Size Width = 150 , Height = 17

215. Clone the String Time object and modify the cloned object with the Properties below:

Property Setting

Text Total Infected

Name String Infected

Position X = 480 , Y = 192

Size Width = 150 , Height = 17

Page 24: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 24 of 36

216. Save your work.

Counter Subroutine Programming:

217. A Subroutine is a module of programming that exists outside the main game programming loop.

When activated, the subroutine will attach to the main game programming loop. The module can

be turned on or turned off as needed.

218. In the Event Editor view, right click on the [18] for line 18 to display a menu.

219. Select Insert > A group of events. A Group Events pop-up window will appear.

220. In the textbox for Title of the group, add the following type: Infected Added Module

221. Remove the checkmark for Active when frame starts. The module will require a button to start.

222. Click [OK] without adding a password.

223. The Free Edition software does not have a Date and Time object to insert a Timer. So… you are

building a stopwatch workaround so you can track the time it takes for the infection to spread to the

Me object.

224. On the indented line 19, click the New condition text. The indented line indicates that this line

is inside the subroutine module Infected Added Module.

225. Click on the Timer icon and choose Every from the menu.

226. Check that the default value of 1 second is applied as shown and click [OK].

Right click

Uncheck this

Add Text

Page 25: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 25 of 36

227. Right click in the cell where line 19 intersects with the Start Time counter, and choose Add to

Counter.

228. In the Add to Counter Expression Editor window, type in 1 and click [OK].

229. Read the programming for line 19 and verify that it matches the pseudo code below:

IF Every 1 second

THEN add 1 to the Start Timer

230. On line 13, right click in the cell that intersects with the Special Conditions column.

231. Select Group of events > Activate from the menu.

232. In the Activate pop-up window, select Infected Added Module and click [OK].

233. Save your work and test play to check if the Start Time counter starts when you add the

Infected person.

Stopwatch:

234. Currently, the time begins when the Infected person is added. Next, you will need to program

the time to stop when the Me object gets infected. In the paid version of the software has a built in

Stopwatch attribute. In the Free Version, you are building the Stopwatch with Counter objects.

235. Right click in the cell where line 8 intersects with the Stop Time (Blue) Counter object. You can

hover over the Counters to reveal help text to make sure you select the correct Counter object.

236. Choose Set Counter from the menu. This will open the Set Counter Expression Editor pop-up

window.

1 second

Page 26: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 26 of 36

237. The bottom section of the Expression Editor allow the programmer to Retrieve Data from

another object. Click on the Start Time (Green) Counter and choose Current Value from the menu.

This will build the code value( “Start Time” ) in the Expression Editor as shown below.

238. Click [OK] to save the programming and close the window.

239. Right click on the green checkmark you just created and choose Position > Select Position from

the menu.

240. Using skills learned earlier, program the following pseudo code:

AND set the Position of the Stop Time (Blue) counter to (0,0) relative to the

position of the Start Time (Green) counter.

241. Hover over the green checkmark to verify that your programming matches the image below:

242. Using skills learned earlier, add an action to line 8 to Destroy the Start Time (Green) counter.

Since the Stop Time counter now holds the value of the Start Time counter, the Stop Time counter

will be positioned on top of the Start Time counter. The Start Time counter can be destroyed to

make it appear that the time stopped like a stopwatch.

Code will look like this when finished

Page 27: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 27 of 36

243. Using skills learned earlier, add another action to line 8 for the Total Infected (Yellow) counter

to match the pseudo code below:

AND Add 1 to the Total Infected counter.

244. Drag the green checkmark you just created and drop it in the same column for line 5. This

builds the pseudo code below:

IF a collision between an Infected object and an Uninfected object,

THEN Add 1 to the Total Infected (Yellow) counter.

245. Drag the green checkmark you just dropped in line 5 to the cell where line 12 intersects with the

Encounters (Red) counter. This builds the pseudo code below:

IF a collision between an Infected object and the Spacing 2 object

THEN Add 1 to the Encounters counter.

NOTE: the Spacing 2 object is the Social Distancing ring around the Me object. Each time the

Spacing 2 object repels an Infected person, Social Distancing has kept the Me object from getting

infected.

246. Drag the green checkmark you just dropped in line 12 to the cell where line 13 intersects with

the Total Infected (Yellow) counter. This builds the pseudo code below:

IF the [Add Infected] button is clicked

THEN add an Infected object to the game at position (100,350)

AND Add 1 to the Total Infected counter.

NOTE: You have to add one to this counter as you are inserting an infected person. All other

infections will be calculated automatically.

247. Save your work and test play to see that all of the counters function properly.

Tuning:

248. The Tuning phase of design is when you fine tune the game to remove any unwanted bugs or

continuing actions. In this simulation, the Infection continues even after the Me object should have

been infected. Additionally a bug occurs with the stopwatch. These will all be fixed in this section

by stopping the movement of all of the objects in the simulation.

249. Click the New condition text on line 20 to start a new event inside the Infected Added Module.

250. Click on the Start Time (Green) counter and select Pick or count > Have all “Start Time” been

destroyed from the menu as shown below.

Page 28: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 28 of 36

251. In line 20, add programming to match the pseudo code below:

IF the last Start Time counter has been destroyed

THEN stop the movement of the Infected objects

AND stop the movement of the Uninfected objects

AND stop the movement of the Me object

252. In the Frame Editor, open each of the counter objects in Image Editor view to fill the Zero

number back to Yellow.

253. Save your work. Test play the simulation to see how long you can avoid being infected.

Level Up:

Optional activities to improve the game or simulation

254. Design or download new sprites and game art. Replace the basic game objects to improve the

look of the simulation

255. Create a second level. Add in different buildings, businesses and street views to improve the

look of the simulation.

256. On a new level with buildings and businesses, create a model to test closing non-essential

businesses on the spread of the virus.

257. Program recovery, sick, asymptomatic carriers and death components to a simulation model or

level.

258. Program age of people with risk to age groups of sickness and death into a simulation model or

level.

259. Brainstorm ideas for how to add features or new levels such as Hand Washing, Safer at Home,

Virus Screening, Wearing Masks, Sanitized Cleaning or other variable that can influence the

modeling of the spread of the Corona Virus.

260. Program any item from your brainstorm session into a simulation model or level.

Page 29: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 29 of 36

Game Object List Resource:

Game Map and Object Placements: Game Map 640 by 480, Grid size 32 by 32 pixels

Page 30: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 30 of 36

Pseudo Code Resource:

Below is the completed game programming written in Pseudo Code.

Line # Event

1 IF a collision between an Uninfected object and the Wall object THEN the Uninfected object movement will Bounce

2 IF a collision between an Infected object and the Wall object THEN the Infected object movement will Bounce

3 IF a collision between an Me object and the Wall object THEN the Me object movement will Bounce

4 IF a collision between an Uninfected object and another Uninfected object THEN the Uninfected object movement will Bounce

5 IF a collision between an Infected object and an Uninfected object THEN the Infected object movement will Bounce AND an Infected object will be created at (0,0) relative to the Uninfected object AND the Uninfected object will be destroyed AND add 1 to the Total Infected counter

6 IF a collision between a the Me object and an Uninfected object THEN the Uninfected object movement will Bounce AND the Me object movement will Bounce

7 IF a collision between an Infected object and another Infected object THEN the Infected object movement will Bounce

8 IF a collision between an Infected object and the Me object THEN add 1 to the Total Infected counter AND set the Stop Time counter to the current value of the Start Time counter AND set the Stop Time counter position to be (0,0) relative to the Start Time counter AND destroy the Start Time counter

9 IF a collision between an Infected object and the Spacing object THEN the Infected object movement will Bounce

10 IF a collision between an Uninfected object and the Spacing object THEN the Uninfected object movement will Bounce

11 IF a collision between an Me object and the Spacing object THEN the Me object movement will Bounce

12 IF a collision between an Infected object and the Spacing 2 object THEN the Infected object movement will Bounce AND add 1 to the Total Infected counter

13 IF the Add Infected button is clicked THEN create a new Infected object at (100,350) AND Activate the Infected Added Module AND add 1 to the Total Infected counter

14 IF the Social Distancing button is clicked THEN create a new Spacing object relative to the Uninfected object AND create a new Spacing 2 object relative to the Me object

15 IF the Reset Simulation button is clicked THEN restart the application

16 IF Always

Page 31: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 31 of 36

THEN set the position of the Spacing object at (0,0) relative to the Uninfected object THEN set the position of the Spacing 2 object at (0,0) relative to the Me object

17 IF at the Start of the frame THEN destroy the Spacing object AND destroy the Spacing 2 object AND destroy the Infected object

18 Infected Added Module Subroutine

19 IF every 1 second THEN add 1 to the Start Time counter

20 IF the last Start Time counter has been destroyed THEN stop the movement of the Uninfected object AND stop the movement of the Infected object AND stop the movement of the Me object

Event List Editor Resources on next page

Page 32: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 32 of 36

Event List Editor Resource:

Below is the completed game programming displayed in Event List Editor.

Page 33: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 33 of 36

STEM Review:

1. Run the simulation without using the Social Distancing. Start the simulation and wait a few

moments for the Uninfected to spread out. When you think the Me object is in the best place to

avoid infection, add the infected person to the simulation. Complete to complete the data table

below for the 5 trials of this simulation:

No Social Distancing Simulation

Trial Time Elapsed (Seconds) Total Infected Total Encounters

1

2

3

4

5

2. Run the simulation with Social Distancing. Start the simulation and wait a few moments for the

Uninfected to spread out. When you think the Me object is in the best place to avoid infection,

apply Social Distancing. Check to see if any of the Uninfected are stuck together. If so, reset the

simulation to avoid this error. Add the infected person to the simulation. Complete to complete the

data table below for the 5 trials of this simulation:

With Social Distancing Simulation

Trial Time Elapsed (Seconds) Total Infected Total Encounters

1

2

3

4

5

3. Compile the results of your trials using the table below:

Data No Social Distancing With Social Distancing

Sum Time Elapsed (Add all 5 amounts together)

Average Time Elapsed (divide by 5)

Sum Total Infected (Add all 5 amounts together)

Average Total Infected (divide by 5)

Sum Total Encounters (Add all 5 amounts together)

Average Total Encounters (divide by 5)

Science Technology Math Reading Writing Social Studies

Page 34: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 34 of 36

4. Analyze the data from question 3. Write a one paragraph summary of 3 to 6 sentences to explain

how applying social distancing changed the results in the two simulation experiments. Cite specific

evidence in to support your claim.

5. You used Fusion 2.5 Free Edition to program events containing Actions and Conditions. Use the

space below to explain how this technology is used to assemble an event from pseudo code.

6. Social Distancing has caused major changes to the social structure of the country and your local

community. In the space below, explain how social distancing has changed the elements of your

life.

Science Technology Math Reading Writing Social Studies

Page 35: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 35 of 36

7. The simulation did not evaluate the influence of washing hands and cleaning on the spread of the

coronavirus. Use the Internet to research the structure of the Coronavirus. Why is soap important

to destroying the virus?

8. Think about how you could add cleaning and hand washing into the simulation. Explain how you

would modify the simulation to make people less likely to catch the virus if they are effectively hand

washing.

9. Research how a Safer at Home and Quarantine policies can help defeat the coronavirus. Explain

how you would modify the simulation to add implement these policies.

Science Technology Math Reading Writing Social Studies

Page 36: Build a Corona Virus Infection Simulator€¦ · Build a Corona Virus Infection Simulator Essential Question: How does Social Distancing help you avoid the Corona Virus? Situation:

Corona Virus Simulator Fusion 2.5 Free Edition April 05, 2020

Copyright: D. Michael Ploor All Rights Reserved Page 36 of 36

10. Compare and contract objects that are copied versus objects that are cloned. In the simulation, the

Uninfected objects were copies of a single entity whereas the counters were clones. Assume that

you have a game object named Face. You create one instance of the Face called Copyface that is a

copy of the Face. You create a second instance of the Face object called Cloneface that is a clone of

the Face.

a. How are Copyface and Cloneface similar?

b. How are Copyface and Cloneface different?

Science Technology Math Reading Writing Social Studies