Devlog 4: I added a TUI
After finishing most of the engine, I play tested it for a bit. As discussed in my last post, I fixed 3 big bugs. I was getting closer than ever to shipping a finished product!
However, there was one problem: the engine wasn’t really usable on its own. Sure, it played decently, but it still needed the GUI to display the board. This is unfeasible for shipping–I can’t make people download someone else’s GUI just so my engine is playable. Therefore, I needed some sort of inbuilt user interface. My highest-priority design goal was to have no dependencies, so making a GUI wasn’t really an option. That left TUIs. I couldn’t use a library, so that left me 2 options: I could do the easy thing and hard-code the interface, or I could (and I know this sounds absurd) build a miniature TUI framework from the ground up just to make a simple screen.
I picked the latter, because why not? I already had a decent prototype written in Python for another project, so I could just port that to Rust and life would be easy. Right? Well, kind of. I spent some time on it, but before I added yet another mandatory argument to a trait method, I stopped and asked myself if this was really worth it. It wasn’t going to be easy or practical, so why do it in the first place?
And after coming to that realization, I quickly threw together a decent interface using hard-coded methods. No, it’s not extensible. But why would it need to be? It works, and that’s what matters. And it’s pretty nice, too!
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.