rot-js
Version:
A roguelike toolkit in JavaScript
12 lines (8 loc) • 876 B
HTML
<h2>Performance tips</h2>
<ul class="performance">
<li><strong>The JS file is too large?</strong> Feed it to your favorite JS minification tool, such as <a href="https://developers.google.com/closure/compiler/">Google Closure Compiler</a>. Or just pick the <a href="https://raw.github.com/ondras/rot.js/master/rot.min.js">already-minified version of <strong>rot.js</strong></a>.</li>
<li><strong>Slow display output?</strong> If you use a rectangular layout, you can enable glyph caching by setting <code>ROT.Display.Rect.cache = true</code>. This enables rendering into tiny cacheable canvases, but will improve performance only if you do not use too many glyph/color/bgcolor combinations. Your mileage may vary.</li>
<li>
<strong>Too much time spent in lighting computations?</strong> Decrease the maximum light range or switch to 1-pass lighting.</li>
</li>
</ul>