K12 Game Programming Course Using Textual Programming ACM

  • Slides: 35
Download presentation
K-12 Game Programming Course Using Textual Programming ACM SIGCSE 2011 Dallas, Texas Room Dallas

K-12 Game Programming Course Using Textual Programming ACM SIGCSE 2011 Dallas, Texas Room Dallas A 1 Vesa Lappalainen, Lecturer Ph. D Antti-Jussi Lakanen, University teacher MSc Department of Mathematical Information Technology University of Jyväskylä, Finland http: //tinyurl. com/jypeli-paper 1

http: //tinyurl. com/jypeli-paper 2

http: //tinyurl. com/jypeli-paper 2

http: //tinyurl. com/jypeli-paper 3

http: //tinyurl. com/jypeli-paper 3

Vesa Lappalainen �Ph. D 1985 in Mathematics �Teaching programming since 1982 �Research activities: �In.

Vesa Lappalainen �Ph. D 1985 in Mathematics �Teaching programming since 1982 �Research activities: �In. Situ: Interaction possibilities on a mass lecture �Com. Test: Making test-driven development (TDD) simple �Students’ perceptions of programming �Early recruitment in ICT �My gaming background �Two teenager boys http: //tinyurl. com/jypeli-paper 4

Antti-Jussi Lakanen �MSc 2010 in Mathematical Information Technology �Teaching programming, recruitment, tutoring freshmen �Research

Antti-Jussi Lakanen �MSc 2010 in Mathematical Information Technology �Teaching programming, recruitment, tutoring freshmen �Research activities �CS 1 and games, effect on study success �K-8/K-12 programming �My gaming background �Commodore 64, Amiga 500, . . . �More of fun, less of “useful” activities http: //tinyurl. com/jypeli-paper 5

Our presentation in a nutshell �We are worried about the decline in IT, science

Our presentation in a nutshell �We are worried about the decline in IT, science and math students �We developed a week-long game programming course for youngsters to motivate studying IT, science and math �Jypeli programming library was developed as a tool to reduce the cognitive load in beginning game programming �We have had 7 courses, 150 students, aged 11 -17 http: //tinyurl. com/jypeli-paper 6

Disclaimer �The course concept introduced is a combination of 1. department staff (teachers), 2.

Disclaimer �The course concept introduced is a combination of 1. department staff (teachers), 2. tools (Jypeli etc. ), 3. content and 4. motivated participants �Each of these has its’ own important role in the process �If we change some part, we affect the ensemble http: //tinyurl. com/jypeli-paper 7

Links �https: //trac. cc. jyu. fi/projects/npo �https: //www. jyu. fi/it/laitokset/mit/opiskelu/nuorten kurssi �Facebook group: http:

Links �https: //trac. cc. jyu. fi/projects/npo �https: //www. jyu. fi/it/laitokset/mit/opiskelu/nuorten kurssi �Facebook group: http: //www. facebook. com/#!/group. php? gid=1143454 35260705 http: //tinyurl. com/jypeli-paper 8

Acknowledgements �University of Jyväskylä / Department of Mathematical Information Technology �Funding courses in 2009,

Acknowledgements �University of Jyväskylä / Department of Mathematical Information Technology �Funding courses in 2009, Jypeli development �Technology Industries of Finland Centennial Foundation �Courses in 2010— 2011 �Agora Center �Research in game development �Microsoft �Software, Xbox controllers �Ville Isomöttönen �Co-author of the paper �Physics 2 D. NET physics library http: //tinyurl. com/jypeli-paper 10

Introduction �Student decline in ICT and science fields (economics still get students) �Amount of

Introduction �Student decline in ICT and science fields (economics still get students) �Amount of students passing the courses has gone down 50 % since 2004 �How to get youngsters to choose science courses in high school? �And hopefully to continue their studies later in university http: //tinyurl. com/jypeli-paper 11

Why this course? �What are the young interested of? �Something to excite! �How to

Why this course? �What are the young interested of? �Something to excite! �How to combine fun with “real things” �We wanted to show that concepts of high school math and science apply also in games �Why not to target senior high? �We wanted to influence what subjects they pick in senior high �With senior high students we would be late (ca 50 % doesn’t even go to senior high) http: //tinyurl. com/jypeli-paper 12

Finnish educational system Compulsory education University (master), 2 yrs University (bachelor), 3 yrs Polytechnics

Finnish educational system Compulsory education University (master), 2 yrs University (bachelor), 3 yrs Polytechnics (bachelor), 3. 5 – 4 yrs Senior High School (lukio), 3 yrs Vocational School (ammattikoulu), 3 yrs 50. 2 % 41. 2 % (8. 6 %) Junior High School, 3 yrs (Yläkoulu in Finnish) Elementary school, 6 yrs (Alakoulu in Finnish), starts at the age of 7 Pre-school, 1 year (Esikoulu in Finnish), starts at the age of 6 http: //tinyurl. com/jypeli-paper 13

Motivation and learning outcomes 1. Motivation to physics concepts �Quantities: time, distance, speed, acceleration

Motivation and learning outcomes 1. Motivation to physics concepts �Quantities: time, distance, speed, acceleration and force �Causal relationship: dependencies between objects �Gravity, friction, motion, balance �Mass and its effects �Particle kinematics http: //tinyurl. com/jypeli-paper 14

Motivation and learning outcomes 2. Motivation to math concepts �Problem solving �Function, interpretation and

Motivation and learning outcomes 2. Motivation to math concepts �Problem solving �Function, interpretation and drawing �Coordinates �Geometry: straight line, scaling, shapes �Vectors �Equations and solving them �Probability and random numbers �Boolean value, logic �Angle, degrees and radians http: //tinyurl. com/jypeli-paper 15

How to program games �Two mainstream options 1. Visual programming Alice, Scratch, Greenfoot, …

How to program games �Two mainstream options 1. Visual programming Alice, Scratch, Greenfoot, … � Lego robots (compare to industrial process programming, e. g. National Instruments, Lab. View, etc. ) � Microsoft Kodu � 2. Textual programming � Java ACM Task Force � XGC 1 (UWB) http: //tinyurl. com/jypeli-paper 16

Kodu Game Lab � http: //tinyurl. com/jypeli-paper 17

Kodu Game Lab � http: //tinyurl. com/jypeli-paper 17

Jypeli library -Why and objectives �“Real programming” by mainstream tools �First game should not

Jypeli library -Why and objectives �“Real programming” by mainstream tools �First game should not be many lines of code �“Realistic” physics built-in �Event-driven for controls and collisions �Less structures, as few as zero loops and ifs �Endless possibilities for advanced programming �Possibility to transfer games to game consoles and mobile phones http: //tinyurl. com/jypeli-paper 18

Choosing the tool – Motivation to building a new library �Lack of Finnish material

Choosing the tool – Motivation to building a new library �Lack of Finnish material �Xbox currently only game console with the possibility to transfer own games easily C# as the language �Lack of physics engines in available libraries out-of-the-box �Limited time available – It also takes time to study a library someone else has made �Faculty interests in bringing knowledge about building game engines, physics engines etc. http: //tinyurl. com/jypeli-paper 19

Example game: Galaxy Trip http: //tinyurl. com/jypeli-paper 21

Example game: Galaxy Trip http: //tinyurl. com/jypeli-paper 21

using System; using Jypeli. Effects; public class Game : Physics. Game { static String[]

using System; using Jypeli. Effects; public class Game : Physics. Game { static String[] lines = { " ", " X X ", "X ", " * ", " X X ", " ", "* X X ", "X ", " * ", " X X ", " * ", " X X ", "X ", " ", " X X ", " ", }; static int tile. Width = 800 / lines[0]. Length; static int tile. Height = 480 / lines. Length; static Image player. Image = Load. Image("ship"); static Image galaxy. Image = Load. Image("galaxy"); static Image sombrero. Image = Load. Image("sombrero"); static Image explosion. Image = Load. Image("bum"); Explosion. System explosion. System; Physics. Object player; protected override void Begin() { Level. Background. Image = Load. Image("space"); Gravity = new Vector(0, -1000); New. Game(null); } void New. Game(Touch touch) { Clear. Game. Objects(); Clear. Controls(); player = new Physics. Object(50, Shape. Circle); player. Image = player. Image; Add(player); explosion. System = new Explosion. System(explosion. Image, 50); Add(explosion. System); Keyboard. Listen(Key. Up, Button. State. Pressed, Move. Player, "Move up", player, new Vector(0, 500)); Keyboard. Listen(Key. Down, Button. State. Pressed, Move. Player, null, player, new Vector(0, -500)); Keyboard. Listen(Key. Left, Button. State. Pressed, Move. Player, null, player, new Vector(-500, 0)); Keyboard. Listen(Key. Right, Button. State. Pressed, Move. Player, null, player, new Vector(500, 0)); Touch. Panel. Listen(Button. State. Pressed, New. Game, null); Accelerometer. Calibration = Accelerometer. Calibration. Zero. Angle; Accelerometer. Listen. Analog(Accelerometer. Sensitivi ty. Realtime, Change. Gravity, null); Tile. Map tiles = Tile. Map. From. String. Array(lines); tiles['X'] = Create. Galaxy; tiles['*'] = Create. Sombrero; tiles. Insert(tile. Width, tile. Height); Level. Create. Borders(); Camera. Zoom. To. Level(); } Physics. Object Create. Galaxy() { Physics. Object galaxy = Physics. Object. Create. Static. Object(tile. Width, tile. Height); galaxy. Color = Color. Light. Blue; Add. Collision. Handler(galaxy, Collided. With. Galaxy); galaxy. Image = galaxy. Image; return galaxy; } Physics. Object Create. Sombrero() { Physics. Object sombrero = Physics. Object. Create. Static. Object(tile. Width, tile. Height); sombrero. Color = Color. Yellow; sombrero. Image = sombrero. Image; Add. Collision. Handler(sombrero, Collided. With. Sombrero); return sombrero; } void Collided. With. Galaxy(Physics. Object galaxy, Physics. Object target) { Play. Sound("blop"); } void Collided. With. Sombrero(Physics. Object sombrero, Physics. Object target) { Play. Sound("exp"); explosion. System. Add. Effect(target. X, target. Y, 50); sombrero. Destroy(); } void Change. Gravity(Analog. State s) { Gravity = s. State. Vector * 2000; } } public void Move. Player(Physics. Object player, Vector force) { player. Hit(force); } http: //tinyurl. com/jypeli-paper 22

Course instances in 2009— 2010 2009 Courses 2010 Total 2 5 1 plus 3

Course instances in 2009— 2010 2009 Courses 2010 Total 2 5 1 plus 3 -4 1 plus 4 45 105 150 Girls / boys 7 / 38 6 / 99 13 / 137 Age • mean • median • youngest / oldest 13. 8 13 12 / 16 14. 2 14 11 / 17 3 (7 %) 6 (6 %) Instructors Students Drop outs http: //tinyurl. com/jypeli-paper 7 9 (6 %) 23

”I have earlier programming experience” (2010) 50. 0 % 47. 5 % 40. 0

”I have earlier programming experience” (2010) 50. 0 % 47. 5 % 40. 0 % 30. 0 % 25. 3 % 18. 2 % 20. 0 % 8. 1 % 10. 0 % 1. 0 % 0. 0 % None Somewhat little Not little, not much http: //tinyurl. com/jypeli-paper Somewhat much Very much 25

”I consider myself an experienced computer user” (2009 -2010) 50. 0 % 41. 0

”I consider myself an experienced computer user” (2009 -2010) 50. 0 % 41. 0 % 40. 0 % 33. 3 % 30. 0 % 35. 6 % 31. 0 % 20. 0 % 10. 0 % 2. 2 % 0. 0 % 4. 0 % Disagree 18. 0 % 4. 4 % 6. 0 % Somewhat disagree Not agree, not disagree 2009 Somewhat agree Agree 2010 http: //tinyurl. com/jypeli-paper 26

”I play computer games…” (2009 -2010) 70. 0 % 59. 6 % 60. 0

”I play computer games…” (2009 -2010) 70. 0 % 59. 6 % 60. 0 % 51. 1 % 46. 7 % 50. 0 % 37. 4 % 40. 0 % 30. 0 % 20. 0 % 10. 0 % 2. 2 % 3. 0 % 1 -4 times a month A few days a week 2009 Every day 2010 http: //tinyurl. com/jypeli-paper 27

More student demographics �They have tried some languages, e. g. Java (20), Basic (17),

More student demographics �They have tried some languages, e. g. Java (20), Basic (17), C++ (17) (numbers overlap) �Most students are interested in career in software engineering (57 %) �Conclusion: Students were interested and motivated, but did not know what to expect out of the course http: //tinyurl. com/jypeli-paper 28

Mon Tue Wed Thu Fri 9: 00 -9: 50 Starting info Functions Loops, random

Mon Tue Wed Thu Fri 9: 00 -9: 50 Starting info Functions Loops, random numbers, gravity Classes and methods of Jypeli library How to continue 10: 0010: 50 Get to know with tools Carrying on with the Pong game Designing and Implementing Finalizing implementing own game 11: 0011: 45 Making the first game (Pongtutorial) Finalizing the Pong game Implementing own game 12: 1513: 30 What are algorithms Handling collisions How to make a level out of a tilemap (grid) 13: 4515: 00 Carrying on Designing Implementing with the Pong own game http: //tinyurl. com/jypeli-paper Showcase and best game voting 29

Overall satisfaction �Overall satisfaction: 4. 71 (2009), 4. 56 (2010) �Fulfilled the expectations: 4.

Overall satisfaction �Overall satisfaction: 4. 71 (2009), 4. 56 (2010) �Fulfilled the expectations: 4. 1 (2009), 3. 9 (2010) � 85 % would recommend the course to his/her friends (2010) �(Scale: 1 Fully disagree -- 5 Fully agree) http: //tinyurl. com/jypeli-paper 38

Hardest things on the course � 42 % of the responses related to new

Hardest things on the course � 42 % of the responses related to new language and new syntax �“learning a new programming language" �“writing the code" �“syntax of the language" �“finding errors” �“writing errorless code” http: //tinyurl. com/jypeli-paper 39

Is it hard to do programming? �Majority of the students had none or only

Is it hard to do programming? �Majority of the students had none or only little earlier programming experience (2009: 89 %, 2010: 73 %) � 68 % said that programming was NOT harder than he/she had expected � 49 % said their conception of programming had changed during the course �Thought it was harder �Programming games was more fun than expected �Programming was more fun than expected �Conclusion: It’s hard, but fun, and less hard than expected http: //tinyurl. com/jypeli-paper 40

Correlation analysis: Effect of earlier programming experience � http: //tinyurl. com/jypeli-paper 41

Correlation analysis: Effect of earlier programming experience � http: //tinyurl. com/jypeli-paper 41

Interest towards ICT/science studies Prequestioning Postquestioning +/- Agree or fully agree 37. 9 %

Interest towards ICT/science studies Prequestioning Postquestioning +/- Agree or fully agree 37. 9 % 43. 6 % +5. 7 % Disagree or fully disagree 27. 9 % 17. 9 % -10. 0 % Mean 3. 16 3. 41 +0. 25 Std dev 1. 19 1. 16 -0. 03 http: //tinyurl. com/jypeli-paper 42

Challenges of the concept �How much do they learn �Measuring this is challenging �Is

Challenges of the concept �How much do they learn �Measuring this is challenging �Is learning many things really the objective? �Is it enough just to “have fun with programming”? �What happens after the course �Post-course communication �Facebook http: //tinyurl. com/jypeli-paper 43

Game theme in the University of Jyväskylä �Ohjelmointi 1 (CS 1) with a game

Game theme in the University of Jyväskylä �Ohjelmointi 1 (CS 1) with a game theme �Started in 2010 �Strong learning outcomes �TDD (Com. Test for C#) �As of autumn 2011 game theme will be a common denominator in the majority of the courses of the IT faculty http: //tinyurl. com/jypeli-paper 44

Studies for senior high school students �We offer university courses for senior high school

Studies for senior high school students �We offer university courses for senior high school students �E. g. Programming 1 (CS 1) with a game-theme �Students are fully credited when they entry university �Give advantage in entrance examination http: //tinyurl. com/jypeli-paper 45

s n o i t s e u Q http: //tinyurl. com/jypeli-paper 46

s n o i t s e u Q http: //tinyurl. com/jypeli-paper 46