Hi what is the best way to create multiple endings ? Of course I want this to be done according to the choices the player makes in the game. So I was thinking about doing switches but I read that having a lot of switches on can slow down the game so I want to know what is the best way you all suggest I should do ?
For example If the Player chooses choice A then Switch A will be on for the entire game. You see I think there is a better way of doing this but I just don't know. Thanks for helping and much love! 😀
Depends. As usual.
What kind of multiple ending are we talking here? A basic decision on whether the character has been good or evil? A variable would work best. Endings depending more on choices made or items collected rather than plain good or evil? Then you want to use switches.
Guh.....something doesn't feel right...
Switches don't slow down the game - parallel processes do.
Having a lot of onscreen events slows down the game. I would use variables but there is really no practical limit to the number of switches. I think you can have 10000 or so.
It does get awkward working with thousands of switches because you scroll through a huge list which will have a ton of pages (20 per page) but it won't slow the game down.
You could do it like most big time developers and only make the last choice really matter at the end. However, if your taking the road less traveled by and decide to have multiple events dictate your ending, hats off to you. In my personal opinion, if your only going to use 2 endings, just use a switch. If your going to have anymore then that, use a variable as it's easier to keep track of then 600 or 5000 switches. Another option is using self switches w/ script calls, but if you mess that up you could lead to some serious problems for your game.
As said before, depends on what you're aiming for.
If you want to have a really dynamic story where every choice leads to a different path, you could draw some kind of tree. That way you could give every vertex (which resembles a choice) a number and store the one where you currently are in a variable. But that would be the maximum effort way. Otherwise just do what's already been said: either a good/evil variable or a ton of switches.
If it has lots of changing points which basically just change the inclination, I'd prefer using variables to just track the inclination... If every choice makes everything different then I guess switches are better, though you'd probably need a lot of them which can get a bit complicated.
Alright I understand that switches do not slow down the game but parallel processes do. When you guys are referring to parallel processes are you talking about all the parallel processes in the entire game or just on a map? Parallel processes are pretty neat so I do like to use them. I think I'll go with just switches for now.
Switches are fine if you have just a few critical options that determine the ending the player will get. If you have more than a few decisions, you should probably use variables and have similar decisions feed in to the same variable.
I would suggest variables for more than a few options....
Switches can get confusing since you'll probably end up with a ton of them... Variables just seem more... comfortable? and neat...
Example... say you have 16 questions and 2 possible outcomes, one 'bad' and one 'good'
I guess you'll need at least 32 s[SIZE=11pt]witches (I think...) and then you'd have to decide exactly how many of them and which would have to be on for the player to [/SIZE]get either ending...
With variables you can just reward 1 point for 'good' and 0 points for 'bad' (or for more important decisions you can give more points etc)
At the end all you have to do is say what score gives you each ending... (like, for >10 you get the 'good' ending, for<5 the 'bad' ending, for....)
I think it's easier to keep track of...
I am using switches as of the moment and its going well just remember to keep track of your switches.
I've been using switches for game flow, and variables for different outcomes.
My game is split into four sections, and in each section you meet a new character that leaves you before the boss. Each of them have three ways that they can go. What I do, is for each dialogue option a player is presented with, certain ones will add to certain variables.
I try to keep it as simple as possible. For an example, the second character that you meet named Penelope. The game choices you have are: Offer her food, or don't offer her food (+1 to Penelope's variable); rifle through her things, or ask her first (+1); and to return her things (+1), or not. The outcomes of this are as follows: Penelope=0<1, she will run away before the boss. Penelope=2, she will fight with you. Penelope=3, she will sacrifice herself.
I do that for each section of the game. And, I am planning for the end of the game that the departure for each character you meet will then affect the outcome of the game. I think for something like that, switches would be better. A different switch would be activated at the end of the character's departure and kept that way for the rest of the game.
I hope using examples helped you.
Those examples are great! I think I'll have to switch to variables for now 😀 Thanks Koi!
Oh! Another thing to go with this example, and for more complex multiple ending stuff. Technically, this character has six departures, because there is another option where she will offer you an item, and you have the choice of taking it or not. So while there are three ways for the character to go, there are two versions of each—where you have the item, or when she has the item. Since this item is visible on the characters and affects game play in multiple ways, I have created separate maps entirely depending on what choice you make to keep things more organized in terms of how many switches and conditional branches and whatever appear in the events.
For this, I use a switch. I just use one, which is "ANNABELLE W/ BLANKET" (the main character). So, if you choose to keep the item, that switch is activated on that choice. And so, when you exit the map to advance to the next part, the transfer tiles have a conditional branch in them with the condition of whether or not that switch is on. The two branches in each tile will either send you to a map labeled with PWB or AWB (Penelope w/ Blanket, Annabelle w/ Blanket), the AWB map of course being the destination under the branch activated by the switch.
There might be an easier way to do this, but this is my way and it's worked for me so far.