Skip to content

ando-takahiro/room

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

room - a 3D virtual space

Motivation

This provides an experimental 3D virtual space using node.js, webgl, redis, socket.io. My goal is something like UGC web space, for example Minecraft :)

How to run

  1. checkout this repository
  2. npm install
  3. install redis(use deps/redis-*.tar.gz)
  4. run redis-server with default setting(no argument)
  5. sh scripts/dev.sh
  6. access http://localhost:8080/

DB

  • now using Redis
  • only 3 schemas
    • room:default:room key contains active users in the room
    • room:default:chat key contains chat log
    • account:[user-id]:entity key contains last status of user
  • store as JSON string

Important files and directories

  • server.js: server entry point
  • public: client side static files
  • room.html: core html
  • js
    • controller.js: core logic of client
  • src: server side codes
  • room.js: core logic of server
  • test: test codes

Testing strategy

  • now using mocha
    • browser side test is also mocha based (but it's tricky. see test/browser.js)
  • experimental redis mock

More details

Technical details will be writen here in Japanese.

Lisence

MIT

Based on

threejsboilerplate