Skip to content

Learning the Basics

eboatwright edited this page Mar 4, 2022 · 14 revisions

🚧 Under construction! 🚧

Learning the Basics

Installation

If you haven't installed JSCII already, follow the instructions here.

Basic Game Loop

In your game's JavaScript file, override the init(), update(), and render() functions

init = function() {
}

update = function() {
}

render = function() {
}

These functions will automatically be called in the right order.

Basic Rendering

In your render() function put this code for rendering a char to the screen.

render = function() {
    FONT.renderChar(AT, 5, 5, WHITE, BLACK);
}

This will render an @ at the tile coordinates 5, 5 with a white color, on a black background.
(Check the constants.js file / section for all the characters)

🚧 Under construction! 🚧

Next: Documentation

Clone this wiki locally