Giter Site home page Giter Site logo

altspacevr-project-threejs's Introduction

ShootCraft

Summary

A simple Minecraft-like builder game where you can build with either mouse clicks or a projectile cube shooter.

This project uses Three.js and builds from the Three.js voxelpainter demo.

Instructions

Clone this repo and open Projects/index.html in your browser.

Locomotion

  • W: forward
  • S: back
  • A: left
  • D: right

When cubes are placed, player will automatically climb when stepping forward onto a cube one level higher than where the player is at. If cubes ahead of player are two or more cube-heights higher than player's current position, it will be treated as an obstacle the player cannot pass.

Look Around

Left mouse drag to look around. (Eye icon in upper left when left mouse button is down will indicate you are in 'look' mode.) In a full VR setup, this would be done with head movement.

Pick a Color To Build With

Hit tab to cycle through which color block you have "chambered". (Appears in second icon in upper left.) When you next place a block, it will be this color.

Build/Destroy

You are in mouse 'build' mode when you hold shift down. Left mouse clicking will add a cube to the closest grid space to your mouse click.

And the fun part - you can build by shooting a cube with the spacebar (you do not have to hold down shift, this works in any mode). The cube will be shot in the direction your camera is facing, and will snap into the nearest grid space when it runs into another cube or the ground plane.

Note that the cubes act as if magnetic, it will snap onto the side of another cube as well as the top, if that is the closest surface it collides with.

You are in mouse 'destroy' mode when you hold ctrl down. Left mouse clicking will remove any cube you click on.

Future Improvements

Some features to add:

  • More interesting block textures
  • Variable initial shooting force (player can control with a dial)
  • Aim gun with hand/arm controls (Kinect?) separate from head movement
  • Multiplayer (build cooperatively)
  • Physics (allow player to knock down existing blocks by shooting other blocks)

altspacevr-project-threejs's People

Contributors

gfodor avatar hsubox76 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.