Skip to content

Instantly share code, notes, and snippets.

View z3t0's full-sized avatar

Rafi Khan z3t0

  • Supporting society through innovation
  • Ottawa, Canada
View GitHub Profile
@z3t0
z3t0 / a.js
Created October 6, 2016 05:18
// Data for task
// by Rafi Khan
// Required Modules
var fs = require('fs')
module.exports = function(options) {
return new Data(options)
}
@z3t0
z3t0 / a.js
Created August 26, 2016 01:44
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]
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System;
using UnityEngine.SceneManagement;
using System.Reflection;
public class GameManager : MonoBehaviour {
public GameManager Instance;
// 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)
// Nolag Server : Main
// Rafi Khan
extern crate time;
use std::thread::sleep;
use std::time::Duration;
// runs loop update_rate times a second
// Nolag Client Implementation : Client
// Rafi Khan
// Require Modules
var WebSocket = require('ws')
// Returns Client Object
module.exports = function(host) {
return new Client(host)
}
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
var pixi = require('pixi.js');
var player = require('./player.js')
module.exports = function(host) {
return new Game(host);
}
function Game (host) {
this.host = host;
var pixi = require('pixi.js');
module.exports = function(host) {
return new game(host);
}
function game (host) {
this.host = host;
console.log("creating game")
@z3t0
z3t0 / a.js
Last active July 29, 2016 00:08
var pixi = require('pixi.js');
module.exports = function(host) {
return new Game(host);
}
function Game (host) {
this.host = host;
console.log("Creating game")