No description
Find a file
Tyler Renelle 614f734e67 move a bunch of the spritesheets from the website into css/, add a Grunt
step to compile all the spritesheets into a top-level spritesheets.css,
add an archive/ directory for all the old stuff i'm not sure we need?
2013-08-26 21:24:48 -04:00
browser move a bunch of the spritesheets from the website into css/, add a Grunt 2013-08-26 21:24:48 -04:00
css move a bunch of the spritesheets from the website into css/, add a Grunt 2013-08-26 21:24:48 -04:00
img start reorganizing everything so we can make use of shared 2013-08-26 20:42:22 -04:00
script start reorganizing everything so we can make use of shared 2013-08-26 20:42:22 -04:00
tests cron: add timezone calculation into the midst. Note: this requires user.preferences.timezoneOffset exist on the user, otherwise it will default to the script-runner timezone (which works fine if user or browser) 2013-08-20 21:40:39 -04:00
.gitignore ignore .js & .map from (webstorm transpilers), remove habitrpg-shared 2013-08-20 21:27:56 -04:00
favicon.ico add a bunch of possible shared items for now, will clean up later 2013-03-11 14:50:00 -04:00
Gruntfile.js move a bunch of the spritesheets from the website into css/, add a Grunt 2013-08-26 21:24:48 -04:00
index.js fixed the empty helpers issue. it was circular dependencies - algos 2013-06-18 21:40:43 -04:00
Makefile Coffee sourceMaps! 2013-05-24 15:03:20 +08:00
package.json move a bunch of the spritesheets from the website into css/, add a Grunt 2013-08-26 21:24:48 -04:00
README.md Coffee sourceMaps! 2013-05-24 15:03:20 +08:00
spritesheets.css move a bunch of the spritesheets from the website into css/, add a Grunt 2013-08-26 21:24:48 -04:00

Shared resources useful for the multiple HabitRPG repositories, that way all the repositories remain in-sync with common charactaristics. Includes things like:

  • Assets - sprites, images, etc
  • CSS - especially, esp. sprite-sheet mapping
  • Algorithms - level up algorithm, scoring functions, etc
  • Item definitions - weapons, armor, pets

##Installation npm install make

  • Node.js

    • require ('coffee-script')
    • var shared = require('./index.js') or require('./script/algos.coffee') if you only need one file.
  • Browser

    • Use <script/> tag to include ./browser/browser.js it will export window.habitrpgShared object.
    • Use `browser.debug.js' if you want to have sourcemaps.
  • Note how to invoke scoring function:

  • algos.score = function (user, task, direction) {}

##CSS Shared CSS between the website and the mobile app is a fuzzy area. For now we'll have the website define canonical CSS, and share that down the mobile app.

To do so,

  • go to the website repo
  • remove the first line @import nib/vendor from index.styl
  • stylus styles/app/index.styl
  • copy the output index.css into this shared/css directory
  • remove bootstrap @improrts, find/replace "img/" with "../img/"