All Projects → ondras → Rot.js

ondras / Rot.js

Licence: bsd-3-clause
ROguelike Toolkit in JavaScript. Cool dungeon-related stuff, interactive manual, documentation, tests!

Programming Languages

javascript
180406 projects - #8 most used programming language
typescript
31591 projects
coffeescript
4633 projects
HTML
72872 projects

Projects that are alternatives of or similar to Rot.js

Rando Php
RandoPhp is a open source library that implements random generators (Integer, Char, Byte, Sequences, Boolean) and take random sample from arrays
Stars: ✭ 107 (-94.66%)
Mutual labels:  hacktoberfest, library
Hubspot3
python3.5+ hubspot client based on hapipy, but modified to use the newer endpoints and non-legacy python
Stars: ✭ 121 (-93.96%)
Mutual labels:  hacktoberfest, library
Chocobar
The usual Snackbar with more 🍫 and colours 🎉
Stars: ✭ 110 (-94.51%)
Mutual labels:  hacktoberfest, library
Protobuf Nim
Protobuf implementation in pure Nim that leverages the power of the macro system to not depend on any external tools
Stars: ✭ 90 (-95.5%)
Mutual labels:  hacktoberfest, library
Dumpling
Dumpling is a fast, easy-to-use tool written by Go for dumping data from the database(MySQL, TiDB...) to local/cloud(S3, GCP...) in multifarious formats(SQL, CSV...).
Stars: ✭ 134 (-93.31%)
Mutual labels:  hacktoberfest, library
Chemfiles
Library for reading and writing chemistry files
Stars: ✭ 95 (-95.25%)
Mutual labels:  hacktoberfest, library
Angular Open Source Starter
This is a starter project for creating open-source libraries for Angular. It is a full fledged Angular workspace with demo application and easy library addition. It is designed to be used for open-sourcing libraries on Github and has everything you'd need ready for CI, code coverage, SSR testing, StackBlitz demo deployment and more.
Stars: ✭ 120 (-94.01%)
Mutual labels:  hacktoberfest, library
Whisper
Whisper is a file-based time-series database format for Graphite.
Stars: ✭ 1,121 (-44.01%)
Mutual labels:  hacktoberfest, library
Progressbar
A really basic thread-safe progress bar for Golang applications
Stars: ✭ 2,212 (+10.49%)
Mutual labels:  hacktoberfest, library
Fosite
Extensible security first OAuth 2.0 and OpenID Connect SDK for Go.
Stars: ✭ 1,738 (-13.19%)
Mutual labels:  hacktoberfest, library
Nimpylib
Some python standard library functions ported to Nim
Stars: ✭ 88 (-95.6%)
Mutual labels:  hacktoberfest, library
Hledger
A reliable, user-friendly Plain Text Accounting tool with command line, terminal and web interfaces.
Stars: ✭ 1,887 (-5.74%)
Mutual labels:  hacktoberfest, library
Libgui
Buttons & Co
Stars: ✭ 78 (-96.1%)
Mutual labels:  hacktoberfest, library
Geotic
Entity Component System library for javascript
Stars: ✭ 97 (-95.15%)
Mutual labels:  roguelike, library
Loadingshimmer
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.
Stars: ✭ 1,180 (-41.06%)
Mutual labels:  hacktoberfest, library
Kittehircclientlib
An IRC client library in Java
Stars: ✭ 116 (-94.21%)
Mutual labels:  hacktoberfest, library
Lingua Franca
Mycroft's multilingual text parsing and formatting library
Stars: ✭ 51 (-97.45%)
Mutual labels:  hacktoberfest, library
Sanity Typed Queries
A typed, zero-dependency schema generator and query builder for Sanity.
Stars: ✭ 54 (-97.3%)
Mutual labels:  hacktoberfest, library
Colore
A powerful C# library for Razer Chroma's SDK
Stars: ✭ 121 (-93.96%)
Mutual labels:  hacktoberfest, library
Borealis
Hardware accelerated, controller and TV oriented UI library for PC and Nintendo Switch (libnx).
Stars: ✭ 135 (-93.26%)
Mutual labels:  hacktoberfest, library

rot.js

ROguelike Toolkit in JavaScript. For more info, see https://ondras.github.io/rot.js.

Library

There are multiple ways of including rot.js in your project.

Downloading

You can get rot.js using either of these methods:

Usage

Rot.js is written in TypeScript, but its code is available in multiple formats. You can pick the one that best suits your development needs.

  1. The lib/ directory contains the code in ES2015 modules. These can be used in modern browsers directly, without any transpilation/bundling step. An example shows how to do that.

  2. For practical reasons, individual modules should be bundled to make your application more compact. You are free to use any bundler that understands ES2015 modules. If you want tu support older browsers, you should also transpile your code -- there is an example using babel and rollup that shows how to do that. This is the recommended way of using rot.js.

  3. If you do not fancy modern modules and/or transpilation, you can grab a pre-built bundle and include it in your page using traditional <script> tag. This bundle puts rot.js into a global ROT namespace and uses ES5 (supported even by older browsers). See an example of this approach.

  4. Finally, the pre-built budle also comes with a minified version that works the same, but its size has been reduced. The usage is the same as in the previous example.

Node.js

Most parts of rot.js are usable from within node.js (server-side JavaScript). The Display class needs to use the "term" layout backend:

let display = new ROT.Display({width:40, height:9, layout:"term"});
display.draw(5,  4, "@");
display.draw(15, 4, "%", "#0f0");          // foreground color
display.draw(25, 4, "#", "#f00", "#009");  // and background color

Usage

The pre-bundled rot.js package can be loaded as a CommonJS module. There is an example that shows basic usage.

Misc

RogueBasin page (with links to some rot.js-based games): http://www.roguebasin.roguelikedevelopment.org/index.php?title=Rot.js

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected]