Friday, October 10, 2014

Game Development Workshop

Learning to Make a Video Game in 1 Day

Students using Corona SDK and SublimeText 2
Three weeks ago I received the privilege of teaching a workshop at York County Library from 10 am to 3:30 pm. Ten students were present (most can be seen in the pictures), and all ten were able to program their first "game" without any prior programming knowledge.

This Stuff Isn't Easy

The concepts taught to the students are ones which professionals are using today. I was blown away by how fast some of them picked up on them. The first lesson I gave taught students to teach themselves. I find this to be the most important part of the whole seminar. Utilizing online tutorials and free software will allow a few of the students here to go home and take
it another step further.

Corona SDK

I wanted to show the students a development environment which was both easy to learn and professional. Corona SDK was the perfect choice. The engineers behind Corona used LUA as the primary language to drive the system. LUA uses an English-like syntax to program, using words like "if", "then" and "end" as opposed to curly braces seen in Java or C++. This makes LUA a great place for students to start programming if they have never seen it before.

Corona's choice of LUA was also powerful in that professionals use LUA today all across the industry. From AAA games to computer programs, LUA is present and being used by professionals all the time.

Sublime Text 2

This is by far my favorite text editor. I saved using this program until the students finished making their first lab project. After making a project in Notepad, the students were thrilled to see how much easier it was to work with a great text editor.



The Setup

The program was designed to allow students the ability to get their feet wet with computer code and to hopefully spark something within them. I paired up those with strong computer skills with those who could barely turn the computer on to minimize problems. Before the day of the program, I had also sent out an email to those who registered with instructions on installing Corona SDK and Sublime Text 2 for students bringing their own laptops.

Setup before start of workshop

Final Product

Before lunchtime our students had their first app complete. It consisted of a background, character and text. When tapping the character, your score would increase and the background would change color. The students easily caught on to just about every concept I threw at them. From centering the background, to rotating text and to even understanding how the "tap listener" would only run when the object was tapped on.


Final Result Before Lunch 
Final Result After Lunch
I would like to show you what the final product looked like, but the truth is, every student had a different looking project. I encouraged those who finished early to put their own personal touches in them. Some changed the text to say "points", and some changed the rate at which the score increase. I presented the best students with a challenge of changing the background and the character, and without much guidance downloaded an image from Google and inserted it in.

Because we went so quickly through the first lesson, after lunch I resorted to make "backup" lesson, where we learned how to make a menu screen. The students could easily understand now how text, images and even buttons could be placed on the screen, but they had no idea how to change between scenes.

Using the Composer API


In previous versions of Corona, to create different scenes you would load in the storyboard API, add everything to a group, and then use function calls to which between scenes. The development team at Corona has completely redone this API and created composer. I came across two major problems when trying to teach the composer API to students.

1. Students don't care. They want to see a game, not a menu screen. From my past experiences in game development, menus are typically the last thing you want to do. It is far more fun to create animated characters than to create a visually appealing screen to start the game. While teaching the composer API may be helpful to students, I had limited time and needed to find something which would motivate them instead.

2. The composer API only works if you know exactly what you are doing. I remember when using the similar storyboard API a few years ago. The documentation for the API is great, but you have to first have an understanding of Corona's workings to read the documentation correctly. Ultimately, I ended up copying and pasting the example code and playing with it for a few hours before I got a handle on it. But I did not have that much time to show students how to play with the example code, and they did not understand enough about Corona to care.

Ultimately, we got it working, but in the process lost about three students who then had to look over the shoulder of others. We were nearing six hours of programming, and the last thing they wanted to do was to make a menu screen. I'm not saying I should have avoided teaching this topic, I just wish it was slightly easier to explain it. The composer API did benefit a few kids, however, as the ones who finished it demonstrate a strong understanding of these new concepts.

A Great Day


I am so privileged to have taught these students. All came in with little to no programming knowledge, but now they have a taste of what it's like. Programming teaches you how to think, how to solve problems, and many students learned that today. Hopefully down the road when these students are older, they can look back at these lessons and have a general feel for how to get started if they have an interest.