Collapsing Waves: Parallax Edition

Stuff has been pretty busy lately, not just with life, but also with building the temple area we always wanted! Trying to look into new opportunities to make our game look better, we settled on the perspective and were pretty happy with it quickly. This is how it looked after a few revisions:

Using fog seemed like a good idea for the background and it was easy to achieve using our existing noise generation code. However we wanted something more dynamic, and a parallax scrolling background was the thing we always talked about but never actually tried, due to doubts if we could make it looking good enough. Turns out it was actually pretty simple! Using the Wave Function Collapse algorithm (WFC, in specific this library) we were able to draw a small texture and get a dynamically assembled randomized looping background ready to use in-game!

On the left, we can see the algorithm’s input and on the right side, we have the output! Pretty nifty, right? Now, it’s all about putting it in the game’s background, we want it behind the fog so we get a feeling of perspective, at least in theory. But we also want to make it move, smoothly of course! Below is our first result we were happy with:

It seemed pretty good and we were especially happy with the fact that we were able to make the background jump a tile downwards with the beat, hiding the fact we actually can’t make it scroll smoothly pixel by pixel! Little did I know that I would find out days later that it gains a much better feeling of depth by making the yellow background light effects not affect the moving tiles in the background, making it look like it is being lit from beneath!

That’s it for today, feel free to tell us if you want to hear about more technical detail. There will probably be more stuff to be read about our tech soon, suggestions welcome! Be sure to leave a comment if you want us to know this site is being read by people other than the spam posting bots as well! >:)

Leave a Reply

Your email address will not be published. Required fields are marked *