1 / 62

Compiler Integration into Computer Science Learning Games

Compiler Integration into Computer Science Learning Games. Amanda Chaffin katla@wulfkub.com Advisor: Dr. Tiffany Barnes tbarnes2@uncc.edu. Background Game2Learn Ele Mental : The Recurrence Implementation The Study Conclusion Future Work. Motivation Solution Game Creation

loki
Télécharger la présentation

Compiler Integration into Computer Science Learning Games

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Compiler Integration into Computer Science Learning Games Amanda Chaffin katla@wulfkub.com Advisor: Dr. Tiffany Barnes tbarnes2@uncc.edu

  2. Background Game2Learn EleMental : The Recurrence Implementation The Study Conclusion Future Work Motivation Solution Game Creation Learning Games Goal Hypotheses Outline Chaffin - G2L platform October 29, 2008

  3. Motivation • Rising demand for CS majors (Vesco, 2007) • But enrollments are falling! • And many enrolled students leave after CS1-2 • Why? (Beaubouef, 2005) • Lack of problem solving skills • Miscommunication • Homework, lecture, code Chaffin - G2L platform October 29, 2008

  4. Solution • Games for learning computer science • Less abstract, more familiar • Proven results – • Students creating games • Students learning from games Chaffin - G2L platform October 29, 2008

  5. Game Creation • MineSweeper and Asteroids (Becker, 2001) • ASCII based graphics • Turn Based Strategy • Excellent Learning Payoffs • Game Programming in CS1 (Bayliss, 2006) • RAPT Summer Course (Rochester Institute of tech) • Capstone Course - Colby College (Jones, 2000) • Design and create their own game • Capstone Course - North Texas (Parberry, 2005) • Parallels with an art course • Design and create their own games Chaffin - G2L platform October 29, 2008

  6. Learning Games • Revolution (Jenkins 2003) • Teaches the American Revolution • MUPPETS (Bierre, 2004) • Developed at Rochester Institute of Technology • Written in Java • Allows students to program 3D game objects • Tactical Iraqi (Losh, 2006) • Teaches soldiers • Culture • Language proficiency Chaffin - G2L platform October 29, 2008

  7. Learning Games Con’t • Alice (Mullins, 2008) • Created at Carnegie Mellon University • 3D programming environment • Story telling animations and game playing • Teaching tool for introductory computing • Scratch (Maloney, 2008) • Programming language - allows for stories, animations, games, • Teaches design, mathematical and computational ideas • Wu’s Castle (Eagle, 2008) • Teaches arrays and loops

  8. Goal • To have students learn computer science • While playing games • With maximal skill transfer • Without breaking the sense of being in game • In other words, students should write code, if at all, inside the game Chaffin - G2L platform October 29, 2008

  9. Hypotheses • Students who play a learning game where • The main game mechanic is a direct metaphor for how programs work, and • Students can write and compile code inside the game • Will effectively learn computing concepts • Students who make a learning game where other students write code will • Learn the coding concepts better • Be able to teach the concepts Chaffin - G2L platform October 29, 2008

  10. Background Game2Learn (G2L) EleMental : The Recurrence Implementation The Study Conclusion Future Work History of G2L Saving Sera The Catacombs Squee StormHaven3 Limitations Outline Chaffin - G2L platform October 29, 2008

  11. History Chaffin - G2L platform October 29, 2008

  12. Rapid prototyping Saving Sera RPG Maker 3 ways of writing code Multiple concepts The Catacombs Neverwinter Nights (NWN) Code through dialogue For loops 1st Study Students receptive,but No learning gains 2nd Study Learning gains Saving Sera/The Catacombs Chaffin - G2L platform October 29, 2008

  13. Squee/StormHaven3 • Squee! – Methods • RPGMaker • Maybe a little overcomplicated for the engine • StormHaven 3 – Parameter passing • NeverWinter Nights • Interactive lecture • Study showed learning gains Chaffin - G2L platform October 29, 2008

  14. Limitations • Neverwinter Nights Limitations • Cannot change the GUI • Compiler integration possible but limited to NWN Script • RPG Maker • 2D platform; not modular enough for robust development • Compiler integration might be possible but would be limited to Ruby Chaffin - G2L platform October 29, 2008

  15. Background Game2Learn (G2L) EleMental : The Recurrence Implementation The Study Conclusion Future Work Video Designing G2L Games DarkWynter Code Design Game Design : Recursion Pre/Post Test Interface Interfaces Instructions Compiler Heads Up Display (HUD) Outline Chaffin - G2L platform October 29, 2008

  16. Video Chaffin - G2L platform October 29, 2008

  17. Designing G2L Games (Barnes, 2007) • Choose target concept • Design code to illustrate concept • Get players to construct target code • Might need to provide scaffolding code • Need instructions • How to use interface • About learning concepts Chaffin - G2L platform October 29, 2008

  18. DarkWynter Code Design • Methods needed in-game coding • GetScaffolding() • Support code to get students started • CompileCode & RunCode() • Explained with CompilerController • ValidateStudentCode() • Parsing • Output • RunVizualization() • Updates game events Chaffin - G2L platform October 29, 2008

  19. Game Design – Recursion • Designed by Wicked Fly Games • Goal: Teach recursion, leverage engine • Uses Depth First Search Walkthroughs • Build bridges (edges between nodes) • Collect thoughts to motivate traversal • Watch visual walkthrough • Stacks and Dialogues • Explain how recursion is handled Chaffin - G2L platform October 29, 2008

  20. Pre and Post Test Chaffin - G2L platform October 29, 2008

  21. Game GUI - Overview

  22. Outline Background Game2Learn (G2L) EleMental : The Recurrence Implementation The Study Conclusion Future Work DarkWynter Engine Modifications Nuclex Game Control Architecture In-Game Compilation CompilerControls Challenge Objects Event System HUD Redevelopment Custom Game Objects AI Modifications Survey Controller Instructions Control Chaffin - G2L platform October 29, 2008 22

  23. XNA • Microsoft’s hobbyist game development platform using C# and .Net • Allows development with Visual Studio • Used to develop DarkWynter • In UNCC’s Game Studio Class (2007) • More of an engine than a game • Allowed for procedural terrain modification Chaffin - G2L platform October 29, 2008

  24. DarkWynter Modifications • Goal • Build games that allow for writing and running code within them • DarkWynter allows complete control • Modified to allow addition of • Editing window & other forms needed • Compiling and running code in the game Chaffin - G2L platform October 29, 2008

  25. Forms: Nuclex Game Control • Open source XNA modification • Allows multiple form use in XNA • This is not built in; XNA games run in a single form • Controls multiple forms through Forms User Control • XNA runs in one form, allowing others to be made • Disconnects code window from game update() • Overrides onPaint() and controller methods http://www.nuclex.org/news/2007/05/14/xna-windows-forms-usercontrol Chaffin - G2L platform October 29, 2008

  26. In-Game Compilation • Runtime compilation with .Net CodeDom • Code Document Object Model • Graph (tree) representation of code • CSharpCodeProvider • Implements the ICodeCompiler • Compiles a CodeDom Tree with C# • CompilerParameters.GenerateInMemory • Allows in-game code to run from memory • CompilerParameters.ReferencedAssemblies.Add() • Allows in-game code to access engine • Reference: http://support.microsoft.com/kb/304655 Chaffin - G2L platform October 29, 2008

  27. CompilerControls Architecture Chaffin - G2L platform October 29, 2008

  28. Challenge Objects • Objects that represent educational activites • XML will determine activities • CompilerControl will read XML -> Challenges • Methods • GetScaffolding() • Gets the preset scaffolding code • ValidateStudentCode() • Parses the code • RunVisualization() • Changes the CurrentGameConditions in the Event System Chaffin - G2L platform October 29, 2008

  29. Challenge Objects Code

  30. Event System • Created by WickedFly Games (Katelyn Doran, UNCC and Drew Hicks, Marietta College) and modified by DarkWynter • Turned the Engine from a FPS to an RPG • Loads from Engine.cs using XML • Events triggered by changing CurrentGameConditions (CGC) • CGC changes from • Collision with objects • Challenges (runVisualization()) • CGC change calls update() in GameEventHandler.cs • If CGC matches GameEvent’s trigger conditions – FireEvent() Chaffin - G2L platform October 29, 2008

  31. Event System Architecture Chaffin - G2L platform October 29, 2008

  32. Each Event has TypeID Parameters Triggers Events : XML Settings

  33. HUD Redevelopment • DarkWynter was a 4-player game • 4 Humans each had own HUD • Did not have an update() • For G2L • Decoupled from Human, coupled with Renderer • Changed to Public Static • Added an update loop • Changed all add methods to return list location • Changed all graphics and text Chaffin - G2L platform October 29, 2008

  34. HUD Updates Con’t • Redesigned for Dialogue Events • Update() with a timer that controls the rest • ShowDialogue() • RemoveDialogue() • Dialogue Events redesigned • To accept textures from XML Chaffin - G2L platform October 29, 2008

  35. Thoughts() Collectible items Models created by Wicked Fly Games Arrows() Indicators of location Created by Wicked Fly Games WaterPlane() Water plane to keep students on island Custom built Shader Blends two textures Custom Game Objects Chaffin - G2L platform October 29, 2008

  36. AI Modifications • ThoughtAI() • Walk in a straight line algorithm • Had problems with • Rotation • XML position loading • Walk speed

  37. Survey Controller • Integrates pre and post test into game • What it does – • Creates a new Form • Loads data from XML into the Form • Validates answers • Writes results to a log Chaffin - G2L platform October 29, 2008

  38. Educational instructions for the student’s use to guide through code development What it does – Creates a new Form Loads the InstructionSet for the Level from XML into Form Can be used to prevent students from compiling code until read Instructions Control Chaffin - G2L platform October 29, 2008

  39. Background Game2Learn (G2L) EleMental : The Recurrence The Study Conclusion Future Work Design Results Pre and Post Test Compiler Errors Qualitative Comparisons to other G2L Games Outline Chaffin - G2L platform October 29, 2008

  40. Pilot Study Design • Pilot Study • Current CS 2214 and 2215 students recruited via the professor • Study consists of – • Demographic survey & pre-test • Play game • Post test & survey • Data logged by game and automatically (non secure) FTPed Chaffin - G2L platform October 29, 2008

  41. 31 total participants 27 took incorrect pretest 16 took valid pre and post test 1 non computing major 1 freshman, 1 sophomore, 10 juniors, 3 seniors, and 1 post Baccalaureate 13 men, 3 women 5 casual gamers, 4 hardcore, 7 neither Study Results Chaffin - G2L platform October 29, 2008

  42. PreTest/PostTest Chaffin - G2L platform October 29, 2008

  43. Pre/Post/Compilation Attempts Chaffin - G2L platform October 29, 2008

  44. Qualitative Comparisons Chaffin - G2L platform October 29, 2008

  45. Favorite Aspects of EleMental?

  46. Suggested Game Improvements

  47. Traditional Vs. Game Assignments

  48. Conclusion • What we learned • Code concepts – abstraction, recursion, Forms, polymorphism, CodeDom, Compilers • Agile development – rapid iterations through software cycle • Teamwork • Communication • Self organization • Accountability • Good code no substitute for proper design! • Parsing is HARD! • Limitations • Needs Shader 3.0 graphics support • Cannot run on laptops • Is downloadable through SVN • If XNA and DirectX installed, can immediately run Chaffin - G2L platform October 29, 2008

  49. Future Study • Hypothesis – students who play EleMental: The Recurrence with access to the in game compiler will show significantly higher learning gains than a comparison group that plays without the compiler. • Crossover study – • Half play the game with compiler • Half play without • Swap Chaffin - G2L platform October 29, 2008

  50. Future Engine Work • Level Creation currently at 5 hours for 2 people – want to drop that to 2 • XML loading of Challenge Data • DarkWynter level editor to create XML • Can add new levels through mostly XML edits, plus minor code changes (code parsing) • Maps already easy (greyscale image) • Database • MySQL connect • Design finished • More robust Chaffin - G2L platform October 29, 2008

More Related