Skip to content

Latest commit

 

History

History
70 lines (47 loc) · 1.64 KB

README.md

File metadata and controls

70 lines (47 loc) · 1.64 KB

gnocchi

Basic Minecraft-like procedurally generated world using WebGL and WebSockets.

Made with Angela Jin and Irene Yoon as our final project for CS 4621.

Screenshot

Gnocchi screenshot

Usage

To launch a client and connect to the deployed Heroku server:

$ python3 -m http.server

And then open the localhost URL spawned by Python in your favorite browser


To launch and connect to a local server (requires Rust to be installed):

First, uncomment and comment the following lines 7-13 in event.js:

// Local testing
// const protocol = window.location.protocol === 'https:' && 'wss://' || 'ws://';
// const host = 'localhost:8080/ws';
// var connection = new WebSocket(protocol + host);

// Remote server
const host = "wss://gnocchi-graphics.herokuapp.com/ws";
var connection = new WebSocket(host);

So it looks like this:

// Local testing
const protocol = window.location.protocol === 'https:' && 'wss://' || 'ws://';
const host = 'localhost:8080/ws';
var connection = new WebSocket(protocol + host);

// Remote server
// const host = "wss://gnocchi-graphics.herokuapp.com/ws";
// var connection = new WebSocket(host);

Then run the following commands

$ python3 -m http.server
$ cargo run --release

And then open the localhost URL spawned by Python in your favorite browser

Dependencies

Rust 1.31, WebGL 1.0, Python3

not gluten-free