Sign in to follow this  

How to make a storyline?

This topic is 3692 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone! I've got most of my game coded in C. I want to implement the storyline next. I want to do this in Lua since I've got some experience with that, but only as a stand-alone language. I never used it as a scripting language except for a Hello World. :-) I thought this; make a Lua script for every small part of the story with a isCompleted() function that tells if the user has completed this part or not. Is this good, or is there some better way? Thanks in advance!

Share this post


Link to post
Share on other sites
A good way is to have a variable, that each time a new event takes place, or is completed, the variable is advanced to a -set- number. The set is very important, don't increment it, set it TO something. Then, when a character reaches where a future event *might* happen (whether they've completed some other event) just check that variable, and make sure it's >= . This only works for linear strategies, however. Your way will likely work better for a branching or multiple storylines.

Share this post


Link to post
Share on other sites
Quote:
Original post by Leo28C
I've got most of my game coded in C. I want to implement the storyline next.


I can't really answer your specific question, but I think I should let you know that in practice for writing good games, that's the first thing they tell you NOT to do.

You can code an engine just fine without a story, or even a game in mind... but coding a game and THEN adding a story is just setting yourself up for a corney / crappy game.

Share this post


Link to post
Share on other sites

This topic is 3692 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this