DEV Community

Dustin Runnells
Dustin Runnells

Posted on • Edited on

Parallax Backgrounds

Not a huge update this week, but I did get parallax backgrounds working and fixed some navigation weirdness:

Image description

I did run into a problem that I'm concerned will come back to bite me a lot in the remainder of this project - The parallax background was very smooth when I tested with some preloaded images for the layers. But once I import the layers from my levels zip file, things start to get a little jerky. Looking deeper, I have issues with all of my imported images that would be solved with preloads at compile time, including sprites with sharp edges because fix_alpha_edges() doesn't happen outside of preloads(?). BUT I can't preload if these images are coming from images loaded from a zip file at runtime.

Before jumping into a bunch of level creation, I want to add a couple more abilities and sprite animations along with squashing a few bugs:

  • Stairs are not working very good with just physics guiding the students. Maybe I can set a path for the sprites to follow and disable any kind of ability selection while on the stairs.
  • Sprite edges are too rough for imported images.
  • Parallax background layers are jerky.
  • Normalmaps appear to be inverted (raised areas are embossed).
  • Doors need animation and texture

Image of Wix Studio

2025: Your year to build apps that sell

Dive into hands-on resources and actionable strategies designed to help you build and sell apps on the Wix App Market.

Get started

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay