SlideShare a Scribd company logo
1 of 5
Download to read offline
GAMECODIZATION 
Learning how to code 
through game development 
This 2014/2015 school year’s first term is about to expire. After approximately 8 lessons of coding 
(less than 8 hours of work), and one week for project development (homework time) the final 
results are really awesome, taking in count that: 
1. Students didn’t have any previous knowledge about coding. 
2. They didn’t know anything about game strategies. 
As a picture’s worth a thousand words, have a look at this video to see some examples: 
http://goo.gl/4gSQZI 
Here you have some of my first conclusions about this exciting project called Gamecodization 
(more at gamecodization.com): 
1. Different levels of students: superb (20%), average (70%), poor (10%). 
1.1. I divided coding exercises in stages, so all students could catch up eventually. 
1.2. I had to consider repeating 1 session for the lost ones.
2. Student types: 
2.1. Engaged: they know what they’re doing. They use pseudocode wisely. They 
understand and solve. They want to learn deeper. 
2.2. Robotic: they translate pseudocode without much understanding. They don’t really 
know where to place code (inside loops, conditions…). 
2.3. Lazy: they need to have most of the pieces in place to start understanding things. 
3. Pseudocode: 
3.1. It’s key to help students in the beginning. 
3.2. It can be a problem when students just do things robotically, translating from 
pseudocode to code without further understanding. 
4. Debugging. 
4.1. Students don’t read compiler’s messages, they prefer to ask the teacher. 
4.2. There are plenty of problems with variable names due to case sensitiveness. 
4.3. I instructed my students to use PRINT sparingly to know variables’ states. 
5. Exercise phases: a single exercise can have many stages (increasing complexity). Start 
really simple and build on them more layers. Examples: 
5.1. Guess the number. Stages: 
5.1.1. Calculate a random number and print it properly (no decimals). 
5.1.2. Read a number from the console and print it. 
5.1.3. Now compare both numbers, for higher than and lower than. 
5.1.4. Loop everything until the win state is reached. 
5.1.5. Include other elements: messages, points, leaderboards, preferences. 
5.2. Avoid long, tedious exercises to avoid students getting stuck. 
6. Homework: 
6.1. Aside of coding games, basic exercises are of help to clarify some concepts: 
6.1.1. Basic operations: use of the console, file I/O. 
6.1.2. Arranging of elements. 
6.1.3. Dynamic data structures. 
6.1.4. Etc. 
6.2. I gathered my students in groups and gave them flipped resources so they could 
group in teams at home. 
7. Assessment: 
7.1. Projects in pairs (in three people groups one of the participants tends not to work 
as hard as the rest). 
7.1.1. Ask for pseudocode and code: the last one could not execute in the last 
time. And as a teacher you can always check the pseudocode to tutor them 
better. 
7.1.2. Some interesting and easy games to develop.
7.1.2.1. Escape the maze. 
7.1.2.2. Arkanoid. 
7.1.2.3. Asteroids. 
7.1.2.4. Snake. 
7.1.2.5. Frogger. 
7.1.2.6. Space invaders. 
7.1.2.7. Other of their choice. 
7.2. Test exam: 
7.2.1. This will make them memorize better basic instructions (LET, PRINT…). 
Otherwise they’ll feel they don’t have to bear anything in mind, and they’ll 
waste lots of time checking compiler’s help all the time. 
7.2.2. Anyway, I made it easy, in the end you want to keep fun in your classes. 
7.3. Grade: you have three elements for grading. 
7.3.1. Theory: test. 
7.3.2. Practice: pseudocode and code (if code works well pseudocode shouldn’t 
grade anymore). 
7.3.3. Attitude, interest, behaviour. 
8. Game structure for arcades: for this first stage all the game developed have been based in 
the following algorithm. 
8.1. Initialization. 
8.2. Main loop 
8.2.1. Movement. 
8.2.2. Laser 
8.2.3. Enemies. 
8.2.4. Collisions. 
8.2.5. Items (keys…). 
8.2.6. Win­state 
check. 
8.3. End of game 
8.4. Leaderboard. 
The main strategy for teaching coding through games has been: 
1. The idea is not to teach the coding language used (in this case Basic256), but to teach 
coding basis (sequences, conditions and loops) and strategies to build games. 
2. As lessons went ahead, I maintained a document (a sort of a cheat sheet), so they could 
know what instructions and concepts had been worked with, so they didn’t need to check 
the official documentation over and over. 
3. It’s key to start teaching very basic things through a simple game, in this case “Guess the 
number”.
a. Print on the text console. 
b. Read a number from the console. 
c. Calculate a random number. 
d. Compare both numbers. 
e. Repeat the operation until the number is guessed. 
4. With the previous game you’ve covered the three structures and some instructions, as 
PRINT, READ, RAND, LET; WHILE, IF THEN. 
5. The students shouldn’t be breaking their heads trying to figure out complex things. For 
example, I gave them enough information to calculate a random number, as 
INT(RAND*10). The same goes for spaceship movement, collisions, point scoring and so 
on. It’s like giving them basic pieces so they can combine them in different ways to create 
a wide range of outcomes. 
6. I passed rapidly to graphic based games. Visuals are key for students. For the second 
exercise we developed a rebounding point: 
a. Concepts of x,y positioning (plot). 
b. Variable for controlling the direction of the point (NE, NW, SE, SW). 
c. Out­of­bounds 
control, to make the point move properly. 
7. For the third exercise we started developing the Asteroids game (reduced version). In it I 
introduced the concepts of game structure (main loop), etc. Challenges took the form of: 
a. How to move several elements at the same time: they tried using FORs, popping 
up the concept of time slicing. 
b. How to set an element’s life­cycle 
in the main loop (as a laser), also popping the 
concept of flags. 
c. One of the topmost curious things was the fact that some students had the 
tendency to include code out of the main loop, revealing they hadn’t understood 
correctly previous concepts. 
8. Other aspects, as sprite collision, were easier to solve, as basic256 includes several ad­hoc 
functions. It is so easy to manage you don’t even need arrays to structure your sprites, as 
you can use expressions like SPRITEPLACE 1, SPRITEX(1)+5, SPRITEY(1) to move the sprite 
#1 to the right 5 positions. 
9. After finishing the basic version of asteroids we started including other elements: 
explosions, animations, points, leaderboards... 
10. As a final project my students had the opportunity to choose a game and develop it in 
groups (check the video).
BIO 
Andoni Sanz /ʌnˈdɔnɪ sʌnθ/ is a Computer Scientist working as a STEM Teacher 
and Educational Technologist. Google Certified Educator and Moodle expert 
he’s immersed in a non-stop research on technology applied to education, 
combined with the latest pedagogy trends, as blended learning or 
gamification. 
Actually he’s working on Gamecodization: teaching how to code through game 
development. 
Looking forward to collaborating in interesting projects, don’t hesitate to contact him: 
Website: http://www.andonisanz.com 
Blog: http://andonisanz.blogspot.com 
Coding: http://www.gamecodization.com 
Twitter: @andonisanz 
Facebook: https://www.facebook.com/andonisanzteacher 
LinkedIn: https://www.linkedin.com/in/andonisanz

More Related Content

More from Andoni Sanz

Logo programazio mintzairaren eskuliburua
Logo programazio mintzairaren eskuliburuaLogo programazio mintzairaren eskuliburua
Logo programazio mintzairaren eskuliburua
Andoni Sanz
 

More from Andoni Sanz (13)

BerrIKT IES Unamuno hitzaldia Bilbao
BerrIKT IES Unamuno hitzaldia BilbaoBerrIKT IES Unamuno hitzaldia Bilbao
BerrIKT IES Unamuno hitzaldia Bilbao
 
Eskola digitala 2017
Eskola digitala 2017 Eskola digitala 2017
Eskola digitala 2017
 
#Educational #neuroscience (by Andoni Sanz)
#Educational #neuroscience (by Andoni Sanz)#Educational #neuroscience (by Andoni Sanz)
#Educational #neuroscience (by Andoni Sanz)
 
#Gamification mechanics in #education (Andoni Sanz)
#Gamification mechanics in #education (Andoni Sanz)#Gamification mechanics in #education (Andoni Sanz)
#Gamification mechanics in #education (Andoni Sanz)
 
Gwc15 - haidei presentation - (@andonisanz)
Gwc15 - haidei presentation -  (@andonisanz)Gwc15 - haidei presentation -  (@andonisanz)
Gwc15 - haidei presentation - (@andonisanz)
 
#Moodle + #gamification (Andoni Sanz)
#Moodle + #gamification (Andoni Sanz)#Moodle + #gamification (Andoni Sanz)
#Moodle + #gamification (Andoni Sanz)
 
Gamecodization
GamecodizationGamecodization
Gamecodization
 
Blogging for students
Blogging for studentsBlogging for students
Blogging for students
 
Malware cleaning
Malware cleaningMalware cleaning
Malware cleaning
 
#Gamification and #moodle: the how to's (@andonisanz)
#Gamification and #moodle: the how to's (@andonisanz)#Gamification and #moodle: the how to's (@andonisanz)
#Gamification and #moodle: the how to's (@andonisanz)
 
Web-gune itzelak eskura
Web-gune itzelak eskuraWeb-gune itzelak eskura
Web-gune itzelak eskura
 
The Internet
The InternetThe Internet
The Internet
 
Logo programazio mintzairaren eskuliburua
Logo programazio mintzairaren eskuliburuaLogo programazio mintzairaren eskuliburua
Logo programazio mintzairaren eskuliburua
 

Recently uploaded

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Recently uploaded (20)

How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 

Gamecodization: teaching how to code through game development

  • 1. GAMECODIZATION Learning how to code through game development This 2014/2015 school year’s first term is about to expire. After approximately 8 lessons of coding (less than 8 hours of work), and one week for project development (homework time) the final results are really awesome, taking in count that: 1. Students didn’t have any previous knowledge about coding. 2. They didn’t know anything about game strategies. As a picture’s worth a thousand words, have a look at this video to see some examples: http://goo.gl/4gSQZI Here you have some of my first conclusions about this exciting project called Gamecodization (more at gamecodization.com): 1. Different levels of students: superb (20%), average (70%), poor (10%). 1.1. I divided coding exercises in stages, so all students could catch up eventually. 1.2. I had to consider repeating 1 session for the lost ones.
  • 2. 2. Student types: 2.1. Engaged: they know what they’re doing. They use pseudocode wisely. They understand and solve. They want to learn deeper. 2.2. Robotic: they translate pseudocode without much understanding. They don’t really know where to place code (inside loops, conditions…). 2.3. Lazy: they need to have most of the pieces in place to start understanding things. 3. Pseudocode: 3.1. It’s key to help students in the beginning. 3.2. It can be a problem when students just do things robotically, translating from pseudocode to code without further understanding. 4. Debugging. 4.1. Students don’t read compiler’s messages, they prefer to ask the teacher. 4.2. There are plenty of problems with variable names due to case sensitiveness. 4.3. I instructed my students to use PRINT sparingly to know variables’ states. 5. Exercise phases: a single exercise can have many stages (increasing complexity). Start really simple and build on them more layers. Examples: 5.1. Guess the number. Stages: 5.1.1. Calculate a random number and print it properly (no decimals). 5.1.2. Read a number from the console and print it. 5.1.3. Now compare both numbers, for higher than and lower than. 5.1.4. Loop everything until the win state is reached. 5.1.5. Include other elements: messages, points, leaderboards, preferences. 5.2. Avoid long, tedious exercises to avoid students getting stuck. 6. Homework: 6.1. Aside of coding games, basic exercises are of help to clarify some concepts: 6.1.1. Basic operations: use of the console, file I/O. 6.1.2. Arranging of elements. 6.1.3. Dynamic data structures. 6.1.4. Etc. 6.2. I gathered my students in groups and gave them flipped resources so they could group in teams at home. 7. Assessment: 7.1. Projects in pairs (in three people groups one of the participants tends not to work as hard as the rest). 7.1.1. Ask for pseudocode and code: the last one could not execute in the last time. And as a teacher you can always check the pseudocode to tutor them better. 7.1.2. Some interesting and easy games to develop.
  • 3. 7.1.2.1. Escape the maze. 7.1.2.2. Arkanoid. 7.1.2.3. Asteroids. 7.1.2.4. Snake. 7.1.2.5. Frogger. 7.1.2.6. Space invaders. 7.1.2.7. Other of their choice. 7.2. Test exam: 7.2.1. This will make them memorize better basic instructions (LET, PRINT…). Otherwise they’ll feel they don’t have to bear anything in mind, and they’ll waste lots of time checking compiler’s help all the time. 7.2.2. Anyway, I made it easy, in the end you want to keep fun in your classes. 7.3. Grade: you have three elements for grading. 7.3.1. Theory: test. 7.3.2. Practice: pseudocode and code (if code works well pseudocode shouldn’t grade anymore). 7.3.3. Attitude, interest, behaviour. 8. Game structure for arcades: for this first stage all the game developed have been based in the following algorithm. 8.1. Initialization. 8.2. Main loop 8.2.1. Movement. 8.2.2. Laser 8.2.3. Enemies. 8.2.4. Collisions. 8.2.5. Items (keys…). 8.2.6. Win­state check. 8.3. End of game 8.4. Leaderboard. The main strategy for teaching coding through games has been: 1. The idea is not to teach the coding language used (in this case Basic256), but to teach coding basis (sequences, conditions and loops) and strategies to build games. 2. As lessons went ahead, I maintained a document (a sort of a cheat sheet), so they could know what instructions and concepts had been worked with, so they didn’t need to check the official documentation over and over. 3. It’s key to start teaching very basic things through a simple game, in this case “Guess the number”.
  • 4. a. Print on the text console. b. Read a number from the console. c. Calculate a random number. d. Compare both numbers. e. Repeat the operation until the number is guessed. 4. With the previous game you’ve covered the three structures and some instructions, as PRINT, READ, RAND, LET; WHILE, IF THEN. 5. The students shouldn’t be breaking their heads trying to figure out complex things. For example, I gave them enough information to calculate a random number, as INT(RAND*10). The same goes for spaceship movement, collisions, point scoring and so on. It’s like giving them basic pieces so they can combine them in different ways to create a wide range of outcomes. 6. I passed rapidly to graphic based games. Visuals are key for students. For the second exercise we developed a rebounding point: a. Concepts of x,y positioning (plot). b. Variable for controlling the direction of the point (NE, NW, SE, SW). c. Out­of­bounds control, to make the point move properly. 7. For the third exercise we started developing the Asteroids game (reduced version). In it I introduced the concepts of game structure (main loop), etc. Challenges took the form of: a. How to move several elements at the same time: they tried using FORs, popping up the concept of time slicing. b. How to set an element’s life­cycle in the main loop (as a laser), also popping the concept of flags. c. One of the topmost curious things was the fact that some students had the tendency to include code out of the main loop, revealing they hadn’t understood correctly previous concepts. 8. Other aspects, as sprite collision, were easier to solve, as basic256 includes several ad­hoc functions. It is so easy to manage you don’t even need arrays to structure your sprites, as you can use expressions like SPRITEPLACE 1, SPRITEX(1)+5, SPRITEY(1) to move the sprite #1 to the right 5 positions. 9. After finishing the basic version of asteroids we started including other elements: explosions, animations, points, leaderboards... 10. As a final project my students had the opportunity to choose a game and develop it in groups (check the video).
  • 5. BIO Andoni Sanz /ʌnˈdɔnɪ sʌnθ/ is a Computer Scientist working as a STEM Teacher and Educational Technologist. Google Certified Educator and Moodle expert he’s immersed in a non-stop research on technology applied to education, combined with the latest pedagogy trends, as blended learning or gamification. Actually he’s working on Gamecodization: teaching how to code through game development. Looking forward to collaborating in interesting projects, don’t hesitate to contact him: Website: http://www.andonisanz.com Blog: http://andonisanz.blogspot.com Coding: http://www.gamecodization.com Twitter: @andonisanz Facebook: https://www.facebook.com/andonisanzteacher LinkedIn: https://www.linkedin.com/in/andonisanz