CSC/ECE 517 Spring 2013/OSS E629: Difference between revisions
Line 30: | Line 30: | ||
===JavaScript Code Reconstruction=== | ===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=== | ===Fixing Mega Bugs=== |
Revision as of 17:50, 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: