I’m currently writing a project in c++ to turn the book “Fighting Fantasy” into a command line game. For those of you who don’t know, Fighting Fantasy is an interactive novel game where you start on page one and based on decisions you make, you flip to different pages. For example, on page 1 “you arrive at a cave, flip to page 30 to go east, flip to page 40 to go west.”
Now the way I currently have this implemented is: I have all the mechanics of the game (items, stats, battles, etc.) abstracted into different files/functions and my main function serves as the control. I treat every page as an event, so for example, if the player goes east, then the event is set to 30. There’s a MASSIVE switch case inside a while loop that’s inside main, and each case calls the functions required to run the specific mechanics for that page, then sets the next event before it loops again.
Now, there are 400 events in this book, which means 400 cases. My question is, is it poor design to have that many cases? Or is it okay in this situation since it’s a very simple/logical way of navigating the book/story? Furthermore, if this really poor, what suggestions would you have for improving the logic flow for this game?
Thank you!