Tools – not toys

Embed Size (px)


Tools – not toys. Vesa Lappalainen , Lecturer PhD Antti-Jussi Lakanen , University teacher MSc Department of Mathematical Information Technology, University of Jyväskylä Vesa Lappalainen. PhD 1985 in Mathematics - PowerPoint PPT Presentation

Text of Tools – not toys

PowerPoint Presentation

Tools not toysVesa Lappalainen, Lecturer PhD Antti-Jussi Lakanen, University teacher MScDepartment of Mathematical Information Technology, University of

Vesa LappalainenPhD 1985 in MathematicsTeaching programming since 1982Research activities:InSitu: Interaction possibilities on a mass lectureComTest: Making test-driven development (TDD) simpleStudents perceptions of programmingEarly recruitment in ICTMy gaming backgroundTwo teenager boys2

Vesa is the one who at the first got the ideas of this motivation course and I picked the original grew and set the goals.2Antti-Jussi LakanenMSc 2010 in Mathematical Information TechnologyTeaching programming, recruitment, tutoring freshmenResearch activitiesCS1 and games, effect on study successK-8/K-12 programmingMy gaming backgroundCommodore 64, Amiga 500, ...More of fun, less of useful activities3

Antti-Jussis responsibility was to plan and keep all the courses with boys who created the Jypeli library.3Tools - not toysMany times things are left too complicated in real toolsNot even beginners but also more experienced programmerThis forces to use toys instead of real toolsWhy not go a bit further with real tools?We show two examples to simplify things:Jypeli event driven game framework over XNAComTest make unit testing easier

Real tools are meny times too complicated at least to beginners4Our presentation in a nutshell: Part 1We are worried about the decline in IT, science and math studentsWe developed a week-long game programming course for youngsters to motivate studying IT, science and mathJypeli programming library was developed as a tool to reduce the cognitive load in beginning game programmingWe have had 7 courses, 150 students, aged 11-175

We share the same worries about student decline than all others. So we developed a week long course to motivate junior high school students to IT, science and math. For the course we created a game library called Jypeli, we shall show a small example of that.5Our presentation in a nutshell: Part 2Ohjelmointi 1 (CS 1) with a game themeStarted in 2010Strong learning outcomesTDD (ComTest for C#)As of autumn 2011 game theme will be a common denominator in the majority of the courses of the IT faculty

6Part 1: Game programming course for teenagers (12-16 years) using Jypeli

Each of these has its own important role in the processIf we change some part, we affect the ensemble

8The course concept introduced is a combination of department staff (teachers), tools (Jypeli etc.), content and motivated participantsDisclaimerLinks Facebook group:!/group.php?gid=1143454352607059

AcknowledgementsUniversity of Jyvskyl / Department of Mathematical Information TechnologyFunding courses in 2009, Jypeli developmentTechnology Industries of Finland Centennial FoundationCourses in 20102011Agora CenterResearch in game developmentMicrosoftSoftware, Xbox controllersPhysics2D.NET physics library


Lots of thanks to all our supporters.10IntroductionStudent decline in ICT and science fields (economics still get students)Amount of students passing the courses has gone down 50 % since 2004How to get youngsters to choose science courses in high school? And hopefully to continue their studies later in university11

Our main concern was that we nowadays miss a lot of students in our subjects also in Finland. So we wanted to create something to show junior high school students, that there is idea to choose math and science in high school.11Why this course?What are the young interested of?Something to excite!How to combine fun with real thingsWe wanted to show that concepts of high school math and science apply also in gamesWhy not to target senior high?We wanted to influence what subjects they pick in senior highWith senior high students we would be late(ca 50 % doesnt even go to senior high)

12Senior high is not our target, 12Finnish educational system13Elementary school, 6 yrs (Alakoulu in Finnish), starts at the age of 7Junior High School, 3 yrs (Ylkoulu in Finnish)Senior High School (lukio), 3 yrsVocational School (ammattikoulu), 3 yrsUniversity (bachelor), 3 yrsPolytechnics (bachelor), 3.5 4 yrsUniversity (master), 2 yrsCompulsoryeducation50.2 %41.2 %(8.6 %)Pre-school, 1 year (Esikoulu in Finnish), starts at the age of 6 because in Finland the students can choose between two different tracks after junior high. The right side track does not lead to university in most cases. So we should influence before student make the choice of the track and also before they choose subjects in senior high.13Motivation and learning outcomesMotivation to physics conceptsQuantities: time, distance, speed, acceleration and forceCausal relationship: dependencies between objectsGravity, friction, motion, balanceMass and its effectsParticle kinematics14

So we wanted to motivate students to physics concepts 14Motivation and learning outcomesMotivation to math conceptsProblem solvingFunction, interpretation and drawingCoordinatesGeometry: straight line, scaling, shapesVectorsEquations and solving themProbability and random numbersBoolean value, logicAngle, degrees and radians15

and math concepts.

15How to program gamesTwo mainstream optionsVisual programmingAlice, Scratch, Greenfoot, Lego robots (compare to industrial process programming, e.g. National Instruments, LabView, etc.)Microsoft KoduTextual programmingJava ACM Task ForceXGC1 (UWB)16

- For games we have many different ways to go as we already have seen here. But roughly we can divide those in two mainstreams. Visual programming like Alice, Scratch, Greenfoot, Lego robots, Kodu etc.- The other mainstream is traditional textual programming using some library.


Kodu Game Lab18

Jypeli library -- Why and objectivesReal programming by mainstream toolsFirst game should not be many lines of codeRealistic physics built-inEvent-driven for controls and collisionsLess structures, as few as zero loops and ifsEndless possibilities for advanced programming Possibility to transfer games to game consoles and mobile phones19

What we wanted from our tool: real programming by mainstream tools to motivate students. About some more goals we shall discuss during the example. Then we preferred also possibility to transfer the games also to consoles and mobiles.

19Choosing the tool Motivation to building a new libraryLack of Finnish materialXbox currently only game console with the possibility to transfer own games easily C# as the languageLack of physics engines in available libraries out-of-the-boxLimited time available It also takes time to study a library someone else has madeFaculty interests in bringing knowledge about building game engines, physics engines etc.


We had only two months from the idea of to start of the first course. So in two months we should make the choice and prepare the materials. Because lack of Finnish material, we should anyway write a lot ourselves. Xbox is the only console where it is possible to do code in reasonable time, so the language should be C# and something top of XNA.Because also third party libraries would take time to get familiar with and we did not mind, if we get a bit of knowledge of how to make a game engines, we chose to make our own.20Basics of Jypeli library C# library built on top of Microsoft XNA 4.0Programmer defines the actions to execute for game start, objects colliding, player using controllers etc.Library takes care of physics and collisionsFirst games are very easy to makeStill its real programmingYou can see the programas a whole


Example game:Galaxy Trip22- Now we will implement an example game called the Galaxy Trip. The same game is running on the phone.22using System;using Jypeli;using Jypeli.Effects;

public class Game : PhysicsGame{ static String[] lines = { " ", " ", " ", " X X ", "X ", " * ", " X X ", " ", " ", " ", " ", "* X X ", "X ", " * ", " X X ", " ", " ", " ", " * ", " X X ", "X ", " ", " X X ", " ", };

static int tileWidth = 800 / lines[0].Length; static int tileHeight = 480 / lines.Length; static Image playerImage = LoadImage("ship"); static Image galaxyImage = LoadImage("galaxy"); static Image sombreroImage = LoadImage("sombrero"); static Image explosionImage = LoadImage("bum"); ExplosionSystem explosionSystem; PhysicsObject player;

protected override void Begin() { Level.Background.Image = LoadImage("space"); Gravity = new Vector(0, -1000); NewGame(null); }

void NewGame(Touch touch) { ClearGameObjects(); ClearControls();

player = new PhysicsObject(50, 50, Shape.Circle); player.Image = playerImage; Add(player);

explosionSystem = new ExplosionSystem(explosionImage, 50); Add(explosionSystem);

Keyboard.Listen(Key.Up, ButtonState.Pressed, MovePlayer, "Move up", player, new Vector(0, 500)); Keyboard.Listen(Key.Down,