parallax is a camera utility library for LÖVE that adds parallax scrolling when used with a camera library.
parallax is not a camera system! It lets you add parallax layers to your camera (e.g., gamera).
https://github.com/idbrii/love-parallax
Web demo
Image shows three parallax layers and the magenta "normal" layer. The background image is drawn with draw_tiled_single_axis. When running the demo, press `p` to enter this platformer mode.
I initially did a camera comparison with brady, stalker-x, and gamera liked the features of gamera. I built parallax because I wanted parallax scrolling without using giving up gamera. It doesn't reference the camera, so you should be able to use it with any camera library.
I recently added layer:draw_tiled_xy() and layer:draw_tiled_single_axis() to draw a parallax background image tiled with a minimal number of draws. So if your camera shows 100 units of world and the image is 100 units wide, it will only draw the image only twice (when the seam is showing). You can press 'p' in the demo to switch between demonstrating these two draw methods.
parallax powers the two background layers in my jam game Commit The Bad Stuff.
parallax: add parallax scrolling to your camera
parallax: add parallax scrolling to your camera
Last edited by idbrii on Mon Feb 14, 2022 5:30 pm, edited 1 time in total.
Who is online
Users browsing this forum: Ahrefs [Bot] and 226 guests