The Upside

Published 2023-06-12


What makes programming interesting is the many different ways in which you can approach a problem.

In this case, I wanted to be able to take a normal sentence and display it upside-down. Not mirrored, not inverted, but totally reversed.

There are 2 methods shown here on how to accomplish this each with their advantages and disadvantages.

I think the 1st method is a variation of some code I saw a year or so ago, so I can't claim credit to it - but I do understand how it works.

The 2nd method is brute force. Likely this method would work in any programming language, but likely also specifically for PICO-8 there is a better way to do it.

The red triangle shows that the sprite area is not corrupt (upon exit) as the first method uses this space for temporary storage of the image to be flipped upside - and the NIL is (hopefully) erasing the array that was temporarily used.

How about you ? Do you know of an easier way to code this effect ?