Builder:Web APIs we use
From Tootsville Wiki-Wiki
We'll be wrapping the following interfaces in the various client-side Common Lisp modules. Package names in ALL-CAPS are the CL packages wrapping the underlying libraries (if any).
The division between Parrot modules and Gossip Mouse modules is a bit artificial, but in general, device-local actions are Parrot, network tasks are Gossip Mouse. That also indicates which type of avatar is used for configuration and errors.
Contents
Parrot Modules[edit]
Computation[edit]
- COMMON-LISP
- JSCL is our Common Lisp compiler. It uses packages COMMON-LISP (alias: CL, JSCL) and will soon also export symbols into JSCL/FFI (which will affect, eg, JSCL::OGET scoping)
- CLOSE
- a simple OO-like package that isn't CLOS but provides some simple OO-like integration macros.
Debugging & Quality Assurance[edit]
- WEBREPL
- The REPL is partially packaged via JSCL, but we want to run it in its own frame in a shared context.
- WEBDEBUG, WEBINSPECT
- There may also be a debugger hook for the parrot interface (farther future).
- Analytics via PARROT
- We use Google Analytics to track events of various kinds. Some of these come from the “raw” Javascript code; others are invoked by PARROT events. We may change this to instead or also use Facebook analytics for Facebook users, etc.
3D Graphics, Physics, & Display[edit]
- BABYLON
- WebGL and friends, mostly c/o BabylonJS … Loading models, applying textures — integration with mesh networking
- DEVICE.AMBIENT-LIGHT
- Ambient Light Sensitivity
- UX.OVERLAY
- for displaying heads-up display and on-screen controls
- UX.PARROT
- …
- UX.GOSSIPMOUSE
- …
Notifications[edit]
- PARROT
- PARROT package has PEEP and SQUAWK events for minor or major notifications. Desktop notifications work via Notifications API, at least on Linux and Android.
First Run, Accounts[edit]
- PARROT.NEW-PLAYER
- …
- PARROT.BUDDY-LIST
- …
- PARROT.CHILD-ACCOUNT
- …
Sound & Music[edit]
- UX.BABYLON
- also handles some audio, we may reach “under the hood” to touch Web Audio API — but we'll try to use Babylon's interface mostly, right?
- UX.EVENTS
- Binding to the general events model for Gossipnet, et al.
- UX.MAKE-NOISE
- Discuss Toot Voices package MAKE-NOISE
- UX.SPEAK
- Not any time soon. Might just wrap browser built-ins? still very flaky. May need a polyfill.
Camera, Microphone[edit]
- CHATTER
- TODO: Discuss streaming audio, video chats, via virtual mobile in-game
- PLAYER-INPUT.LIPREAD
- Facial recognition, character facial puppetting; example here and tools and library
- PLAYER-INPUT.LISTEN
- Voice recognition via PocketSphinx.JS but we'll have to work on training it for a reasonable conversational vocabulary, or else try browser built-ins, maybe allow choice between both/either (polyfill style)
Gamepad, Touch, Keyboard[edit]
- PLAYER-INPUT.EVENTS
- Generalized interface for controlling your character
- PLAYER-INPUT.KEYBOARD
- TODO: Discuss keyboard events
- PLAYER-INPUT.TOUCH
- TODO: Discuss touch events
- PLAYER-INPUT.GAMEPAD
- TODO: Discuss gamepad events
- PLAYER-INPUT.TABLETPAD
- Using a tablet or phone as a controller for another device, eg, PC
- PLAYER-INPUT.BLUETOOTH
- Might need some magic to access Bluetooth gamepads like Wiimotes
Physical Device Properties[edit]
- DEVICE.VIBRATION
- Vibration API
- DEVICE.ORIENTATION
- Screen Orientation, also Screen Orientation
- Distinctly of that, Device Orientation and some explanation of orientation and motion data and a gyronorm polyfill
- Proximity is not super useful but might tell us when the player has forgotten and walked away.
- As a courtesy, we can watch Battery status and give a warning when the player's battery is getting low
Gossip Mouse Modules[edit]
HTTP[edit]
- XHR
- Provides simple access to XMLHttpRequest objects
Gossipnet[edit]
- GOSSIPNET.NET
- Core connectivity
- GOSSIPNET.EVENTS
- Interaction with player input, Babylon, etc.
- GOSSIPNET.INTEGRITY
- TODO: discuss netsplit detection, blockchains, signatures
- GOSSIPNET.GENESIS
- TODO: discuss directory service, STUN/TURN servers
Asset Distribution[edit]
- ASSETS.SERVICE
- The asset distribution system should be using Service Workers (much like Background Sync to handle asset access transparently; see Using Service Workers
- ASSETS.TORRENT
- WebTorrents
- ASSETS.ARCHIVES
- Archived assets, sprite sheets, globbed sounds, etc.: TODO, discuss
Simulation world[edit]
- WORLD.EVENT
- Core event bridge
Network Sensitivity[edit]
- DEVICE.NETWORK
- This game can burn through a lot of data (as with any on-line MMO, I suppose). We can use Network Information API on Firefox Mobile to warn users who are likely to be on metered mobile connections.