[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] RPG Quest System



On Tue, Jul 03, 2007 at 10:24:28AM -0300, Giuliano Vilela wrote:
>    Hi guys,
> 
>    I've done some simple small games with PyGame, and decided to move on to a
>    little fun RPG zelda-like game. I managed to make a little tile scrolling
>    engine, dialog and ugly interfaces, spells, itens (still under work),
>    etc.. etc... What I really am worried about is the, not sure what to call,
>    "quest system".
> 
>    I can't think of a simple way of making a scenario, some things that the
>    "hero" have to do before advancing... Becouse, you know, this is pretty
>    huge. The quest that the hero is doing at the moment decides the dialogs
>    of the npc's, closed gates, etc etc... I'm thinking about making like a
>    "scripting" language to describe all those things, but I can't think of
>    any way to include this in the game... It's just something so... general.
> 
>    Anyway, some of you must already have done something similar, so I wanna
>    hear your toughts about this =) Ways of designing the codes, some ideas
>    about the quest system, is the "scripting language" the right way of doing
>    it, etc...
> 
>    Hope i've been clear... Feel free to ask anything. The game will be
>    available at the PyGame wiki as soons as it is "playable".
> 
>    Thank you already,
> 
>    Giuliano Vilela.

I have some experience with this sort of thing. You will want scripting 
of course, but I think what you are looking for is a way to organize the 
information about what missions you have already done, and what you 
still need to do.

The simplest way to do this is to store a named list of true/false 
values. They can all default to False, and you can switch them to True 
when you complete missions. Maybe something like...

quest["Killed the Dragon"] = False
quest["Learned the Wizard's secret weakness"] = False
quest["Stepped on the Butterfly in the Garden of Time"] = False

There are a lot of different ways you could implement this, but the idea 
is the same. you want an organized collection of information about what 
you have and have not done yet. Then if quest["Killed the Dragon"]==True 
the dragon doesn't appear on the map any more. Stuff like that.

---
James Paige