@Ausar I don’t think you should worry about linearity and length. Just write the story you want to write. However, I have a few advices if you are interested.
An advice for a very simple form of nonlinear gameplay:
Lets say you have a linear story: Prologue -> Chapter 1 -> Chapter 2 -> Chapter 3 -> Epilogue = Ending.
Add an optional mission/quest/goal in one chapter. If the player solves the mission/quest/goal their reward is an item/stat increase/additional ability etc. Later on, in another chapter, the players could use that reward to make a very important choice they otherwise couldn’t.
Then you’d get: Prologue -> Chapter 1 + Optional Goal Solved -> Chapter 2 -> Chapter 3 + The Important Choice -> Epilogue = Ending 2
The end result is the same overall plot, but with some additions that change how a later chapter and the ending play out.
Even simpler thing to do is to have the completely linear story, but give the players one or two alternative paths through each chapter. Each chapter will end in the same way, but the gameplay up to that ending would be different and the players could get different items on each path that they could use in different situations later on etc.
Or you can do a mix of both. That is what I do for my game. It is one linear story, but there are optional and alternate routes that give the players unique or rare items and abilities. Example: The player can become either a wolfman or a vampire. However, depending on how they play, they can avoid both fates. If they become one of the creatures, however, the overall plot doesn’t change, but a quest to find the cure is added and untill that quest is fulfilled, the gameplay is changed to accomodate strengths and weaknesses of those creatures. (monster hunters are after you, can’t go outside during the day, weakness to silver, vampire invitation etc.)