A stylish update to
a classic game
Paddles is a game written in Lua, that was met with praise upon its release, and is currently featured on the front page of Renoise's Tools website.
Being a musician (drums, synths), one of my favorite programs is Renoise. After learning to program, I remembered that Renoise offers a Lua API to create extensions of the program! I decided to make a game within Renoise. Wanting something classic, I decided on Pong. The only other game made using the Renoise API is a port of Nibbles ("Nibbles" is a Snake clone included in FastTracker2).
Renoise port of "Nibbles"
I learned Lua using the official guide and documentation. I found my favorite feature of the language to be tables. Tables are so simple in contrast to C++'s structs, arrays, enums, vectors, hashmaps, etc. If you understand how they work under the hood, they can be very performant, too!
Engineering a Display
The Renoise API doesn't really offer a way to directly control pixels. Instead, it offers elements like sliders, knobs, text boxes, etc. However, I found that I could control a grid of tiny bitmaps (loaded from the filesystem) to create a "virtual screen"! Each frame, I had to manually update bitmaps, rather than blanking the whole screen and redrawing everything as graphics engines typically do, because Renoise isn't very fast at updating large amounts of bitmaps (it can update ~100 bitmaps at 25 frames/second).
Renoise ViewBuilder API controls & my bitmaps
After some development, the game had a rainbow that trailed behind the ball, an AI opponent, a 2-player mode, sound effects, and more! Within 24 hours of its release, it was featured on the front page of the Renoise website's "Tools" section (where it still remains today), and even received recognition from Renoise's lead programmer and CEO; Eduard Müller (aka "taktik").
Early release of Paddles
Upgrading the Display
After the game's release, I discovered that Renoise provided another GUI element capable of creating a "virtual screen". Buttons can be scaled, and colored via a HEX color-code. This change offered a full 8-bit color display—capable of displaying 16,777,216 colors! To top it off, Renoise updates them 9x faster than bitmaps! I also implemented a double frame buffer system that only pushed updates to buttons that needed it. This allowed for more complex graphics, as I could now blank the screen each frame!
Utilizing the New Display
I had been studying some water simulation algorithms for use in my 3D graphics projects, and decided to implement a water simulation in my Pong game for some nice visuals! The update was released and received more positive feedback from the Renoise community!
Latest release of Paddles
If I were to continue working on this project, I would enhance the sound effects, and add a Breakout-style game mode. I would also like to write a 3D renderer for Renoise's Lua API someday, and create a small 3D game using it, though other projects are currently higher priorites.
I sometimes worry that Renoise will cease development. Its keyboard–only tracker-style approach was common from the 1980's to the early 2000's, but most users today prefer a piano–roll interface. I hope that my Renoise tools will attract more like-minded users to the program, and keep its development alive for years to come.
The same MIDI sequence in a piano roll and a tracker