logoalt Hacker News

lmorchardtoday at 2:12 AM1 replyview on HN

Meanwhile, Undertale, one of the most celebrated video games, famously has a 1000+ line switch statement and AI had nothing to do with it. Sometimes you have to bang out something that works, just to even get the chance to be annoyed at how bad it is for next version.


Replies

tythotoday at 3:20 AM

Game development is often a completely different set of skills and maintenance profile compared to enterprise SaaS development. Many single-player games especially indie ones don’t need to worry about multi-year contracts or having to work through many cycles of different developers coming in and out of a project. Having a 1000+ line switch statement seems totally reasonable on a project with a handful of developers that will continue to work on the project.

My understanding is that the switch statement was for npc character conversation text. That seems pretty reasonable, even in enterprise SaaS for something like translations. It might not be as easy to maintain in other circumstances.

show 1 reply