Tuesday, November 16, 2010

Burning Down the House

These last few weeks I have been banging my head against the proverbial digital wall, trying to get my computer game -- or 3D digital game-based learning environment, which sounds more sophisticated -- to work just the way I would like. The primary problems were: (1) the door animations in the game just didn't open and close right and (2) I couldn't get two animations on the same mesh object to play independently of each other inside of Unity. Taking inspiration from a Talking Heads song, I decided to burn everything to the ground and start over. As trying to explain my problems in written format is difficult, I made a video highlighting what the problems were and the solution I found for them:



So what have I learned? Well, for starters, any changes (e.g., scaling and rotation) you want to make to a Blender object that you will eventually import into Unity *must* be done in Edit Mode, not in Object Mode. If you made these changes already in Object mode then Alt-R will clear the rotation and Alt-S will clear the scaling. Apparently, you cannot include more than one animation armature on an object, which makes animations working independently of each other difficult to create (e.g., opening and closing two doors). However, this worked example by Devin and Calin Reimer shows that it is possible, with some advanced knowledge of how Blender animations work inside of Unity and a handle on the C# programming language. Thanks, Devin! Oh, by the way, if you use Devin's script in Unity when you have the Terrain Toolkit loaded, you'll get nothing but errors.

Now it's just a question of getting the models rebuilt, working on a GUI for the player to use, and getting some of the game functionality programmed. Trying to make the deadline by end of next semester so that I can run an experiment with a beginning German language course and publish the results. Let's see if I will be able to get everything done by then.

Friday, October 22, 2010

First Blender Animation Imported into Unity

I have had my nose to the proverbial grindstone these last few days, working hard to get a Blender animation to play inside of Unity. After two solid days of coding, debugging, and scouring the Web for clues, I finally got it to work:




To summarize my findings: Unity doesn't automatically import mesh animations from Blender. Rather, what you need to do is to create an armature, make the mesh child object to the parent armature, and then animate the armature. The animation needs to be saved as an action in the Blender Action Editor, which Unity picks up once you import the file. Work on the animation spanned three development platforms, Blender, Unity and Microsoft Visual C# Express (which I configured for automatic code completion). Now that I have a rough idea of how to get objects to move within the game, I'll add some extras such as sound and screen-based text. Should be a lot of fun.

Monday, October 11, 2010

Jacked-Up .blend Files

For some reason or another, it has been a busy start of the semester, even though I have one course reduction and also minimal preps since I'm teaching a course I've already taught in the past. Getting the NEH Digital Humanities Start-Up Grant team together, the proposal written, and submitted took some time, in addition to my other committee responsibilities at the university. Pretty soon, the semester was half-way over and I hadn't done any real development work on the project directly.

To get me back into development, I formulated a project workflow that would increase my knowledge of Blender and Unity while getting a prototype game developed, which I hope to test live in my beginning German language and culture course next semester: (a) view a few videos from Blender Essential Training; (b) import models into Unity; and (c) begin programming game in Unity. Imagine how frustrated I was when, after opening the .blend file for the main building in the game, I noticed that I could not get the models to rotate while in mesh mode:




After I had checked other .blend files, which seemed to work fine, I came to the realization that the model file itself must - somehow - be corrupted. Nothing I did seemed to correct the problem, and I'm not even sure I could fix it, so I was forced to revert to a prior version. Good thing for backups! I did lose some work, which perhaps equates to about 1-2 days of recreating what I lost. 

Tuesday, September 28, 2010

NEH Digital Humanities Start-Up Grant Proposal Submitted

It's been a long while since I last posted an entry on this blog. The start of any semester is always difficult, and this last was no exception. Between course preparation, grant submissions, and other sundry tasks needing completion, I've been rather busy. To get back in the swing of things, I've decided to post excerpts from my recent NEH Digital Humanities Start-Up Grant proposal. Much of what I drew upon to draft the grant can be found in prior articles addressing the topic of 3D digital game-based learning for second languages acquisition, although the process of writing the grant - I think - sharpened my focus a great deal and made a few things clearer to me, such as the role of narrative structures as a means of transmitting situational linguistic and cultural knowledge. Anyway, here's an excerpt of what I sent off:


4a. Environmental scan
The research and development of 3D-DGBL environments for SLA is still in its infancy, with most advances coming from private industry although work in the academy is quickly gaining momentum. Alelo Inc., for example, produces a customized series of 3D interactive video games and simulations that are widely used by the US military to train its personnel in Arabic, Dari, Pashto, and French. The academy, on the other hand, tends to rely primarily on commercial off-the-shelf (COTS) games, the modification (or “modding”) of these games, and 3D virtual reality worlds such as Second Life as instructional platforms for SLA. Although COTS games can be used to teach a second language, they run the risk of conveying false cultural information. Foreign releases of the popular strategic life-simulation game The Sims, for example, are linguistically and culturally disjointed in that they simply layer the second language over gameplay based on a US West Coast suburban lifestyle. Modifications of COTS games can also be limited by copyright restrictions, and purchase of the original game is usually required to play any derivative modification. Furthermore, the effort and time required to modify a COTS game to the point that it is culturally accurate and pedagogically viable speaks powerfully in favor of developing a custom 3D-DGBL environment from the beginning. Finally, 3D virtual worlds have proven popular in SLA and open source projects, such as the synthetic immersive environment (SIE) Croquelandia, which is used in intermediate Spanish courses at the University of New Mexico, are beginning to gain traction. The recent spate of virtual world closures (e.g., Teen Second Life), however, raises the question of whether this technology is ideal for long-term development as an instructional platform. The open-ended and unstructured gameplay of virtual worlds can additionally be difficult to manage and assess in an instructional setting, and the pragmatics of these worlds may not necessarily be those of the target language and culture. While 3D video games commonly rely on a predefined story or narrative arc to structure gameplay, virtual worlds emerge out of unpredictable, unscripted, and complex sets of interactions among their denizens and the unique communicative norms of the virtual worlds themselves. As these norms can potentially be overwhelming for beginning students of a second language and culture, more research must be conducted on how the narrative structures of standalone 3D-DGBL environments can be used to scaffold the learning process.



4b. Enhancing the humanities through innovation
Situated cognition theory, sociocultural approaches to SLA, and current discussions in video game studies point to ways in which the narrative generated by 3D-DGBL environments may be leveraged to help teach second languages and cultures. Situated cognition theory posits that people apprehend reality and transmit knowledge by means of narrative structures. Essentially subjective "stories" of a perceived reality, these narrative structures are not monolithic and unchangeable, but must be continually validated, augmented, and corrected by the communities of practice occupying specific sociocultural spaces. Current sociocultural approaches to SLA focus on this intersection of the personal and the communal, with particular attention being paid to the linguistic artifacts that emerge there. Underlying these approaches is the assumption that language acquisition is a process occurring not only in the head of the individual language learner, but also between the heads, so to speak, of people sharing common linguistic and cultural systems. This insight is important for SLA as it suggests that narratives shape specific social, cultural, and linguistic contexts; that they transmit the core values of the communities of practice inhabiting these contexts; and that they are ultimately negotiated on a personal level based on the identities, needs, and unique subjectivities of the people seeking entrance to these communities. Each person provides a "plot," as it were, to interpret these dominant narratives, which in turn generates a life "story" that can be evaluated as an independent artifact of this interaction. Many video games have a similar core dynamic. Presenting simultaneous multimedia output that is shaped by player interactions with the game world, these games generate narrative that is highly immersive and necessarily participatory in nature. The figured worlds that unfold through these interactions, each one being slightly different based on player input, performance, and personal preference, are a direct result of players feeling their way through the contours of the game world on a physical, mental, and emotional level and, as a result, form a story that is as unique as the players who interact with the game.


The DigiBahn Project will be developed at this intersection of narrative as a form of situated knowledge, narrative as an artifact of intercultural and interlinguistic activity, and narrative as the product of a figured digital world. Informed by these complementary theoretical approaches, the project will prototype a 3D-DGBL environment for teaching the German language in specific sociocultural contexts to advanced high school and beginning university students. Underpinning project development is the instructional proposition that immersion in a 3D-DGBL environment will allow players to create narrative structures that they themselves configure through interactions with the game world and which, in turn, configure players as new members in a simulated community of practice. A corollary of this proposition holds that these narratives can then be transferred out of the game world in order to help players navigate and make sense of real-world sociocultural and linguistic contexts. 


Screenshot of gameplay from The DigiBahn Project

Towards these ends, the proposed project will develop one level of standalone 3D graphic adventure game for both PC and Mac platforms requiring players to navigate a virtual German pedestrian zone and train station while meeting specific instructional goals such as using recycling and trash containers, operating a foreign automatic teller machine (ATM), purchasing a telephone calling card, interpreting departure and arrival tables, finding the appropriate track for departure, and interacting with non-player characters (NPCs). Answering calls made by the Modern Language Association in its Ad Hoc Committee on Foreign Languages Report to revise and revitalize the teaching of second languages and cultures by means of new technologies and innovative instructional approaches, the project will look for specific ways in which 3D-DGBL environments can: (a) engage a wider range of students in the SLA process through challenging and meaningful gameplay; (b) align with SLA learning objectives and assessment strategies; (c) function as a gateway to upper-division cultural studies and language courses; (d) recruit high school students to second language and culture courses at the university level; (e) promote learning through the development of transferable mental schemata and situated sociocultural knowledge; and (f) foster deeper translingual and transcultural reflection. 

Thursday, August 5, 2010

So, Like, Where is Bad Oberdinkelheim?

Earlier plans for the game I am developing included creating an exact mock-up of a real-world German space, specifically Stuttgart Central train station, as the game environment. My thinking at the time was that the game should expose a player to virtual spaces that were as authentic as possible so that the learning that takes place in these spaces would also be authentic - or "real" - as possible. For some reason or another, I was stuck on the idea that a video game is only legitimate insofar as the spaces it represents are based in the real world. Not only would this help in transfer of mental schemata, I theorized, but it would also go a long way in removing the stigma that video games were in someway separate from reality and, by extension, therefore useless in an instructional setting.

Problems emerged, however, when I realized that many real-world spaces just don't lend themselves very well to a video game environment. Sure, games can be layered onto real-world space (such as geocaching does), but games generally involve the creation of what Huizinga describes as a "magic circle" that separates the real from play. Real-world spaces are generally simply meant to be functional, and sometimes they do a poor job of even that. The idea of making the game environment to be as "authentic" as possible was finally put to rest after a discussion with Anne Balsamo at the Humanities Gaming Institute a few months ago, where she asked me (roughly paraphrased): "And why would normal instruction in the classroom be perceived as more authentic?"

Her comment led me to realize that what I normally do in the classroom is also, at its most basic level, also a personal interpretation of what I perceive to be authentically German and that I had unrealistic expectations of 3D digital game-based learning environments. Just because the environment appears to me more real than, say, a textbook does not mean that it really is. There is also a large degree of personal interpretation that creeps into the creation of the game space. So, I decided to create a game that had playful virtual spaces that emulated German sociocultural spaces, instead of a game that used real German sociocultural spaces and forced them to be fun. The latter, I thought, seemed to be a recipe for disaster (or, at the very least, a potentially boring game). Thus the imaginary town of Bad Oberdinkelheim came into being:




The development of the town will be influenced by the the surrounding area: The Romans were indeed this far north and buildings in this area do manifest a certain type of architecture. The game, in sum, is a verisimilitude of the real. How these game spaces play and feel, however, will be largely informed by theories formulated by game studies, new media, and digital game-based learning. It will, at the very leasts, be interesting to see what comes of the whole project in the end.

Finally, looking at the recent video I made for the last blog posting, it occurred to me that the video settings were all whacked-out. I specifically did not like the black letter boxing on either side of the screen. So, here's another attempt at the same thing:


Although this time I think I did less of a good job explaining why I think 3D video games are good for second language acquisition. Oh well. It's hard to talk, think, and walk around a 3D space at the same time. In sum, my hypothesis is that such video games lead to more efficient and effective learning by helping students perform better on assessments in certain areas, retain what they learn longer in their minds, and develop mental schemata that can more easily be transferred from simulated virtual environments into real-world environments. If you have any questions, please do not hesitate to contact me via email

This may be my last posting for a few weeks. The semester is starting up in a few weeks and I need to get my classes, and a conference paper on webcams in the classroom, organized. IN the future, I will be doing the coding for the game, so we'll start to see how the game objects, player interactivity, and learning objectives all come together.

Wednesday, August 4, 2010

3D Resources for Game Prototype Finished

Fall semester will be starting in a few weeks, so I have been working like mad to get as much finished on the game as possible. Experience has taught me that, despite best intentions and wishing otherwise, the start of every semester brings with it the inevitable distractions and game development generally tends to suffer during this period. The hard work on long summer hours in the office finally paid off, and just this morning I put the final touches on the door handles to the museum. What better way to celebrate than to make a screen recording?


Actually getting the screen recording made was an odyssey in itself. I've been using Camtasia in the past to make the recordings, but I wasn't happy with the frame rate and choppy playback. Doing some research online, I discovered that the other people soled this problem by running Camtasia with the DivX video codec (which is lossy, compared with the standard lossless Camtasia codec that ships with the software). In other words, no choppy playback. This solution did not work, so ended up saving my Unity3D game as an .exe file, running that file in a smaller windowed screen, and using FRAPS to record the results. A lot nicer solution!

The video shows all the models I created in Blender and GIMP for the game so far, talks about my plans for testing the game prototype, and even outlines some of my ideas on why 3D digital game-based learning environments would be good for second language acquisition. Basically, my hypothesis is that such video games lead to more efficient and effective learning by helping students perform better on assessments in certain areas, retain what they learn longer in their minds, and develop mental schemata that can more easily be transferred from simulated virtual environments into real-world environments. I'll be using Fall Semester to polish the game interface and program player interactivity and, in Spring Semester, I'll go live with the software in a beginning German class to see what aspects of the hypothesis can be supported by experiment. An article will follow shortly thereafter. In any case, should be a lot of fun.

Monday, July 26, 2010

Signs Inserted

Spent the morning and early afternoon working on a display box for the museum signs. Had some difficulties getting the stainless steel texture "just right" for the sign, so I opted to go with a scratched metal texture from DeviantArt. I wish I could spend more time getting the 3D objects to look more authentic, but since I do the art design, programming, and instructional design for the whole project, I have to keep things fairly simple. Too much depth in one area means that the project won't go forward quickly. In any case, here's the latest screenshot:


I didn't make a close-up screen capture of the poster display as I wanted to show how it fit into the whole museum entrance. For the rest of the afternoon I think I will turn my attention back to the book project, which has been on the back burner for a while.