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

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay