Why teach game programming? Why not?

Next October I will be doing a presentation on my year of teaching game programming with Unity at the Montana Educators Association convention here in Missoula.  Being well aware that procrastination kills I started an outline of what I want to do.  After reading Dan Meyer’s post “How I Present” I figured I would not build the PowerPoint first.  I am sitting here doodling along making notes for my witty yet enlightening presentation when it hits me, why am I teaching game programming with Unity in the first place?  Not the Unity part, but the game programming part.  (I do this “why am I teaching blank” regularly.  I keeps life from getting boring and simple.)  The first line in my out line is “Why Game Programming”.  I really want to get a good answer to myself for that question and not just a “because it is fun”.  (Although that may be enough.)

I have been teaching game programming with some language for a long time now.  No great innovation there.  If there is a programming teacher in the world that has not used game programming as a fun incentive I would be very surprised.  Back in the mid 80’s I used Pascal and Apple BASIC.  The games were just the text based Dungeon & Dragons things (“Go North”) or simple Pong like things.  When Scratch came along all sorts of new games were possible and the sprites were of much higher quality.  Then smart phones started turning up in class and the kids were captivated by the games.  Some of them looked very easy in design so I looked for a programming app.  I found Corona.  I gave teaching Corona a try.  The course worked, sort of.  The programming required by Corona was a bit more than many of the students in the class were capable of.  The step from Scratch to Corona was simply too big, there was a level of complication in the IDE management, files, importing, event management and so on that I was not comfortable teaching.  (The drag-and-drop progression to line code discussion comes along here.)  I was simply too used to teaching with languages that were complete packages designed for teaching, like Scratch, Small Basic and Alice.  But, and this is a big “but”, the kids wanted to learn Corona programming.  They saw a goal that was cool, having an app on their phone that they wrote.  At the time I was still in the traditional mindset of teaching coding with the game as an incidental.  It was a programming course that ended up with a game as the final product.  Due to work load (school techie, two or three math courses and a couple of programming courses) I backed off on the gaming programming direction for a while.  My programming classes still wrote games in whatever flavor language we were using but they were not very fancy.  I dabbled in GameMaker but it just did not tickle my fancy.

About this time my programming class sizes started to drop.  What used to be 10-15 was looking like 4-5.  There is no two ways about it, programming is not easy and it can be as exciting as watching grass grow, especially if you are not a programming/computer geek.  I was low on geeks.  I wanted something that would attract the non-geeks of the school into taking programming and would possibly get them hooked into going farther in CS and programming.

Some kid showed me Microsoft’s Project Spark.  Oh my.  Oh my again.  I am thinking I may have to limit class sizes.  It was not really programming in the traditional coding sense but boy does it look like fun and I was trying increase the fun factor in my programming classes.  I was getting all set to roll on a semester of Project Spark when Microsoft killed it.  (I am still really, really sad about that.)  I had a scheme to get kids into my programming classes and with the demise of Project Spark I had a bit of a problem with my scheme.  Now what?  I had tinkered with Unity a year or two previously and found the tutorials wanting.  Desperate, I looked again.  I found better tutorials.  I found tutorials that did cool things in Unity.  I was back with the scheme.

That is the history.  Now for the “why teach game programming”.  It is very simple and can be stated in one word, “numbers”.  Numbers in seats.  As bad as it sounds numbers rule education.  If only two kids sign up for class the class disappears.  A program can disappear this way.  I needed numbers.  For an elective like programming to have numbers it has to be fun.  To be fun it has to be something the kids relate as fun, not what geeks who like to program relate as fun.  So game programming it is.  The trick was to not throw out the baby with the bath water.

Teaching game programming with Unity at the introductory coding level is really not teaching “programming”.  It is definitely teaching application use with a little code cutting and pasting.  My intent with Unity was to not teach programming but to teach the application and to have the kids see coding as an incidental.  I want to teach the kids how to learn.  They get to see the power of knowing how to code.  This is the applications side, kind of like in a math course.  The big math student question is always “How am I going to use this in real life.”  For programming here it is.  Yes, it is “black box” coding, just like “black box” math but it is also “here is a super cool thing you can do with code”.

Is teaching Unity a college prep course?  Not even close.  Is it an introduction to something cool that is going to temp kids to take the college prep courses?  I sure hope so but even if it does not bring them into my traditional Python programming classes it does get them seeing and thinking about code and the power of coding.

Skills.  By far the biggest skill the kids learn is following directions.  They watch YouTube tutorials, read text tutorials, listen to me give brief lectures, all involve following directions.  Does not sound to impressive does it?  The thing is if you can follow directions you can learn almost anything.  Of course I mess things up by making them build their own game by using the techniques they learned from the tutorials so the class is not just following directions.

Most of my programming students are not going into a programming or a CS career.  Teaching Unity, even if it is mostly cut and pasting code snippets, gives the students a look at big time programming.  Will they understand the code they were cut and pasting?  Not really but I think there is enough seepage that even the oblivious will come away with something.

Teaching an elective is a balancing game.  The elective has to be interesting enough to attract students but not so watered down that it does not justify its existence in the curriculum.  I really believe gaming programming with Unity is a viable option.  Kids that take it as an only CS course will get something worthwhile out of it.

Would it be possible to teach C# using Unity?  Maybe but learning Unity itself just takes so much time that to really get the full programming experience with C# would take a couple of years at least.  Would a C# course then a Unity course help with learning Unity?  The answer is of course but so much of the Unity C# code is Unity specific that the C# pre-course might not be a big enough advantage to justify the time.

I plan to hang with the Unity game programming (or some high level 3D game IDE) because it is fun, has a good amount of problem solving, has some coding, and requires the kids to follow directions closely.  My CS college bound kids will get a solid dose of Python their Junior or Senior year.  I will also keep the Java course alive.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: