Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sebadorn/js13k-2024-triskaidekaphobia

Entry for the js13kGames competition of 2024. Theme: Triskaidekaphobia (fear of 13).
https://github.com/sebadorn/js13k-2024-triskaidekaphobia

game javascript js13k js13kgames js13kgames2024

Last synced: about 1 month ago
JSON representation

Entry for the js13kGames competition of 2024. Theme: Triskaidekaphobia (fear of 13).

Awesome Lists containing this project

README

        

# js13k 2024: Cursed Elevator

![Screenshot from the game.](cover_800x500.png?raw=true)

Entry for the [js13k competition of 2024](https://2024.js13kgames.com/).
Theme: **Triskaidekaphobia** *(fear of the number 13)*

## Description

An interactive story about getting on a cursed elevator.
But it seems you are not the first this happened to.
Get to floor 13 … as often as you have to.

## Controls

* `[W][A][S][D]` / Arrow keys to look around
* `[R]` to reset the camera
* `[P]` to toggle Pointer Lock
* `[E][Enter]` / Mouse click to interact
* `[Escape][1]` to pause/unpause

## Why aren't you using the PointerLock API by default?

When the pointer is locked, the normal mouse event attributes like `clientX` or `screenY` etc. stop working. Instead `movementX` and `movementY` have to be used. But I found those to not be precise enough. Small mouse movements still fired the event, but both values were 0. This resulted in a juddery camera on slow movements and made being precise very hard. With Firefox it was worse than with Chromium.

## Resources

* [ptex – Mini randomized pixel-art textures](https://xem.github.io/pxtex/)
* [W – A micro WebGL2 framework](https://xem.github.io/W/) (with a lot of modifications)
* [ZzFX – Zuper Zmall Zound Zynth](https://github.com/KilledByAPixel/ZzFX)