Giter VIP home page Giter VIP logo

node-warrior's Introduction

Node-Warrior

A 3D multiplayer voxel game with a code gun! It's a gun that shoots code you wrote into the world!

Game

Try it out here. To start, host a game, create a world, then select that world to host. Share the URL with friends and they will join your game.

Dependencies

First you'll need to make sure you have git and node installed. You can check this by going to your command line and typing git -v and node -v. If you get a command not found message, install the missing tool:

Installation

To start contributing to this project:

git clone https://github.com/kumavis/node-warrior.git
cd node-warrior
npm install

To launch the asset server (port 8002) run

npm start

Grunt will now do some work for you and get the server running. Just go into your web browser and visit http://localhost:8002/.

Controls

  • Press the ~ (tilde/backtick) key to toggle the code editor
  • Number keys select the different 'tools'
  • Materials can be selected using keys t y u i o p [ ] \ and g h j k l ; '
  • Press enter to chat in the bottom left window

node-warrior's People

Contributors

kumavis avatar knod avatar mehulkar avatar

Stargazers

 avatar Louis avatar Andrew Corbin avatar  avatar Kabir Brar avatar the Artist Adamo avatar airbender avatar Artem Rukavytsia avatar  avatar Vithal Reddy avatar Jake avatar Paris Vega avatar Olivier Michaud avatar Sahebjot singh avatar Josh Mize avatar Th. Ma. avatar  avatar Eric Martindale avatar  avatar Wintermooch avatar Harry Jubb avatar Rafal W. avatar JJ Vogliss avatar Angus H. avatar roadlabs avatar Jithin Shah avatar Valentin Vichnal avatar Md5online avatar Guillem Cruz avatar Steve Robinson avatar Dave Gramlich avatar cybai (Haku) avatar Yosh avatar Joaquim Serafim avatar Mathias Buus avatar Feross Aboukhadijeh avatar Kyle Robinson Young avatar Sean avatar Jeremy Taylor avatar Berkeley Martinez avatar  avatar  avatar Patrick avatar JT5D avatar  avatar  avatar Dan Finlay avatar

Watchers

roadlabs avatar James Cloos avatar  avatar  avatar

node-warrior's Issues

How to teach javascript/node

How to teach javascript/node in a non-standard environment in a meaningful way?
Scripting in games is a great introduction to programming. But how can we introduce the concepts of node modules and the npm ecosystem, make them useable in the game, but not twist their usage so far from their actual real world usage.

Any thoughts appreciated!

We can use modules in the browser using browserifyCDN as done with requirebin.com

A more game-like approach might be to unlock modules the player can use one by one as the result of completing challenges.

Harden dependency versions

Loose dependency versions via ~ can unwittingly introduce problems. I have experienced this in another project. Lets harden the dep versions.

Solution: Remove all tildes in the package.json file. Also should clean your node_modules after modifying the package.json to ensure that you have matching deps.

to refresh node_modules:

rm -rf node_modules
npm install

Multiplayer over webRTC

some initial work has been done to this end, but is not complete.

this is an important target because it allows the number of players to scale beyond the infrastructure we have access to.

Editor - key propagation with tool selection

When the editor is open and blurred, a number key is used to select a tool to edit. When that number is pressed, the correct tool is selected and it's script displayed, but the number is also typed into the script text field.

Changing Focus in the Code Editor

If the cursor is active in the code editor, pressing esc should remove focus from the code editor. If the code editor is out of focus, but open, esc should exit the code editor.

Improving ease of contribution to project

  • Secure sandbox
  • Update demo
  • Simplifying project file structure
  • Documentation
    • What servers and services need to be running for the app to work
  • Project Goals and Milestones
  • Clear explanation of current state and what needs to be done - audit issues
  • Move repo to voxel?

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

Once you have installed CI on this repository, you’ll need to re-trigger Greenkeeper’s initial Pull Request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organiszation’s settings page, under Installed GitHub Apps.

Build - Can't rebuild because LOCK file in use

>> File "lib/client.js" changed.

using db: /Users/kumavis/Development/Node/Voxel/node-warrior/world/kumavis
Running "chauffeur:dev:lock" (chauffeur) task

Running "browserify:build" (browserify) task
Fatal error: IO error: lock /Users/kumavis/Development/Node/Voxel/node-warrior/world/kumavis/LOCK: Resource temporarily unavailable

Feature - Access controls, Block-level authorization

In order to to build some challenges/levels, we will need to be able to impart some limitations on the player. For example if there is a gate that must be unlocked by streaming a key through to a lock, it would necessitate not being able to get past the gate by other means ( breaking through blocks, manually setting the avatar position ).

This would also allow you to have public spaces where a trusted some are allowed rights to modify, protected from the anonymous passerby.

Host on github pages

Multiplayer over webRTC means that we only need staticCDN. No more dedicated servers necessary to play! That means we can host the project on github pages.

Feature - Inventory

Create an inventory for blocks and tools (including scripts) that displays on a keypress. Make those items selectable. Selected items would go to a smaller hot-key accessible toolbar in the regular game-play interface. Different tabs in the inventory interface would be used to show different groups of blocks and tools?

Easy way to share creations with others

Players could share their self-created work - tools, images, sounds - in-game so that others can use them, one on one. Also possibly the ability to put your work in a server repository for others to peruse and use.

Refactor - build system sucks

it sucks.

simplified description of build requirements:

  • make a build dir (empty it if its present)
  • dump some static files into a certain place e.g. images
  • compile some ejs into an html file
  • compile some sass into a css file
  • compile some ember templates into a js file (minify if prod)
  • browserify the app entry-point into a js file (with browserify debug flag if a dev build) (minify if prod)
  • (when a dev build) rerun a build process if a related file changed

Context click freezes mouse

If while playing the game you press esc to get your mouse back and then right-click on the screen to get the regular context menu, your mouse becomes frozen. This doesn't happen when you right click over the item menu area. Chrome + OSX 10.8

Editor blur key propagation

Once focused in the code editor, pressing 'esc' twice will exit you to all the way out of the game to where your mouse is free of the game. You have to click on the screen to get back in.

Editor - returning focus

When focus is in the editor, "esc" takes focus away. At that point "~" should return focus to the editor, but it doesn't. It seems to by putting the cursor in the text, but typing doesn't produce anything. Clicking in the text does return focus to the editor.

Fantasy API for NPCs

I'm going to be assembling various convenience methods that would be nice to have for NPCs here.

NPC vs Entity

Aaron just said this to me and it confused me. These are two things?

I'm coming from teaching kids with Scratch, and Scratch is learnable for kids because it has a compelling set of convenience methods (blocks) to get started with games fast.

For example, with just about 6 blocks, a simple chase game can be made. (Hero: always follow mouse. Enemy: Always point at hero, move forwards).

For one thing, I don't like exposing global functions in the NPC scope, I think it encourages bad practice for the kids. I'd encourage us to treat the NPC run-loop as a method of the NPC, and tie all methods to a this object.

The beauty of this approach is that to start we can simply run the NPC run loop in the context of the entity object being called. I don't completely remember what these objects have on them offhand, but it should include direct access to the mesh, along with any other voxel-related objects and methods related to it.

Voxel NPC Convenience Pack

To start, we can pass the current objects, but all we have to do to modularly expand the API is create the Voxel NPC Convenience Pack, a module that accepts a Voxel-character, and returns the same voxel-character but with a growing library of convenience functions!

Organization

These functions could be flat, but since I'm largely thinking about kids who are coming off Scratch and are ready for real code, I'd strongly recommend grouping the convenience functions into categorical objects the way Scratch does. In this case, that would be:

  • Motion
  • Looks
  • Sound
  • Sensing

So in this case you could call this.motion.moveRelative([0,1,0]);, or this.motion.moveAbsolute([1,0,0]);.

List of convenience methods to come.

Feature - different zones / worlds / levels

If we're going to have a universe with persisting public spaces, private challenge rooms, user created content, and more, we're going to need to be able to navigate between 'rooms'/'realms'/'worlds'.

I imagine the challenge worlds will mostly be single player entities. But if you got stuck it would be nice to be able to invite someone along to help you.
Perhaps when you go to try a challenge room, you first fork it into your collection. Then you can start serving it
yourself.

Custom sounds

Maybe a player could record their own sounds and attach them to blocks or their avatar or as scripts they could activate on the spot to make that sound.

Feedback when exiting game interaction

It might be useful to have some sort of feedback (e.g. a sound or visual effect) when you exit the pointer-lock (getting your mouse back), not just when you enter it.

Feature - CodeCubes or "ModVoxes"

-Special voxels that have an associated hash of event handlers
-Various game events trigger calls to the corresponding handlers:

  • game tick
  • collision
  • activate (from a click-to-activate interaction)
  • player proximity

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.