Hacker News new | ask | show | jobs
by WWLink 1291 days ago
Yea that would do it for me haha. My bread and butter is embedded C! Technically it's C++ but we try to ease off the ridiculous C++isms because this stuff needs to be readable to the person that was waken up with a phone call at 3am and needs to explain some random behavior lol.

I've never done anything spectacularly fancy with CLI terminals. I could rig up a UI with c++ and qt, or python and tkinter.. but it's been a while. Longer ago, I used to do objc but that was forever ago!

So yea, I'd die on this one hahaha.

I should try it sometime. I love tetris!

1 comments

Oh you could do what I’m talking about in C, no problem. By console and keyboard only, what I mean is that this is a game done in the shell with a REPL using printf() and scanf(), it was not graphical or anything. The programming problems weren’t about game programming, it was just design a little data structure to hold the board state, implement valid move checking, detect win/lose states. Really simple stuff, I guarantee it wouldn’t be hard for you.

Re: ridiculous C++isms and embedded C, I’ve been in the same spot for my entire career. After learning C++ in college, I joined a CG film company that had banned C++ (dumb story) so I learned how to write object oriented C. Working in console games after that, we weren’t allowed to use any built-in memory management or exceptions or a current compiler, so very restricted C++. (And the worst bug I ever fixed was when someone tried to get clever with their C++ copy constructor.) These days I use CUDA, which is also technically C++ but basically C.