How to make a infinite 2d floor?

I have a character that i want to be able to move left or right infinitely, i found that looney lizard in this post made the type of thing i am looking with three floors that follow you as you move around but i have no clue what is going on in their code, can someone help me understand it or how i would do to make something similar? Is this even a good way to make infinite floors/ what alternatives are there?

Why would you ever need a truly infinite floor? Just set it to some incredibly high number.