I do a lot of my work backwards. So I'll start with an ending and figure out what I want to do to get there.
(i.e. I want the "good", "bad" and "neutral" endings. I might also sub-divide these into "good romance", "good no romance", "bad romance", "bad no romance", etc.)
Then I'll figure out what I want to do to get to each ending. Do I need a certain number of times that I've talked to a character? Do I want a certain dialogue branch to be chosen? Something else entirely?
I might, for instance, say that for the good ending, I need 10 good points. So a menu option might look like this:
Code: Select all
menu:
"Do you want to save the princess?"
"Yes":
"Flavor dialogue"
$ princess = True
$ good = good + 1
jump whatever happens next
"No":
"Flavor dialogue"
$ princess = False
$ evil = evil + 1
jump something else
I try to keep major branches to a minimum (since woah do they take a lot of extra coding!), although clearly they exist (sometimes looping, sometimes not - I try to keep non-looping ones close to the end of the game, but can add some replay value by adding conditionals mid-way through that show different dialogue options depending on types of points or trues and falses. i.e., if you save the princess, maybe she comes back later to thank you and give you money, while if not, her father shows up and tells you how much he misses his daughter)