Bryneven Primary Presents Gr 6 football Challenge
We move with a swipe -directing a football around a screen. This assigns a function variable type (there are still strings and numbers). We use a call to use the function code. The function variable is properly named – to provide some kind of understanding of what it does.
The collision event -which is occurring when the ball hits the border. The movement through the code blocks brings up the logic – defined by the ball’s behaviour in our programming e.g., how it returns to its original position on the X and Y axis.
We glance at JavaScript for a moment. Seeing how the script relates to the code blocks. The soccer ball movement is determined by speed and swipe angle. When the is touches against the opposite side, it has to re-place itself – returning to its original position, the starting point. The starting position is determined by putting the game in play mode to see the position X and Y. The positions X and Y are shown in the watch variable. That swipe direction and speed controls the ball. We will also show how to turn on the visibility of the watch variable, while in play mode.
A score triggers a sound and increases the display showing the number of goals scored. When the ball hits the target, the trigger calls the function variable, used to reset the ball to the starting point. This starting point is its position on the x and y axes. The movement of the ball is affected by friction. Friction is created – based on the definition of variables (a function in this case). Friction determines how a moving ball slows down as it moves across the field.
The importance of the sequence of coding blocks comes up; they must be sorted – we will read the code blocks, starting from the top.
The descriptiveness in the naming of a function -a proper name helps us understand what it does. An appropriate collision event triggers the code to play the sound.
Until this point, we had not yet discovered the creation and use of variables. However, we emphasize that the variable must be declared initially – showing examples where our code does not know what the variable is.
We know a variable must be declared first: a function variable – with the appropriate block. We could have declared a string or a number.
The yellow border defines a block of code – in this case; an instance shows declared function variable. The movement of the football is limited by the friction variable. Friction holds back its movement.
We examine the use of assigning a random speed in a nutshell. Our programme provides a number in the range of 1 to 10. Learners are encouraged to explore and use this activity; all the challenges need to be analyzed. The blue question mark button accesses help; getting a video.
This fun football activity seems to be based on real knowledge of the game. It is good: it brings together a wealth of knowledge to be built upon. This is especially true for those who play the thought: seeing themselves making games. I can see how certain elements can be used in mathematics and physical sciences too. I hope that my dear colleagues will investigate and explore this -to see into that. Thank you
