Console RPG storyline

Working on a fairly simple console RPG as a test project for what I've learned so far. I've got the majority of the classes I'll need developed and the combat system seems to work for the most part. The part I'm stuck on is the storyline. The obvious simple way to handle it is create a linear story where the player follows the same path, but maybe fights a few different enemies based on random numbers. Would it be out-of-hand complicated to create a unique(ish) storyline each playthrough?
That's not at all out of hand complicated. In fact, it's not particularly complex at all, just time consuming. For instance:
1
2
3
4
5
6
7
8
9
10
std::cout << Fight the dragon or run? 
if(we run) 
{
    //some event happens. 
}

else //If we don't run 
{
    //A different event happens. 
}


Whereas without a multi option storyline you don't need to bother doing any if/else blocks like this. So it will just take a little more time.

You could always have a fairly linear storyline that involves branching paths and gives you the best of both worlds; the additional variety of interactions and events that could take place down a specific path, but without the need to create multiple whole storylines. I had a similar idea in mind for a project I'm working on, and consider it the "choose your own adventure" approach.
Yeah cause you know a storyline is only a buch of blocks of text. You could tie each one to a randomly drawn number and do a switch to display which one is drawn.

As mats said it is not difficult but it is very time consuming and you will most likely find yourself tired of the game before it is done. My advise is make a much more simple RPG just to prove you know your stuff. Keep it as simple and short as possible with only a single storyline, then when it is done, you say okay I got this, now on to 2d programming. Which by the way I think you will find much more satisfying.
@Manga, that was actually my end goal. I planned to get a working version of this and was even considering a mini-map, or even just a map of some sort to get it started and make the transition to 2d even more simple. What's the best way to handle a 2D game? From my understanding you use a library, which basically handles all of the difficult parts of the game?

@Mats, that makes sense. For some reason I was having trouble wrapping my brain around what would happen with the if/else, whether I would just continue the story from inside there or if it would work like that. but, that makes sense the if/else would just handle the one event and the story would just continue as normal after the if.
When you make a 2d game I think you'll find making a mini map to be rather difficult! I also would definitely recommend making something very simple like pong or tanks first, rather than an adventure game.

As for handling if/else blocks, you can use variables to make earlier events have an effect on later events.
1
2
3
4
5
6
7
8
9
 
if(dragonkills == 1) 
{
    cout << "A huge dragon appears before you!\nIt looks like revenge is on its mind.\n"; 
}
else if(dragonkills == 0)
{
    cout << "A huge dragon appears but does not seem concerned by your presence.\n";
}


I wouldn't put in too many different endings. Perhaps you can have a dozen or so places where things can happen differently.

Edit: Missed one of these ---> /
Last edited on
I didn't mean minimap for the 2d game, I meant that just for the console game. Simple two-dimensional array with just some basic objects/monsters on it. I probably won't use implement that for this game.. it'd be way too hard to keep track of. Or at least way harder than I intended this game to be.
closed account (jyU4izwU)
Quick tip: If you want to keep track of your "Items" (Monsters etc...) make them classes then include "Dragon.h". Do this only if you want you have a more ordered code (Note: It will be more complex in a way).
Edit: Its to get your interest to use Classes.
Last edited on
Ibrahim, I'm not quite sure what you mean there, but I'm interested in it. My current way of keeping track of items seems overcomplicated and even a bit messy for what I need. Almost to the point where I don't want to have to go through doing it again for the monsters (haven't quite finished the monster class). The way I interpreted what you said though, is a base class Items, then derived classes for each item in the game.
Yes I think that's (using base classes and deriving) what he meant.
1
2
3
4
5
6
7
8
class monster 
{
    public: 
    std::string name; 
    int health;
    int damage; 
    int armour; 
}; 


Base class done!
Yeah, I've got one of those. Then this?

1
2
3
class dragon : public monster
{
};


I was just keeping track of monsters (and items) in a vector.
When you go 2d... I strongly recomend sfml. Making a mini map with this is easy. The tutorials even give you an example of how to do it.
Topic archived. No new replies allowed.