today in game jamming

...i wrote an algorithm for centering a number inside a given length using whitespace padding (see the "LIFETIME" column in the second screenshot) in a language...

that has no "for", "while", or the ability to retrieve the length of a string

handwrote an example of the (recursive) algoritjm then reverse engineered it from that

obviously it cant do perfect centering for odd-length strings in even length spaces and vice versa, but it does closest approximation, in a (narrative scripting) language (ink) where, let me repeat, there are no for loops, while loops, or the ability to retrieve the length of a string

photoem2022-10-02/em12-07-26.jpg

Screenshot 2022-10-02 12.01.28.png

Screenshot 2022-10-02 12.02.04.png