Charas-Project

Game Creation => Requests => Tutorials => Topic started by: Araloth on August 03, 2004, 09:17:41 AM

Title: Having several endings
Post by: Araloth on August 03, 2004, 09:17:41 AM
Well i browsed through some sites and i never found a toturial for this.

This is for making 2 or three endings.
In your game, youll probably need to make a lot of of choices,
if you dont, this toturial doesnt work.

For the three or two endings.
If you want two, make sure theres an uneven number of choices.
If you want three, make an even number.

Now simply start off by making two variables, called "good" and "bad".
For every choice you make, if its a good one, add 1 to good.
If its a bad one, add to bad.

Example:
A kid is drowning and your hero passes by.
The kid screams: "help me!"
Now a choice event, with yes and no, or whatever you want them to be.
For yes, 1 is added to good.
For no, 1 to bad.

At the ending of the game, simply make 2(for two endings)
or 3(for three) fork conditions(sometimes called conditional branch).

<<<2 fork conditions:>>>

>fork condition: if var "good" is higher than var "bad"
>>
>>END
>fork condition: if var"bad" is higher than var "good"
>>
>>END

Now go to the common event tab(in the database), and make your two endings.

Edit the ending to make this:

>fork thingie
>>Call common event "good"
>>END
>fork thingie
>>call common event bad
>>END

There you have a 2-ending game!

<<>>

Go to the common event tab and make your three endings.

Now the event:

>fork var good is higher than bad
>>call event good
>>END
>fork var good is equal to bad
>>call event medium
>>END
>fork var bad is higher than good
>>call event bad
>>END

Test it several times for bugs, and you're finished!
Title:
Post by: Araloth on August 03, 2004, 09:42:27 AM
i wonder why people almost never reply to toturials...
Title:
Post by: bibi on August 03, 2004, 11:37:22 AM
becuz all they need is the n4mation. :guns:  >:
Title:
Post by: robotroy on August 03, 2004, 12:15:18 PM
That's a good tutorial.  Rather simple once you actually think about it, but it never occured to me to do something like that before.  I'll try to implement something like that in a future game.  Good jorb!
Title:
Post by: Araloth on August 03, 2004, 01:22:44 PM
thnx :D i got the idea from a game review that had several endings, and i started thinking how to do that in pg maker.
Title:
Post by: WarxePB on August 03, 2004, 02:18:06 PM
I agree with Robotam. It's simple, yet effective. I would suggest that you try to cut down on the spelling and grammar errors in the future.
Title:
Post by: Araloth on August 04, 2004, 07:04:55 PM
:) ill try, but i think they're mostly typing errors. im quite good at english :p
Title:
Post by: cosmo on August 04, 2004, 08:15:14 PM
why use several variables, just use one, add points for good things, - points for bad things, then just see if the variable is higher, lower or equal to a certain value
Title:
Post by: Osmose on August 04, 2004, 08:40:47 PM
Cause then you have to count how many good/bad things you have. You might say just check if it's zero, but what if you want a part of the stor to REQUIRE the player to do something good? Even if the player still tried to be bad all they wanted, theres the chance they they can end up with something above 0. Araloth's way is easier ^^
Title:
Post by: MrMister on August 04, 2004, 08:56:05 PM
Quote
Originally posted by cosmo
why use several variables, just use one, add points for good things, - points for bad things, then just see if the variable is higher, lower or equal to a certain value
Because different variables could affect different things, like what people are there, where you are, how big your fingers are, etc.
Title:
Post by: chaoticparadox60659 on August 07, 2004, 12:15:41 AM
Hmm... My Game ( Like 70% Complete) Has An Ending Like That Where At The Very End Of The Final Battle (You're Losing) You Choose Either To Join The Villain Or To Keep Fighting Him. If YOu Say [Join Him,] You WIn Eternal Life. If You Say [Keep Fighting] You Both Die And The World Only Knows YOu AS A Fairy Tale... I HATE Games With Happy Endings.
Title:
Post by: Araloth on August 07, 2004, 06:51:01 AM
i think people that type all words with a capital letter are funny :)
Title:
Post by: chaoticparadox60659 on August 08, 2004, 09:42:05 PM
I Write Like This Too... I Think I Have OCD, But I'm Far To Lazy To Tell Anyone Who Can Actually Help Me Get Tested... ha ha im not Doing It Now!

Edit: DAMN!!!
Title:
Post by: SaiKar on August 09, 2004, 06:26:23 PM
Well the thing about game ending is there is nothing "sacred" about the last event that ends a game. The game code itself does not know that the game is ending so there is nothing difficult about programming multiple endings. It is exactly the same as any fork really.
Title:
Post by: Red Giant on August 09, 2004, 06:31:00 PM
Quote
Originally posted by SaiKar
Well the thing about game ending is there is nothing "sacred" about the last event that ends a game. The game code itself does not know that the game is ending so there is nothing difficult about programming multiple endings. It is exactly the same as any fork really.

Agreed, but it's the concept of it.
Title:
Post by: peklo1989 on August 15, 2004, 03:22:45 PM
Nice tut.. I reply kinda late for it because I registered few days ago... But I actually agree with cosmo.. In my game there is 4 endings.. I may even add a special one... I'm using like if var XXXX is 20 or less ---> Bad Ending
is 40 or less ---> Normal Ending
is 60 or less ---> Good Ending (I didn't came up with anything better)
is 80 or less ---> Great Ending and maybe
is 100 or less ---> Special Ending is added to the Great Ending..
It's actually that simple.. But It's just because I use several endings... If you just use like 3 endings you may just use that.. :)
I'm not here to say bad things about your tut, but I find my way a little easier...
Title:
Post by: Araloth on August 20, 2004, 12:27:16 PM
well i read it i think my ways easier, but heck. thats possible too.
Title:
Post by: peklo1989 on August 20, 2004, 01:22:08 PM
Well I do the way I do you.. I just add and subtract something.. It quite simple really.. But if you find your way easier then that's not my business..