Skip to content

The TechCafeGames Project from TechBridgeWorld at Carnegie Mellon University

Notifications You must be signed in to change notification settings

Jiyda/TechCafeGames

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TechCafeGames Project

About:

The TechCafe games platform allows game developers to create educational games that use externally created content. This allows for developers to focus on the core gaming experience, and for teachers to tailor content to their students' needs.

Brains Race Game

###1. Provide instructions on how to checkout the code from the current repository and where to place it on the local machine. ### There are four projects in this git repository:

BrainRaceGame: Game that pulls content from the TeacherPortal project and can be played on both computers and mobile devices

TeacherPortal: A content authoring tool that allows teachers to add content (e.g., questions) that will be used in the Brain Race Game

NodeTechCafe: The API that allows the Brain Race Game to pull content from the Teacher Portal.

GameCreationFramework: Another game for use with the TechCafeGames project. This game provides a basic framework that can be used by others to make their own games for use with TechCafeGames.

For all three of the above projects, clone from the respective git repositories. It does not matter where the code is placed on the local machine.

This repo can be cloned using the following URL https://github.com/CMU-15-239/TechCafeGames.git


###2. List the platforms on which the project can compiled and built.### Windows, Linux, Mac OS


###3. Since the project may be multifaceted, provide a list of the different components included in this project along with a description of each one stating its purpose and how it interacts with the other components.### There are three components to the project:

A) Teacher Portal: Web based content authoring tool used to create content for Brain race and future TechCafe games URL: techcafe-teacher.herokuapp.com

B) Brain Race: Cross-platform mobile educational game that uses content created on the teacher portal URL: brainrace.herokuapp.com

C) TechCafe-Node: Node.js module used to dynamically import content into Brain Race and future games from the Teacher Portal.


###4. Specify the tools needed to compile and build the project including compilers and/or IDEs.### #####Brain Race: #####

  • Node.js 0.8.11
  • MongoDB 2.4.1

#####Teacher Portal: #####

  • Ruby 1.9.3
  • Rails 3.2.13
  • PostgreSQL 9.2.3

###5. List any additional libraries that are needed for compiling, building and running the code ### #####Node Modules (for Brain Race): ##### Express Mongoose

#####Ruby Gems (for Teacher Portal):##### bcrypt-ruby cancan cofee-rails debugger jquery-rails mocha nested_form nifty-generators pg sass-rails uglifier


###6. Specify the locations where these tools can be acquired. ### Node.js: http://nodejs.org/ MongoDB: http://www.mongodb.org/ Ruby: http://www.ruby-lang.org/en/ Rails: http://rubyonrails.org/ PostgreSQL: http://www.postgresql.org/

Both Express and Mongoose can be installed by running ‘npm install’ from the Brain Race directory. They can also be downloaded from http://expressjs.com/ and http://mongoosejs.com/ All necessary Ruby gems can be installed by running ‘bundle install’ from the Teacher Portal directory.


###7. Indicate the location where these tools need to be installed on the local machine for project compilation, building and execution.###

For instructions on installing PostgreSQL and MongoDB, please refer to the documentation on the official websites.

Node.js, MongoDB, PostgreSQL, Ruby, Rails: Install wherever convenient on your local machine, as long as they are all accessible using the command line.

#####Node Modules and Ruby Gems (for Teacher Portal):##### Node modules will be automatically installed in the correct place when running ‘npm install’. Gems will be automatically installed in the correct place when running ‘bundle install’.


###8. Indicate if there are any project config files, what they are used for and provide information on where these files need to be located on the local machine.### Included in the project package.


###9. Specify any settings within these config files for compiling, building and/or execution.###

Admin user ‘postgres’ might need to be created for Teacher Portal. (On some machines, this is the default user.)


###10. Provide instructions on how to compile and build the project using the specified tool(s) from item 4 and also specify any compiler/build configuration settings.### #####Brain Race: #####

  • Clone repository
  • Run ‘npm install’ in the Brain Race folder, which installs the required node modules.
  • In a separate terminal window, run mongoDB. (use ‘./mongod’ in your mongodb/bin folder)
  • Open a terminal window, navigate to the Brain Race folder, and use ‘node server.js’

######To access local instance of Brain Race:###### On computer:

  • Using a browser (preferably Chrome), access localhost:8080/desktop.html
  • On Chrome, go to View > Developer >Developer Tools
  • In the window that pops up at the bottom, click on the settings icon on the bottom right corner of your screen. On the window that pops up over your developer console, click on “Overrides” on the left under “Settings”, and then on the right pane scroll down and enable “Emulate touch events”.
  • You can now control the car in game by clicking and dragging your mouse
  • Note: both the local version and brainrace.herokuapp.com pull content from techcafe-teacher.herokuapp.com

On mobile:

  • Using a browser (preferably CordovaBrowser) , access :8080

#####Teacher Portal:#####

  • Clone repository
  • In a separate terminal window, run ‘postgres’
  • In a terminal window, navigate to the Teacher Portal folder and run ‘bundle install’
  • Run ‘rake db:migrate’
  • Run ‘rails server’

To access local instance of Teacher Portal:

  • Using a browser, navigate to localhost:3000

###11. Indicate the target platform on which the binary (or binaries) are intended to run.### The entire project is web based, and can run on any platform with a browser. Brain Race is also packaged as an APK file, which can be installed on Android devices.

###12. Indicate if the application requires any input files that are read and processed when the application executes. ### The project does not require external content.


###13. Specify the locations where these input files can be obtained if not already included in the project.### N/A


###14. Specify the locations where these input files need to reside on the local machine when the application executes.### N/A


###15. Indicate if the application generates output files.### It doesn’t.


###16. Specify the location of where these output files will be written.### N/A


###17. If using external hardware or mobile device, provide instructions on how this device needs to be connected to the computer.### No physical connection is needed between the mobile device and a computer.

When running Brain Race from a mobile device, one option is to install and run the APK, which is connected to brainrace.herokuapp.com. Another option is to connect to localhost. To do this, you need to first run the node server on a computer. Then, on the phone, you can access the game at <your computer’s IP>:8080. Accessing the game through Cordova Browser (can be downloaded for free from Google Play and iOS App Store) is recommended because it simulates the game as if it has been packaged as an APK.


###18. Regarding mobile devices and/or external hardware, indicate if any of the generated binaries from item 10 need to be installed on this device and provide instructions on how to install these binaries.### For Brain Race, an APK can be installed to access the game hosted at brainrace.herokuapp.com. The APK is included in the Brain Race project package - it can be transferred onto an Android phone and installed directly. The game can then be accessed like any other Android app.


###19. Specify any settings on the computer for the device.### N/A


###20. Provide instructions on how to run the application on the external hardware, mobile device and/or computer.### Install the APK file for Brain Race on the smartphone. Run the application, and play.


###21. If the mobile device requires interaction with the computer, provide instructions on how this interaction should work from an end user standpoint. ### (Optional) Manage users, questions, and content sets on the Teacher Portal at techcafe-teacher.herokuapp.com.

Launch brain race and use new or previously created content in game.


###22. List any known bugs, configuration issues or other pitfalls to look out for when compiling, building and/or running the application.### PostgreSQL requires the user ‘postgres’ to run with our app. (More?)


###23. Provide a list of future features/capabilities that you would like to see included in the existing tool.### Different question types for teacher portal, such as fill in the blanks and image questions.

Performance tracking on teacher portal (for example, different classes’ and students’ performance over time, frequent correctly- and incorrectly-answered questions in a content set, etc).

Caching of Brain Race game content so game can still be played if device loses internet connection during a game.

More games.


##Additional Information for Brain Race Game:##

#####Keeping the API up to date: ##### If the location of the Teacher Portal is changed, the API implementation must also be updated in order to continue to correctly serve question content. At the time of writing this document, the Teacher Portal was hosted at http://techcafe-teacher.herokuapp.com.

Instructions for API update.

The API is located at https://github.com/CMU-15-239/Node-TechCafe.

Step 1: Update the readme.md file to reflect the change in the URL.

Step 2: Update line 7 of the file node_techcafe/node_techcafe.js to reflect the URL change.


#####Teacher Portal Accounts##### An account on the Teacher Portal is either an admin or a teacher.

Teachers can manage all questions and their own content sets. Administrators can manage all questions, all content sets, all user accounts, and question categories.

When deploying the Teacher Portal with a new database, the first person to register will automatically become an admin. After that, everyone who registers from techcafe-teacher.herokuapp.com/signup will automatically become a teacher.

Admins can create new admin accounts and teacher accounts from the “Accounts” page.

TechCaFE TeacherPortal

CURRENTLY DEPLOYED VERSION:

The TechCaFE Teacher Portal is a site where teachers can manage questions and content sets that can then be used in educational games for their class. It is built with Ruby on Rails and Bootstrap, with a Postgres database. The teachers can register and then login, and there is an admin account for admin login. The teacher or admin can then create, manage, and delete questions and content sets.

NodeTechCafe Project

About:

The TechCafe games platform allows game developers to create educational games that use externally created content. This allows for developers to focus on the core gaming experience, and for teachers to tailor content to their students' needs.

Node-TechCafe is a Node.js API Implementation for TechCafe's Teacher Portal.

Created for TechBridgeWorld/TechCafe at Carnegie Mellon University.

Useful links:

Teacher Portal (Content Creation Platform): http://techcafe-teacher.herokuapp.com

Project page: http://www.cs.cmu.edu/~239/projects/techcafe-games

Installation:

Put the folder Node_TechCafe under your-app/modules (Or wherever you prefer to save it).

Setting Up the Connection to Teacher Portal:

Inside the file Node_TechCafe.js you will see a seciton similar to the one below. You need to list the URL or IP address of the machine running the teacher portal software. The port will always be 3000 assuming that this port is not being used by other applications.

var options = {
	host: '<YOUR SERVER RUNNING TEACHER PORTAL>',
	port: 3000,
	method: 'GET',
};

Example of Teacher Portal running on a publically available web server:

var options = {
	host: 'www.myserver.com',
	port: 3000,
	method: 'GET',
};

Example of specifying a machine that may be running on your local network

var options = {
	host: '192.168.0.12',
	port: 3000,
	method: 'GET',
};

Example of running the both the server and Brain Race game on the same machine.

var options = {
	host: 'localhost',
	port: 3000,
	method: 'GET',
};

Usage:

var techcafe = require('./modules/Node_TechCafe/node_techcafe');

techcafe.getTeacherList(function(data){
	//use data
});

techcafe.getContentByTeacher('TeacherUsername', function(data){
	//use data
});

API:

###getTeacherList(function): Returns a list of JSON objects containing all teachers in the database

Data Format:

[{username:Teacher1}, {username:Teacher2},...]

###getContentSetList(function): Returns JSON object containing all content sets in the database

Data Format:

{ContentSet1: Questions, ContentSet2: Questions, ...}

###getContentByTeacher(teacherID, function): Returns JSON object containing all content sets for a given teacher ID

Data Format:

{
username: 'username', 
content_sets: 
[{name:ContentSet1, questions:Questions},
{name:ContentSet2, questions:Questions}, ...]
}

About

The TechCafeGames Project from TechBridgeWorld at Carnegie Mellon University

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 65.2%
  • CSS 17.8%
  • Ruby 9.2%
  • HTML 7.4%
  • CoffeeScript 0.4%