PointerPro Animate is a C systems project for building and serving simple bitmap animations. It combines a low-level animation engine with a multi-client service layer that exposes the engine through a small text-based RPC protocol.
This is the real output of a scripted client/server session: a canvas is created, three sprites are placed on it, two are given velocity/acceleration via set_animation_params, and generate renders the frames through ffmpeg. Reproduce it with:
./examples/demo.sh(requires ffmpeg on PATH; the script builds the project, drives animate_server/animate_client over the real FIFO/signal RPC protocol, and converts the rendered clip to docs/demo.gif)
The first demo only covers create/place/animate/render. This one shows resource lifecycle: a red square and a blue square are placed overlapping (blue on top, since it was placed second); placement_top then reorders the red square above blue; finally destroy_placement removes the circle mid-session, and it's gone for good. Each phase is rendered as its own generate call and the three clips are concatenated with ffmpeg. Reproduce it with:
./examples/demo_lifecycle.shcore/implements the animation library: canvases, sprites, placements, layer ordering, simple shapes, bitmap-backed sprites, and frame generation.service/implements the runtime service: a signal/FIFO based client handshake, request parsing, handle management, user authorization, a fixed-size worker pool, RPC execution, canvas sharing, barriers, and movie generation throughffmpeg.
The service is integrated with the local core implementation and builds directly from core/animate.c; it does not require a precompiled animation library.
Build everything from the repository root:
makeBuild only the animation engine:
make -C core animate.oBuild only the client/server service:
make -C serviceRun the core animation test suite:
core/tests/run_all_tests.shor from the repository root:
make testCI also builds and runs the core suite under AddressSanitizer + UBSan (see .github/workflows/ci.yml); it's clean.
Start the server with a fixed worker-pool size:
cd service
./animate_server 4The server prints its process ID. Start a client with that PID:
./animate_client <server-pid>Users are loaded from service/users.txt. After logging in, clients can issue animation RPC commands such as creating canvases, creating sprites, placing sprites, sharing canvases, synchronizing with barriers, and generating output frame/movie files.
- IPC handshake: each client sends
SIGUSR1to the server's PID; the server responds withSIGUSR2and a pair of named FIFOs (FIFO_C2S_<pid>,FIFO_S2C_<pid>) dedicated to that client. - Fixed-size worker pool: the main thread only
poll()s client FIFOs and enqueues requests; a configurable number of worker threads (animate_server <n>) pull from a shared queue guarded by a mutex/condition variable, so RPC handling is decoupled from connection I/O. - Concurrent resource handles: canvases, sprites, and placements live in fixed-size handle tables (
service/handle_registry.c) guarded by a globalpthread_rwlock_tplus a per-canvas mutex, so multiple clients can read/share a canvas while writes stay serialized. - Canvas sharing + barriers:
share_canvasgrants other users access to a canvas, and a per-canvas barrier (barrier, condition variables inserver_requests.c) lets multiple clients synchronize edits to a shared canvas before it's rendered. - Rendering pipeline:
generatewrites rawcolor_tframes to a.datfile, then forks/execsffmpegto encode it to.mp4— the same pipeline the demo above was produced with.
Generated binaries, debug symbol folders, FIFO files, and rendered movie outputs are intentionally excluded from version control.

