1
0
Fork 0
mirror of https://gitlab.com/Oreolek/black_phone.git synced 2024-05-05 10:38:45 +03:00
Go to file
2016-01-20 23:48:30 +07:00
audio Now with MUSIC! 2016-01-04 13:55:04 +07:00
game Salet conversion WIP 2016-01-20 23:48:30 +07:00
html Salet conversion WIP 2016-01-20 23:48:30 +07:00
img Cover image + bugfixing 2016-01-01 21:05:30 +07:00
lib Salet conversion WIP 2016-01-20 23:48:30 +07:00
sass Salet conversion WIP 2016-01-20 23:48:30 +07:00
.gitignore Initial commit 2015-12-29 13:56:27 +07:00
.gitmodules Initial commit 2015-12-29 13:56:27 +07:00
cover.svg Cover image + bugfixing 2016-01-01 21:05:30 +07:00
Gulpfile.coffee Salet conversion WIP 2016-01-20 23:48:30 +07:00
LICENSE.txt Salet conversion WIP 2016-01-20 23:48:30 +07:00
package.json Salet conversion WIP 2016-01-20 23:48:30 +07:00
README.md Wardrobe descriptions 2016-01-03 00:36:16 +07:00

The Black Phone

A walk through someone else's apartment

Provided under the terms of MIT license, see LICENSE.txt

Hacks and whistles

"Black phone" boasts a new technical feature: additional room exits.

This is something I greatly missed coming from INSTEAD. I had to hack Undum and expose ("export") its processClick function so I could make an additional interface block.

The technical side is simple: my Undum-commonjs fork exports processClick function. Every situation that is a room (there are non-room situations, mind) has an array of ways. This array has every other room this one connects to. On entering a room, the before function calls for update_ways function that reads ways array and updates the UI. It's not automatic but the game is small enough for this to work.

Undum has a bug: every "once" link becomes clickable again when you visit the same situation. For example, you can save the game, load it again and click everything the second time.

The game exploits this because you can visit any room again and examine everything you missed.

There is also a slightly debatable UI hack: as every link is "once" link (it gets deactivated once it's called), I've sped up every click by 250ms or so like this:

document.onmousedown = (e) ->
  e.target.click()

A "click" in Javascript is an event of clicking the mouse button and releasing it. The "mousedown" event is just clicking the button, not waiting for the release. I didn't bother with intricacies, so the right mouse click is treated the same as the left one.