• Stars
    star
    154
  • Rank 234,177 (Top 5 %)
  • Language
    JavaScript
  • Created over 12 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A JavaScript character-based tile engine for creating games such as roguelikes.

UnicodeTiles.js

This JavaScript library provides a text character based tile engine for creating roguelike games etc. The bundled font (DejaVu Sans Mono) has decent coverage (3289 glyphs) of Unicode, providing monospace characters for various miscellaneous symbols that can be useful in creating fancy looking character based games and user interfaces. This page itself uses the font.

You might also be interested to know that a third-party Ruby port of this library exists.

Current features

  • Viewport - character grid display
    • Three rendering engines: WebGL, 2d canvas and slow DOM
    • Automatically picks the best renderer supported by user's browser
    • Rendering engine can be switched on-the-fly
    • Colored characters
    • Colored character backgrounds
    • Arbitrary character viewport size
    • Character size customizable through CSS
    • Can make the layout square
    • Utilizes CSS3 Web Fonts (@font-face) to provide consistent look across platforms.
  • Engine - the tile engine
    • Viewport updating according to player coordinates
    • Tile reading through a callback
    • Optional caching for cases where the tile callback is heavy
    • Masking callback (for FOV etc.)
    • Shader callback (for animating tiles)
  • Input - keyboard handling
    • Simple addon that makes keyboard managing easier
  • Meta - general stuff
    • Comprehensive API documentation
      • Generated with Natural Docs from source code comments
    • Broad browser support
      • Best on latest Chrome and Firefox
      • IE9+ and Opera 11.61+ supported, but less frequently tested
      • IE8 and below are not targeted
    • Static analysis frequently performed
    • Several examples / tutorials
      • See examples/ subfolder
    • Minification toolchain through Google Closure Compiler
    • Boilerplate native app for removing browser dependency
      • Based on QtWebkit (so requires Qt)
      • Just compile the tiny app and drop it next to your games files - no browser needed anymore

Documentation

See docs/html-subdirectory: local link | online

Examples

See examples-subdirectory: local link | online

Tests

There are some, mostly performance related tests/benchmarks that you can run in the tests-subdirectory: local link | online

Version history

  • v2.1
    • Improved chracter texture generation for WebGLRenderer
    • Small Viewport and Tile improvements
    • New example: 08-raycaster
  • v2.0
    • WebGLRenderer
    • Renderers in their own files
    • More test cases
  • v1.1
    • Transition effects
    • Native app based on QtWebkit
  • v1.0
    • Initial release

License

Deja Vu fonts © Bitstream. See the license at http://dejavu-fonts.org/wiki/License for more information.

The actual code and all other things are licensed under the MIT license, which is as follows:

Copyright (c) 2012 Tapio Vierros

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

live-server

A simple development http server with live reload capability.
JavaScript
4,235
star
2

rlutil

C and C++ utilities for cross-platform console roguelike game creation.
C++
224
star
3

infiniverse

A game of procedurally generated universe with character graphics
JavaScript
61
star
4

nautilus-git-scripts

Nautilus scripts for interacting with a Git repository.
Shell
60
star
5

obj-magic

A tool to manipulate Wavefront OBJ 3d meshes.
C++
44
star
6

weep

My personal pet game engine in C++.
C++
29
star
7

darkcorners

First-person 3D browser game prototype.
JavaScript
14
star
8

1kbrl

Tiny roguelike
C++
12
star
9

motiontracker

Real-time 3d webcam motion tracker.
C++
12
star
10

cotc

My entry to the 2010 Seven Day Roguelike Challenge
C++
9
star
11

jetpursuit

Top-down action game with supersonic jet fighters, missiles and explosions!
JavaScript
9
star
12

alawid

A 7 Day Roguelike made for the 2011 challenge with WebGL.
JavaScript
8
star
13

7drl-2016

Fantastic Dungeons - 7DRL 2016
JavaScript
8
star
14

7drl-2015

Sci-fi themed 7 day roguelike for the 2015 challenge.
JavaScript
5
star
15

miscfb

Miscellaneous utility functions, types and macros for FreeBASIC.
Visual Basic
4
star
16

tbcis

Tiny Bash Continuous Integration System
Shell
4
star
17

tomato

Remake of an old DOS game Tomaattisota.
C++
3
star
18

golem-quest

My attempt for 7 Day Roguelike Challenge 2014
JavaScript
3
star
19

koff

Knight of Faith is a procedural role-playing game with early Ultima style graphics.
Batchfile
3
star
20

cbgl

OpenGL wrapper library for CoolBasic
Visual Basic
2
star
21

asciiarena

Multiplayer arena deathmatch with ascii graphics
Visual Basic
2
star
22

gentex

A tool for generating textures from text files.
C++
2
star
23

tapio.github.com

My home page
HTML
2
star
24

reaching-for-stars

Reaching for Stars! is a space empire game (a bit like Master of Orion), where you take control of a race and try to survive in a star cluster with other species.
2
star
25

7drl-2019

Mobile-friendly roguelite inspired by Overcooked.
JavaScript
2
star
26

vcs

Simple script to abstract common version control tasks.
1
star
27

lawman

Failed attempt at 7DRL 2013
JavaScript
1
star
28

gengeo

WIP library and possibly a cli tool for generating 3d meshes.
C++
1
star
29

grid-space

Grid Space is a fast-paced mouse-controlled space-themed 2d shooting game for Windows.
1
star