![]() This was my first substantial programming project. SNEK is an ASCII-rendered game for the Windows console, and uses the FMOD Studio framework for procedural sound effects, and beat-synced music playback. This resulted in a dramatic increase in performance (over 100x), and was architected in an easy-to-use, modular API. To improve performance, the data would be cached Lua–side after retrieving it from the Renoise runtime, and Renoise's Observer–style notifiers would be used to alert Reform when cached data was no longer valid. ![]() The handing-over of all that data from Renoise's C++ runtime to its Lua API is slow, and Reform demands huge amounts of that data rapidly, hundreds of times per second. ![]() To allow manipulated notes to overflow into other patterns, avoid colliding with other notes, and wrap from the end of the song to the beginning, it was necessary to know pattern lengths, song lengths, note positions, and more. Though it would take much too long to discuss every challenge and triumph of Reform's development here, we will discuss a few of the noteworthy ones. This would be quite a complex task to achieve in a tracker–based application. I found this recursive definition of a Bézier curve.Īfter implementing this-along with the associated functions for Binomial Coefficients and Bernstein Basis Polynomials-my curves supported an infinite number of control points!Ī strum–editing tool for Renoise that would include: a playful UI, intuitive controls, realtime updates to notes, easy preview playback, strumming across pattern boundaries, and more. The Development Infinite-Degree Bézier CurvesĪfter a lot of digging, I found Bézier Curves.Ĭompared to Linear, Quadratic, and Cubic Bézier curves, I wanted my curves to support an infinite number of control points. This project was the testing ground where I isolated this task. I ended up going down a rabbit hole of math and 2D rasterization that yielded the desired result. They worked, but implementing discrete mathematical functions for different curve shapes wasn't a very robust solution. My first solution was to use logarithmic functions. Write-Up The Purposeĭuring development on Reform, the need arose for the calculation and rasterization of various curves. Curves is a pixel-perfect, weighted, infinite-degree Bézier curve editor written in Lua, created as a testing ground for a feature being developed for Reform.
0 Comments
Leave a Reply. |