CSC/ECE 517 Spring 2013/OSS E629: Difference between revisions
Line 54: | Line 54: | ||
====Assignment Group Error==== | ====Assignment Group Error==== | ||
In previous JSON backend, if an assignment group has X assignment in it, it will return X copy of that an assignment group, thus there’ll be X*X assignment in total. X times greater than it should be. | |||
We fix this bug by | |||
The following is the related code: | |||
===Fixing Minor Bugs=== | ===Fixing Minor Bugs=== | ||
==General Introduction to the System Setup== | ==General Introduction to the System Setup== |
Revision as of 17:57, 23 March 2013
E629: Integrating game frontend for Expertiza
Project Introduction
This is a game made for the Expertiza system (Ed Gehringer, NCSU). It transforms an assignment-based course into a "game" in which the player levels up and completes areas. The player doesn't receive grades; rather, he gains experience, and the professor would convert the experience values of the players at the end of the course into grades. The map is split up into distinct "rooms" unlocked by completing assignments; these are arrayed around a "center" in the middle of the map which contains portals to each room (portals which unlock as the player progresses).
Project Requirement
Students will need to develop a page that runs the Expertiza game in JavaScript when a user is logged in and calls the code from E407 to get the JSON string to be parsed by the frontend.
The page should basically load the frontend JavaScript and point it to the JSON string (a URL that will check to make sure that the current user is logged in correctly).
Our Work
Experience Point Report
In this game, the player doesn't receive grades; rather, he gains experience(XP), and the professor would convert the experience values of the players at the end of the course into grades.
The Previous XP is a fake one, they just send the "grade" score as the XP point. So one part of work is to rewrite this part.
The new XP point system is a weighted score system, where instructor can assign or automatically generate the XP point.
The following is the code for XP point report system:
Assignment Group Modules
Assignment group module is used to
Previous assignment group from the previous project E407 is a fake module. In this version, the code to decide whether an assignment group is “available” to a student should appear in both frontend and backend, but neither of them works. So we rewrite it and assign privileges to it.
The following is the code for the assignment group module:
JavaScript Code Reconstruction
When the game is running on the Expertiza system, Expertiza should send the game the info it needs to generate the level and game state at load-time. The page should basically load the frontend JavaScript and point it to the JSON string.
Previous system get JSON by polling the server. In this strategy, the computer does nothing other than check the status of the backend until it is ready, at which point the device is accessed. In order to improve the efficiency of the CPU, we introduced Event Driven Programming (EDP) into our design. In EDP, the flow of the program is determined by events. In our case, a callback closure is called when the JSON data hit the frontend.
We also Change the ig module a little bit to support visiting module variable in closure.
The related code is as following:
Fixing Mega Bugs
Uncaught Exception
Previous JSON backend throws an uncaught exception when the user has an unsubmitted assignment and he is participating in that assignment.
We fix this bug by
The following is the related code:
Gate Name Error
Previous JSON backend didn’t set gate name correctly. Thus when having multiple assignment group (>3) and at least one hub threshold is higher than current user’s XP point, JavaScript frontend falls into infinite loop.
We fix this bug by
The following is the related code:
Assignment Group Error
In previous JSON backend, if an assignment group has X assignment in it, it will return X copy of that an assignment group, thus there’ll be X*X assignment in total. X times greater than it should be.
We fix this bug by
The following is the related code: