-
Notifications
You must be signed in to change notification settings - Fork 14
JavaScript Framework
This page contains an overview of the Pine JavaScript framework.
Since Pine will have a JavaScript-based client and server, it needs a framework that addresses its unique needs. The framework that powers the local server and the client will share the same source, but there can be custom binaries for each if we need them. The code for this framework lives here. The functionality this framework needs to provide:
- Input
- Graphics
- Memory management
- Client-server socket communication
- Server asset management
- Client asset management
Since games are safely sandboxed in iframes, all input is proxied via the Pine app.
Raspberry Pi has a slow CPU but a decent GPU, so the framework needs to take advantage of Chromium's hardware acceleration capabilities. This includes CSS 3 animations and WebGL.
Research needs to be done on how to provide an efficient, reusable memory management API.
A wrapper or fork of Socket.IO might be all that's necessary here.
We need to develop a standardized convention for organizing assets that will work with this. This can be very lightweight.
Spriting may not be necessary since everything is local, but there should be an API for easily loading images. Also, we need audio playback APIs. A script loader probably won't be necessary. Most of what this API needs to do has already been done, so we should work to wrap existing libraries in a convenient way.