This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Data for task | |
| // by Rafi Khan | |
| // Required Modules | |
| var fs = require('fs') | |
| module.exports = function(options) { | |
| return new Data(options) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var ndarray = require('ndarray') | |
| var block = require('./block.js') | |
| module.exports = function() { | |
| return new Chunk() | |
| } | |
| function Chunk() { | |
| this.size = 16 | |
| this.dims = [this.size, this.size, this.size] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System; | |
| using UnityEngine.SceneManagement; | |
| using System.Reflection; | |
| public class GameManager : MonoBehaviour { | |
| public GameManager Instance; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Create a game | |
| Debug.Log("Create a single player game: " + gameMode); | |
| SceneManager.LoadScene ("dmGame", LoadSceneMode.Single); | |
| switch (gameMode) { | |
| case Game.GameMode.DEATH_MATCH: | |
| Debug.Log ("create a deathmatch game"); | |
| GameObject go = GameObject.Find ("/Everything/Game"); | |
| if (go == null) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Nolag Server : Main | |
| // Rafi Khan | |
| extern crate time; | |
| use std::thread::sleep; | |
| use std::time::Duration; | |
| // runs loop update_rate times a second |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Nolag Client Implementation : Client | |
| // Rafi Khan | |
| // Require Modules | |
| var WebSocket = require('ws') | |
| // Returns Client Object | |
| module.exports = function(host) { | |
| return new Client(host) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Server (host, port) { | |
| // Create WebSocketServer | |
| var wss = new WebSocketServer({host: host, port: port}) | |
| wss.on('connection', this.onConnect(ws)) | |
| } | |
| Server.prototype.onConnect = function (ws) { | |
| // Debug |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var pixi = require('pixi.js'); | |
| var player = require('./player.js') | |
| module.exports = function(host) { | |
| return new Game(host); | |
| } | |
| function Game (host) { | |
| this.host = host; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var pixi = require('pixi.js'); | |
| module.exports = function(host) { | |
| return new game(host); | |
| } | |
| function game (host) { | |
| this.host = host; | |
| console.log("creating game") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var pixi = require('pixi.js'); | |
| module.exports = function(host) { | |
| return new Game(host); | |
| } | |
| function Game (host) { | |
| this.host = host; | |
| console.log("Creating game") |