Wednesday, April 20, 2011

Download Game Prototype

The Digital Bahnhof (DigiBahn) Project is an interdisciplinary software development initiative seeking to program a 3D digital game-based learning (3D-DGBL) environment for teaching German language, vocabulary, and culture to advanced high school and beginning university students. The current basic prototype addresses the topics of recycling and waste management in Germany and has been developed to test proof of concept and as a research bed to evaluate how the narrative structures these environments generate can best be leveraged to teach a second language within simulated sociocultural contexts. Project development has been made possible with generous support from the Center for the Advancement of Teaching and Learning (CATL) and Teaching and Learning Technologies at Elon University. Future work on the project will be supported through the CATL Scholars Program at Elon University. 

The 3D game prototype is the next evolution of an interactive fiction (IF) game that was developed to teach students how to navigate a German train station (available for download here). The 3D game prototype and instructional materials have been developed with open source technologies, freeware, and software that is commonly found in the second language acquisition classroom. Developmental costs have thereby been kept to a minimum, easily within the range of the tight operating budgets that many language departments and programs deal with on a daily basis. Language instructors everywhere are invited to use the game and related materials in their own courses and to adapt or correct them as they see fit. I'm sure that there are numerous errors in the programming code, German language, and instuctional design. It is hoped that the game will show language instructors what is possible with current technologies and will help to serve as a catalyst for them to network in fields traditionally beyond the boundaries of their own discipline (e.g., digital art, computer science). The game, all associated digital resources, and supporting instructional materials are made publicly available under a Creative Commons 3.0 Attribution-NonCommercial-ShareAlike license.

If you would like more information about the project, please contact the project director David Neville ( Your feedback and experiences with the game will direct future game development and help create an environment that is fun, educational, and broadly accessible. I did all the 3D development, coding, and instructional design myself in my spare time over the course of one year, so the game doesn't play like Half-Life 2 or Mass Effect 2. It nevertheless hopefully shows the directions that language education can (and should) explore in the coming years.

For Students/Instructors
The game can be downloaded as a compressed .zip file and extracted to your computer. The extracted folder contains two releases of the game: (1) a Windows .exe file, which can be played on a PC, and (2) a Mac universal binary file, which can be played on a Mac computer. An accompanying player guide in .pdf format gives instructions on how the game can be played.

For Instructors
Instructional materials are available for download and include: (1) a PowerPoint presentation on recycling and waste management in Germany, (2) a vocabulary list, (3), classroom exercises; (4) a level-appropriate reading, and (4) a homework assignment. With the exception of the PowerPoint presentation, all instructional materials can be modified in OpenOffice, an open source word processing program.

For Developers
Game resources are distributed as a Unity package, a proprietary compressed file format that contains all the game source files for 3D models, code, and sound. Please download Unity and install it on your computer before attempting to extract these files. You can either double-click the package, which will prompt Unity to create a new project into which the package will then be imported, or your can import the package into an existing project. As the Unity package is rather large and contains many resources, it may take a while to download and extract all files. Computer code for the game was done in C# in Microsoft Visual Studio Express, 3D model development in Blender, 3D model textures in GIMP, and sound effects with Audacity using open source, royalty free, or collaborative sound resources (e.g., freesound). Once the Unity package has been extracted, all game models, scripts, and sounds can be found in the Assets folder. 

Wednesday, March 16, 2011

Creating Instructional Materials

Now that the game prototype is finished, I have been spending time getting the instructional materials ready. First to be created was the story, which the students will read before doing the related exercises and playing the game:

I was able to find several websites dealing with recycling in Germany and Austria (Berlin sammelt and Umweltprofis) and I adapted the information from these websites so that it was appropriate for a first-year German student. Basically, the reading details how recycling is sorted in Germany and simply presents factual information on the types of recycling bins available. The exercises that will follow (yet to be created) will personalize this information for the student. For example, a fill-in-the-blank story that describes how a student in Germany recycles objects in her apartment. The experiment group, of course, will use the game as a means whereby this learning can be made even more subjective and personal, hopefully resulting in measurable improved learning outcomes.

Wednesday, March 9, 2011

Walk-Through for DigiBahn Game Level

A few days ago I made a video highlighting the finished game, essentially a walk-through of the environment. After capturing the video with FRAPS, I put the computer on standby and went off to teach. Once I came back to the office a few hours later I found, to my horror, that the computer would not run. The technicians at the university said it was loose RAM, which may have caused a short that fried the motherboard.

I just got the computer back, so I decided quickly to upload the video I had made before anything else happened to the computer:

That's it for now in terms of game development; I'll be focusing now on the development of the instructional materials. Once I get everything organized and ready for distribution, I will post links to where it all can be downloaded.

Monday, February 28, 2011

Score Screen Finally Finished

I've been busy with teaching and other sundry university service responsibilities, which has taken me away from game development these last few weeks. Thank goodness that I was able to get the majority of development done during Winter Term when I didn't have a teaching load. The final problem I faced was getting the player performance data out of the game and into the score screen. In Unity, when one game scene is unloaded and a new scene is loaded, all assets (including class variables, etc.) associated with the old scene are destroyed. I was able to find a work around to this problem by 1) saving the performance data as player preference data in one scene, and 2) loading these variables in the new scene. Here's the code for it:

In the old scene, once the player completes that last task, his performance data is sent to the system before the new scene is loaded:

PlayerPrefs.SetString("PointsScore", pointsHolder.guiText.text);
PlayerPrefs.SetString("HealthScore", healthHolder.guiText.text);
PlayerPrefs.SetString("MoneyScore", moneyHolder.guiText.text);

Here I'm directly accessing the guiText object where this data is stored and then sending this data as a string object to the player preferences. In the new scene, I use the following code (excerpted) to get the data out of the system and printed to the screen:

public string finalPointScore;
public string finalHealthScore;
public string finalMoneyScore;
public GameObject geld;
public GameObject gesundheit;
public GameObject punkte;

public void Awake()
      Screen.showCursor = true;
      Screen.lockCursor = false;
      finalPointScore = PlayerPrefs.GetString("PointsScore");
      finalHealthScore = PlayerPrefs.GetString("HealthScore");
      finalMoneyScore = PlayerPrefs.GetString("MoneyScore");

      geld = GameObject.Find("GUITextGeld");
      geld.guiText.text = finalMoneyScore;
      geld.gameObject.transform.position = new Vector3(0.14f, 0.517f, 1);

      gesundheit = GameObject.Find("GUITextGesundheit");
      gesundheit.guiText.text = finalHealthScore;
      gesundheit.gameObject.transform.position = new Vector3(0.185f, 0.45f, 1);

      punkte = GameObject.Find("GUITextPunkte");
      punkte.guiText.text = finalPointScore;
      punkte.gameObject.transform.position = new Vector3(0.145f, 0.38f, 1);

And here's a screenshot of what this code actually looks like once the game is played:

Now that the game is finally finished, I need to start looking at getting the instructional materials assembled and creating lesson plans for the day on which the game will be tested in class. As I will also be working with human test subjects, I will need to get institutional IRB approval. All sorts of little things to keep an eye as the project moves forward!

Thursday, February 10, 2011

Beer Bottles (Nearly) Imported

The new semester has finally started and, as anticipated, I've been busy with teaching and course preparations. I'm glad that I had time over Winter Term to code the game, get the functionality figured out, and polish the game interface. I'm going to test the game prototype in about two months and, as it currently stands, I only have some minor tweaking to do and development of instructional resources.

The game will require students who play it to recycle bottles according to glass type: clear, brown, and green. This will allow students to practice vocabulary and grammar (German two-way prepositions, e.g.: Ich werfe die Flasche in  den Braunglascontainer), all within a simulated real-world context. For the last few weeks, however, I've had some difficulties getting the bottles to be "just right." Either I could make the entire bottle transparent, or none of it. Basically there was a problem with applying more than one texture to a single game object inside of Unity. I was finally able to solve this problem by composing one bottle out of several different objects, each of which had an unique textured applied to it. So, for instance, I was able to take a German beer label (which shouldn't be transparent):

And apply it to a beer bottle, which needs to be entirely transparent. So, I made an object for the label inside of Blender and applied the label as a texture before importing it into Unity. I did the same thing with the beer bottle, albeit with a space in the model where the beer label object would be inserted. Once inside Unity, I created a compound object composed of the the Blender objects. And here's the result:

A minor detail, perhaps, but one that I think adds a little extra layer of authenticity to the game, although I don't know whether the students will take time to think about the extra work that it entailed. Now that I got the clear and brown glass bottles finished, I just have to do the green glass bottles and non-recyclable  trash and the game will be mostly finished. And, by the way, Franziskaner Hefe-Weissbier is really good. 

Thursday, January 27, 2011

Start, Info and About Screens Finished

Took a break from doing modeling in Blender, where I still need to make game resources (bottles, cans, trash), and spent a few days getting the game start, about and information screens setup. With Unity, this was a snap to do and only required minimal scripting in C# and light image creation skills in GIMP. This is what I got:

Start Screen

Info Screen

About Screen

In the coming days, I will try to make a screen capture of the game as I also included a really nice sound loop that I found on FlashKit, which unfortunately does not come across on screen shots. I'll probably also get back to making the final game resources before getting down to writing the instructional materials for the game. Nevertheless, I'm happy to say that I'm weeks ahead of schedule and should be able to test the game out in-class in April.

Thursday, January 20, 2011

Game Finally Coded

I have been working feverishly these last few days, hoping to get get my game coded before the semester begins. Once the semester begins, I'll have my hands full with grading, teaching, and the what-have-yous of being a university professor. And although I won't be testing the game until the end of the semester, experience has taught me that the end always has a tendency of sneaking up. So, better to get it done sooner than later. Here's what I got:

I finished just in time, as I was starting to get loopy from writing code. This morning I was getting frustrated from making changes to a certain script but not seeing any difference in gameplay. Then I realized that I was editing a script for a totally different object than the one with which I was interacting. Time for a break!

Now that all the game logic is coded, I just have to add a few more game objects (e.g., bottles and trash) and then think seriously about how I will instructional the game. Sure, I have a general idea about what topics will be covered, but I need to think about prior knowledge that players may have and sequencing the instruction. In sum, a good chance for me to put my ideas from an earlier article into effect. Once that is done, I will be making student supporting materials (e.g., homework) using Scribus. After that, well, hopefully an article and national open-source distribution of the project.

Monday, January 10, 2011

Polishing Interface and Writing Code

I have been working these last few days on tweaking the game interface and writing the code the will provide game functionality. I'm happy to report that the code for managing the points and health in the game are all finished, as seen in this screenshot:

Every minute, the code will deduct one health point and play a small audio file (a "ping"); players will be able to get health points by purchasing something to eat or picking up a first aid kit. When players gain health points, another sound file is played. The game points work on the same logic. Once I get the money interface finished (what you see in the screenshot is just a place holder), I will get to work on developing the interactive objects that the player needs to pick up and recycle (or throw away).

I'm also happy to say that coding the game is going much more smoothly than I thought. Progress in this area was helped on tremendously by code I grabbed from the AlmostLogical blog. Once I got my mind wrapped around the code, tweaking it for the game was very straight-forward. Here's a screenshot of the code:

I've been really impressed with the Unity code libraries. Some game functionality, which I thought would take lines of code to write, are accomplished with one-line function calls. Hats off to you, Unity.

On a side note, an interesting report on the NPR website detailing how video games increase brain power and multitasking skills. Apparently, computer gamers perform better than non-gamers on certain tests of attention, speed, accuracy, vision and multitasking. Who would have thought?

Friday, January 7, 2011

The Verisimilitude of Real Spaces

Playing Half-Life 2 Lost Coast a few weeks ago, I was struck by the sense of "place" that the game provides and the story that the spaces tell in a visual manner. Not only were the images beautifully rendered, but the spaces themselves seemed to emit a sense of real history, especially inside of the church:

Since starting work on my project, I've been fascinated by this real sense of space that can sometimes be found in virtual worlds and I've been wondering if it could be leveraged to help teach a second language. They say that nothing helps students learn a second language better than immersion abroad. I just wonder if immersion in a virtual space can also be helpful and, if yes, in what manner. Can the story that virtual spaces tell help to create mental narratives that students can use organize a second language and navigate spaces in which this language is used?

Although clearly not as beautifully rendered as the Half-Life 2 game, I've been trying to develop a verisimilitude of real space in the game I've been developing. In other words, to get it as close to a real-world German town as possible:

Now that the models are developed and inserted into the game, future work will focus on scripting player/object interactivity an C#, polishing gameplay, and testing the game prototype in my German 122 class in Spring Semester 2011. After that, well, then comes the boring stuff of writing up essays to discuss data and research findings.

Monday, January 3, 2011

Reflecting and Refracting with the Fountain

More than halfway with reimporting developed game models, which entails opening the models up in Blender, removing the object scale (Alt-S) and rotation (Alt-R), and redoing the rotation and scaling in Edit Mode. For fun, I decided to throw in a model of a fountain into the museum square instead of a tree. I also wanted to play with the water reflection and refraction capabilities that Unity offers. Almost every German town has a fountain at the center of town and, in my opinion, Bad Oberdinkelheim should be no different. This is what I got:

The second floor of the museum is reflected in the water and the bottom of the fountain is refracted through the water. All in all, very easy to do with no coding involved; just drag-and-drop functionality that is controlled through the Unity GUI.