No description
Find a file
2013-08-26 22:09:02 -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
dist move browserify step to Grunt instead of Make (for consistency). Build files now in dist/ as dist/habitrpg-shared.js & dist/spritesheets.css 2013-08-26 22:09:02 -04:00
img start reorganizing everything so we can make use of shared 2013-08-26 20:42:22 -04:00
script move browserify step to Grunt instead of Make (for consistency). Build files now in dist/ as dist/habitrpg-shared.js & dist/spritesheets.css 2013-08-26 22:09:02 -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 browserify step to Grunt instead of Make (for consistency). Build files now in dist/ as dist/habitrpg-shared.js & dist/spritesheets.css 2013-08-26 22:09:02 -04:00
package.json move browserify step to Grunt instead of Make (for consistency). Build files now in dist/ as dist/habitrpg-shared.js & dist/spritesheets.css 2013-08-26 22:09:02 -04:00
README.md move browserify step to Grunt instead of Make (for consistency). Build files now in dist/ as dist/habitrpg-shared.js & dist/spritesheets.css 2013-08-26 22:09:02 -04: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 characteristics. 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

  • grunt - after you're done and you want to create the dist files

  • 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 ./dist/habitrpg-shared.js it will export window.habitrpgShared object.
    • // Use `browser.debug.js' if you want to have sourcemaps. - EDIT: Only one file now, and it has sourcemaps. Fix this
  • 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. Spritesheets definitely go in habitrpg-shared (since mobile uses them too). Other things, like customizer buttons, may want to go here? As you find sharable components, (1) move them from the website into habitrpg-shared, (2) remove from website & make sure all html/css references are updated.