   Games with multiple endings
  In game with multiple endings How to calculate what ending to show?This question its really trickyIn a game with two endings (one good and one bad) its easy, but in a game with more than two...I came up with a solution (using excel), I dont know if this is the easiest way to do it or not but here it is:This is based in a game with 4 diferent endings where the player has 4 diferent path (saint, good, evil and total evil) and 4 elections during the game.How I did it:First gave each path a value (from 1 to 4)Then I gave each ending a value: ending 1:from 1 to 4 (1*4=4)ending 2:from 5 to 8 (2*4=8)ending 3:from 9 to 12 (3*4=12)ending 4:from 13 to 16 (4*4=16)Then I fill the cells with the value of the elections made during the game:Then I applied the following formula on the result cell:=IF(SUM(B5:E5)<=4;" ending 1";IF(SUM(B5:E5)<=8;" ending 2";IF(SUM(B5:E5)<=12;" ending 3";" ending 4")))B5:E5=the cells filled with the player´s choosings during the game. and this is the resultYou can change this formula to work with more than 4 endings by adding more nested IFs.This may become handy during testings.Kind regardsRayco Santana.Note:You can do it without excel by simply sum the values but with excel you can recalculate the ending any time you need it.[Edited by - Rayco on May 6, 2010 5:13:48 PM]
  Make a story tree. Create endings that make sense, and retool game mechanics and missions based on reaching those goals. Algorithms are only useful for smooth, sliding scales, which aren't conducive to solving a problem with story.Good luck.   ;Quote:Original post by GiantGamesMake a story tree. Create endings that make sense, and retool game mechanics and missions based on reaching those goals. Algorithms are only useful for smooth, sliding scales, which aren't conducive to solving a problem with story.Good luck.You misunderstood me (probably my fault because English it’s not my first language, I´m sorry), this is helpful for testing the game endings and help you design a moral/choice system for those endings not for creating a game story.You could write down a table (or a story tree like you said) with all the possibilities and then check that table if the ending showing at the screen it’s the right one but 4^4 equals 256 possibilities. Kind regards.Rayco Santana.   ;  No offense intended but I really don't see any point in this.Most games determine what ending you get based on the choices you make during important cut scenes. Sometimes it tracks specific decisions. Other times it just gives points to different alignments/whatever and gives you whichever ending's associated with whichever alignment you've got the most points in.I'm not sure what meaningful purpose your Excel thing serves, especially since it's not even reflective of how multiple endings are even implemented.I mean I sort of get what you're getting at but there's no real point to it because, from a programming standpoint, unless you've got more than like a dozen endings with a lot of variants for each, there's nothing really difficult about implementing multiple endings.   ;  And don't forget Chrono Trigger, which gave a different ending based on when you decided to beat the game.   ;  Unless you're writing a game in Excel (which I suppose is technically possible), this sort of already exists: http://en.wikipedia.org/wiki/Switch_statement   ;  Funny you should mention that. Before I decided to learn C++, all my games were giant Excel Macros.   