Quick Start

Install the library

To install the game library you have two options, either with git or NPM:

# Install via NPM
npm install --save playlib

Make your first project with the library

To make your first project, we need to setup some files like a HTML file and a main Javascript file. This is mine boilerplate for HTML file.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Game</title>
</head>
<body>
    <script type="module" src="main.js"></script>
</body>
</html>

Remember to add

type="module"

in script tag, so that HTML supports importing of Javascript files, in this case Playlib files.

Follow to next page to see how to add some code to that main Javascript file, so you can start your game up!

Last updated