Rodent-obsessed developer creates Ratty to convey 3D graphics to the command line


Software program

Impressed by TempleOS, this terminal emulator is nearly as bonkers

If you consider a terminal emulator, you think about a command line interface full of ASCII textual content and a immediate. Nonetheless, one developer has reimagined the expertise to incorporate inline 3D objects and picture help.

Dubbed Ratty by its creator Orhun Parmaksiz for its 3D spinning rat cursor, the terminal window itself is a 3D canvas that helps sprites and 3D fashions, can render 3D drawings in actual time, and even consists of its personal graphics protocol.

“Terminal emulators are a giant a part of our day by day lives as builders however but we don’t make sufficient improvements in that area,” Parmaksiz advised The Register in an e-mail. “With Ratty I hope to encourage others to experiment with terminals and push the bounds of what they will do.”

Parmaksiz wrote in his weblog put up introducing Ratty that he completed the entire thing utilizing his personal Rust terminal interface library, Ratatui, together with the Bevy sport engine, additionally constructed with Rust. The aforementioned Ratty Graphics Protocol was created in an effort to register 3D property and place them in an anchored terminal cell area.

“Ratty separates terminal emulation from presentation: one aspect handles PTY I/O and terminal parsing, whereas the opposite turns the end result right into a GPU-rendered 2D or 3D scene,” Parmaksiz defined. “This enables for lots of flexibility in how the terminal output is displayed (e.g. you possibly can warp the entire rattling factor).”

Ratatui finally ends up serving because the terminal rendering layer, Parmaksiz defined, taking regardless of the terminal state is, rebuilding it in its personal buffer, and rendering mentioned buffer onto a texture that’s then rendered by way of Bevy. 

Given its design, be forewarned for those who attempt to install and run Ratty: It’s going to eat up quite a lot of reminiscence because it’s working a sport engine. 

“I do know, sacrificing 300 MB of RAM simply to run a terminal emulator is quite a bit,” Parmaksiz mentioned. “However all the things comes with a value, particularly the spinning rat cursor.” 

Constructing the fourth temple

Parmaksiz’s need to push the bounds of terminal emulators previous their logical limits didn’t come from nowhere – he truly obtained inspiration from a supply that some grey-hairs within the tech group may need been reminded of on the very starting of this story: TempleOS. 

For these unfamiliar with TempleOS, it’s an working system that was developed by the late Terry Davis, a schizophrenic, and arguably genius, software program developer who believed he was constructing the OS on the command of God to function a digital Jewish Third Temple

Using TempleOS is an train in frustration given its complicated interface, to not point out deliberate constraints (Davis believed its 640×480 desktop, 16-color show, single-voice audio and different options have been a part of God’s commandment), but it surely additionally included an enchanting functionality not seen in different OSes: first-class, insertable sprites on the command line. 

“I used to be blown away by the creativity and keenness behind it,” Parmaksiz advised us of TempleOS, noting that 3D command line sprites within the OS have been his inspiration for Ratty. “I needed to see how adopting that to a modern-day terminal emulator would seem like and experimented with a few different issues whereas I used to be at it. I am tremendous pleased with the end result!” 

Parmaksiz advised us that numerous folks immediately caught on to the TempleOS inspiration, and that the suggestions has been overwhelmingly optimistic. That mentioned, he additionally admitted that most individuals who’ve used it have been scratching their heads over an precise use case. 

“I believe this may also make clear itself if we give it extra time,” Parmaksiz mentioned in his e-mail. “I imply… I actually wish to see a full-fledged CAD program within the terminal constructed with Ratty Graphical Protocol sooner or later!” 

Whether or not that’ll ever occur stays to be seen – that is purely a enjoyable venture for now and Parmaksiz isn’t even positive it’s in his private time price range to proceed to keep up. 

“I am simply testing the waters for now, however the reception has been wonderful to this point. I might be completely happy to proceed improvement if folks begin utilizing Ratty and begin creating cool issues with it,” Parmaksiz mentioned, noting that the code is open and he’d be thrilled if others contributed. 

Parmaksiz has developed a Ratatui widget that allows devs to construct functions that run in Ratty, like a temple runner knockoff


The Ratty Temple Run clone

“My final objective with Ratty is to discover the probabilities of what a terminal will be and encourage new concepts and tasks within the terminal area,” Parmaksiz wrote in his weblog put up. “I imagine these sorts of experiments are the place creativity is born and I hope to spark some concepts for the way forward for terminals.” ®