Giter Site home page Giter Site logo

habitrpg-shared's Introduction

Build Status

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
  • View helper functions that may come in handy for multiple client MVCs
  • Item definitions - weapons, armor, pets

##Installation

  • npm install

  • grunt - after you've made modifications and want to compile the dist files for browser

  • Node.js

    • require ('coffee-script')
    • require('./script/algos.coffee'), require('./script/helpers.coffee'), etc.
  • 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(user, task, direction), etc
    • TODO document all the functions

##Tests

  • npm test

##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.

Currently, all or most spritesheets are available. They're in css/*.css, but that's not what you want. You want /spritesheets.css which is the concat'd file (using grunt) which includes all the spritesheets. I'd prefer this be in /dist/spritesheets.css for consistency, but it's having image referencing weirdness

habitrpg-shared's People

Contributors

lefnire avatar sabrecat avatar djuretic avatar paglias avatar yangit avatar shaners avatar snicker avatar crystalphoenix avatar therufs avatar alys avatar colegleason avatar danielthebard avatar blackedder avatar marcelosizer avatar xatres avatar adrienlemaire avatar syntaxpickax avatar jasongross avatar

Watchers

Jemma Nelson avatar James Cloos 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.