Sign in to follow this  
jmpeer

RPG Design Question

Recommended Posts

Hey everyone!~ I've been working on a simple 2D RPG for my own learning purposes. I normally invent my own mathematical approach to everything, but I'd like to know how other developers handle things like quests?

Share this post


Link to post
Share on other sites
I haven't done it before, but I'd probably use a database to store quests.


I'd have a basic quest description table with the quest ID, the questgiver's ID, the quest description text, the text for the completed quest, and possibly a few other bits of data based on the game.

I'd also have:
a quest prerequisite_quests table, which would just be the ID of any quest that needed to be completed before this one;

a quest item_costs table, which would list the item ID and quantity of any items that the player had to sacrifice in order to gain the quest. ["Pay 10 golds to enter this tournament," etc] A quantity of zero could be used to indicate that the player just needs to possess the item.

a quest prerequisite_stats table, which would list any player attributes needed before attempting the quest. ["You're not yet strong enough to face Onyxia!"]

a prerequisite_events table, which could check if certain things had occured. Whether that be some dragon marching along the countryside, or whether the player had visited some region of the map already.

a quest disallowed_items table, to check the player for any items that would prevent the quest from being given. This would help with "quests" that are repeatable. This way, if the player receives something like "Henry's note" he can't get a second one. But, if he needs to drop or trash "Henry's note," he would then be able to get another.

a quest rewards items table, which would list the item ID of the rewards. It may be necessary to do a quest reward effects table, in case some quests grant the player some sort of bonus.




Seems that would cover it.



edit: Need a player_completed_quests table, too!

[Edited by - HostileExpanse on July 22, 2009 12:43:08 AM]

Share this post


Link to post
Share on other sites
Ahh, really nice explanation. Thank you!
Hee, I totally forgot about this kind of approach.
I'll be sure to experiment with it since I'm rewriting my engine anyway with some new concepts. ^_^

If anyone else prefers a different style, please feel free to contribute! :3

Share this post


Link to post
Share on other sites
I would suggest using a hierarchial objects/class system. That's my favorite approach, because it makes the game easier to expand. For example:

GameCollidable -> Building
GameCollidable -> Person
GameTile
GameCharacter -> Player
GameCharacter -> NPC

Share this post


Link to post
Share on other sites

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