Ruin0x11 / OpenNefia

(Archived) Moddable engine reimplementation of the Japanese roguelike Elona.
MIT License
116 stars 18 forks source link

Advanced drawing APIs #347

Closed Ruin0x11 closed 3 years ago

Ruin0x11 commented 3 years ago

Purpose of this PR

Related issues

Description

Adds some new drawing APIs, and allows rendering the game screen at arbitrary positions/sizes on the "actual" window. Also allows you to register "global" draw layers that can be drawn above and below the canvas in the extra space.

Elona wasn't designed for high-DPI screens, so I thought that maybe it would be useful to be able to put some information in some fringes around the screen. I saw a video for the rerelease of a Shiren the Wanderer title that did this.

These kinds of features give me some anxiety, as they involve balancing out the fact that this is currently an experimental project to poke around at whatever ideas I have about building a living system with the fact that this might ultimately become useful to people, meaning that restraint in piling on features would eventually be required. This change was easy enough to add because the drawing system wasn't terribly complicated, but each additional feature adds even more complexity and can easily lead to a significant decline in performance. Is the utility of this feature ultimately worth the maintenance burden? It seems that only time will be able to tell.

As for why I wanted these features in the first place, the original idea was that I wanted to create a mod where Yuzuki Yukari becomes a backseat gamer and commentates on how terribly I'm playing Elona in real-time.