# libclicker

> JS library for clicker games

Latest version **0.4.0** (published 2026-08-17) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install libclicker
pnpm add libclicker
yarn add libclicker
bun add libclicker
```

## Health

**Score 60/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2026-08-17 |
| First published | 2022-12-15 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 1.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Juan Sierra |
| Maintainers | juansierra |
| Keywords | games, clicker, idle, incremental, generator |

## Links

- npm: https://www.npmjs.com/package/libclicker
- Repository: https://github.com/JuanSierra/libclicker-js
- Homepage: https://github.com/JuanSierra/libclicker-js#readme
- Issues: https://github.com/JuanSierra/libclicker-js/issues
- npm.io page: https://npm.io/package/libclicker

## Dependencies (3)

- [minimist](https://npm.io/package/minimist.md) ^1.2.8
- [set-value](https://npm.io/package/set-value.md) ^4.1.0
- [handlebars](https://npm.io/package/handlebars.md) ^4.7.7

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.4.0 (latest) — 2026-08-17
- 0.3.4 — 2026-08-16
- 0.3.2 — 2022-12-15
- 0.3.1 — 2022-12-15
- 0.3.0 — 2022-12-15

## README

# Libclicker
[![tests](https://github.com/JuanSierra/libclicker-js/actions/workflows/tests.yml/badge.svg)](https://github.com/JuanSierra/libclicker-js/actions/workflows/tests.yml)
[![npm](https://img.shields.io/npm/v/libclicker.svg)](https://www.npmjs.com/package/libclicker)
[![Apache-2.0 License](https://img.shields.io/badge/License-Apache-2.svg)](https://choosealicense.com/licenses/apache-2.0/)

_JS library for clicker games_

This javascript library helps to build clicker/idle/incremental games providing a set of building pieces usually found on these kind of games.  
If you dont know the genre and want to try one, please visit [this complete list](https://www.reddit.com/r/incremental_games/wiki/list_of_incremental_games).  
To support all the math and balance decisions in your development [this article](https://kongregatedev.ghost.io/the-math-of-idle-games-part-i/) is pretty useful 

## Install

### CDN

Link directly to Libclicker files on [unpkg](https://unpkg.com/).

``` html
<script src="https://unpkg.com/libclicker/dist/libclicker.js"></script>
<!-- or -->
<script src="https://unpkg.com/libclicker/dist/libclicker.min.js"></script>
```
## Usage

``` javascript
let world = new World();
world.update(1.0 / 60.0);

// Creates a new currency called "Gold"
let gold = new Currency.Builder(world)
    .name("Gold")
    .build();

let goldMine = new Creator.Builder(world)
    .generate(gold)   // Generate gold
    .baseAmount(10)   // Defaults to 10 gold per tick
    .multiplier(1.15) // Increase amount by 15 % per level
    .price(100)       // Price of level 1 gold mine
    .priceMultiplier(1.25) // Increase price by 25 % per level
    .build();

// Advance the world by 30 seconds to make the automator work
world.update(30.0);
``` 

### BigInt Support

For games with very large numbers (levels beyond ~120), enable optional BigInt support to avoid precision loss:

``` javascript
let gold = new Currency.Builder(world)
    .name("Gold")
    .useBigInt()
    .build();

let goldMine = new Generator.Builder(world)
    .generate(gold)
    .baseAmount(1000000000000000)
    .multiplier(2)
    .useBigInt()
    .build();
```

When enabled, all numeric values are stored as JavaScript `bigint`, preserving exact precision for values exceeding `Number.MAX_SAFE_INTEGER`. The feature is opt-in — without `.useBigInt()`, behavior is identical to previous versions.

## Roadmap
* Documentation [X]
* Example Game []   
* BigInt support [X]

## Credits
A javascript port based on the good [libclicker2](https://github.com/manabreak/libclicker2) by @manabreak

---
_Source: https://npm.io/package/libclicker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
