Coder Social home page Coder Social logo

robhawkes / blocks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from danielesteban/blocks

0.0 2.0 0.0 5.82 MB

webxr multiplayer voxels engine

Home Page: https://blocks.gatunes.com/

License: MIT License

Dockerfile 0.33% JavaScript 93.74% CSS 1.41% HTML 4.51%

blocks's Introduction

screenshot

Create your own server in two steps:

  • Remix glitch.com/~blocks-server
  • Set this variables on the .env file:
    • NAME the server name (for the public registry)
    • SEED 16bit world generation seed. (0 - 65535)

If you want to experiment with world generation:

You can also use docker-compose if you already own a more powerful server:

version: '3'
services:
  server:
    image: danigatunes/blocks:latest
    environment:
     - NAME=Your Server Name
     - PRELOAD=10
     - PUBLIC_URL=https://yourserver.url/
     - SEED=1234
     - STORAGE=/data
    ports:
     - "80:8080"
    volumes:
     - "data:/data"
volumes:
  data:

Want your server to show up on the in-game map?

At the moment, the main server list verification is kind of a manual process. I will check the list from time to time and manually approve them after checking they work correctly. I need to write better tools to streamline the process, but there's other priorities right now. If you want to speed this up, you can always drop me a line on twitter with the url of your server.

Server configuration

  • CLIENT serve the client (boolean, defaults to false)
  • DESTINATIONS serve the destinations web ui (boolean, defaults to false)
  • GENERATOR the world generator function
  • MAX_CLIENTS the maximum concurrent players (defaults to 16)
  • NAME the server name (for the public registry)
  • PRELOAD a chunk radius around the spawn area to be preloaded
  • PUBLIC_URL public url of the server (for the public registry)
  • SEED 16bit world generation seed. (0 - 65535)
  • STORAGE directory in where to store the generated/modified chunks
# random seed, no preload, 16 clients
node server/main.js
# same, but preloading a 10 chunk radius around the spawn area
PRELOAD=10 node server/main.js
# flat world for only 4 clients with persistence
GENERATOR=flat MAX_CLIENTS=4 PRELOAD=10 SEED=1234 STORAGE=./data node server/main.js
# heightmap driven world generator
GENERATOR=heightmap COLORMAP=./island_rgb.png HEIGHTMAP=./island_height.png node server/main.js

Local development

webxr requires an https origin. to test with headsets on your local network:

# generate a self-signed cert/key:
openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout server.key -out server.crt
# start the server with TLS
TLS_CERT=server.crt TLS_KEY=server.key npm start

blocks's People

Contributors

danielesteban avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.