Jump to content
  • Advertisement
Sign in to follow this  
IonDefender

RPG Woes

This topic is 5057 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

After a few (read: way too many) failed attempts, I have decided to seek the wisdom of the experts, you. I am writing an RPG and was wondering what the best way to handle NPC's in a world would be. I thought that I could store an identifier in the XML file along with the location of the NPC and read these when I load the level, placing a new instance of that class in an array of NPC's and other "interactive" objects found in the world. It justs seems like there could be a better way. Thats why i'm here. Another question I have is after getting said NPC's into the game, how do I control the storyline through these NPC's. Obciously a scripting language of some kind would be key here, but i'm not sure how to go about it. Any ideas would be great. Thanks in advance, Ion

Share this post


Link to post
Share on other sites
Advertisement
document everything...

document how every function works... and map your program... loops if and all... draw them up on paper with lines... as if you were drawing an electrical circut


your map save files dont need to be all one file... break it down into many files, one to store tile data... one to store scripting data, one to store npc data... then load a file that builds the map

ie:
1 Load Tiles
2 Load Npc Stats
3 build npcs
4 load all the scripting data
....

just break everything down into as many pieces as you can and document it all as you do it. if you can visualy see the function of the program you can easily determin errors... the less duplicate code the better
those are my thoughts...

Share this post


Link to post
Share on other sites
Quote:
Original post by IonDefender
(...)Another question I have is after getting said NPC's into the game, how do I control the storyline through these NPC's. Obciously a scripting language of some kind would be key here, but i'm not sure how to go about it. Any ideas would be great.

Are you going to make a Japanese-style RPG or a western-style RPG? A'la Final Fantasy? A'la Baldur's Gate? A'la Fallout? A'la Ultima?

In fact, with a script language you can control the storyline of almost every type of actual RPG. Imagine that you have one or more script programs attached with every NPC, and every script program has a certain purpose (activate when talking, activate every X minutes, activate following an schedule...). When your avatar interacts with the NPC, the script program runs, changing the context and content of the world.

As an example: The king wants you to rescue his daughter. This could be the script of the king that shows how he behaves everytime you talk with him:


if (is_dead(DAUGHTER_OF_KING))
{
if (killer(DAUGHTER_OF_KING, AVATAR))
{
speak(KING,"My daughter is dead... and you dare to come??? Guards! Kill him!");
hostile(ALL_MAP);
}
exit;
}
if (flag(QUEST_DAUGHTER,2))
exit; // The daughter is in her room, rescued
if (flag(QUEST_DAUGHTER,0))
{
// the king is in grief...
speak(KING,"Please save my daughter!!!");
exit;
}
// NOTE: set_flag(QUEST_DAUGHTER,1) when you rescue the daughter
if (flag(QUEST_DAUGHTER,1))
{
// happy!!
speak(KING,"Thanks for saving my daugther! Get anything you want from my treasure!");
set_flag(QUEST_DAUGHTER,2);
set_flag(OPEN_TREASURE_CHAMBER_KING,1);
exit;
}





... as you can see, some internal flags (and the behavior of the world) are changed, and those flags symbolizes an advance in the storyline.

You should check http://www.avernum.com and download the shareware version of "Blades of Avernum" along with the map editor - you can take a look at how scripts are managed in the final version of a game. You can also check the tutorials on my website (see my signature), maybe any of them are useful to you.

Share this post


Link to post
Share on other sites
This is why you have "failed attempts".

So, you're writing an RPG. RPGs make for some of the biggest gooball programs. You want to have a gazillion races to play, classes to play, skills to learn, quests to do, items to find, monsters to fight, areas to explore, spells to learn, doors to find or unlock or bash open, traps to spring or disarm, and on top of it all a compellingly unforgetable story with richly developed NPC in a totally immersive world with the latest graphics and sound technolgy.

I'd say you've set your sights a little bit high.

If you want to see what kind of work it takes to make a complex RPG, go and study the nethack/angband/rogue/moria source code (it is out there). Then think about all of the stuff that you want to do that goes above and beyond the functionality of nethack/angband/rogue/moria.

A little discouraging, isn't it?

Not at all. As I said earlier, you simply set your sights too high. To fix this, set them a little lower, a little more realistically.





Share this post


Link to post
Share on other sites
TANSTAFFL is dead on,

RPG games are increadibly hard to make, especially for one person.

Take for instance, our game, Morning's Wrath, It has been in development for three years and is almost done, and we have a team of seven people.

So, it is possible, but you need some hardcore motivation, a good idea, and the right skills in order to acomplish making a 'good' RPG.

Before starting the MW team, I had already completed 1 and 1/2 Adventure games (2D static background puzzle type games), which are large 'gooballs' aswell. But they were not quite as hard as my current project. So if you havent already made a few games, I would recomend you take your ideal game. and then come up with two or three more ideas in increasingly easy levels of difficulty to make, and then complete those, one by one, chances are you wont want to do these smaller 'lesser' games, but doing them will greatly increase your chances of succeeding in subsequent and more complex games.

If you still decide to take the hard road, and decide you are going to make a great RPG, then prepare for a very long road ahead, I will now list my experience from gamer to game developer below, it might give you an idea of a road to take.

1995 - Gamer, decided I wanted to make games
1996 - Started creating animated movies for my game ideas
1997 - Used hyperstudio to create lots of unfinished games
1998 - Began using visual basic to make games
1999 - Finished my first adventure game
2000 - Discontinued work on the second adventure game
2000 - Switched to Isometric game programming
2001 - Began work on the Flare 2.0 C++ game engine(isometric conversion)
2001 - Preliminary work on Morning's Wrath began
2002 - Flare reaches version 3.0 and is considered, feature complete
2003 - The MW game shell is half way done
2004 - 5 team members added, to bring us to a team of 7
2004 - Morning's Wrath phase1(feature complete demo) completed
2004 - Morning's Wrath phase2(pre-battle gameplay) completed
2004 - Morning's Wrath phase3(full map making) in progress

And that is where we are now =D

Hope that gives you some insight=)

[Edited by - EDI on September 13, 2004 1:42:17 PM]

Share this post


Link to post
Share on other sites
I don't know if this helped the original poster but it did give me some new aspects to chew on. Thanks for the info guys.

Share this post


Link to post
Share on other sites
Quote:
Original post by EDI
RPG games are increadibly hard to make, especially for one person.(...)
I will now list my experience from gamer to game developer below, it might give you an idea of a road to take.


I'm going to describe also my experience (from gamer to "lame" game developer :-P), since i have been working (solo) on my RPG from the start. And both TANSTAFFL & EDI are right, if you are going to make an RPG, prepare to keep on working a looooot of time...

1995: Start working on an RPG. No design, just ideas in mind.
1996: Finished an engine in text mode.
1997: Discovered how to make graphics. First attempt into making a graphics engine.
1998: Start second "graphics" attempt. Scroll. Items. Menus.
1999: Fights. Script engine.
2000: Finally i'm able to make something "playable". However, I had "no" design behind, so cannot introduce some basic concepts. Trash everything.
2001=>2003: Design of the final game architecture. In mind: to make an 10hr RPG (less monsters, less mapmaking, less everything).
2003=>2004: Codify game architecture. Playable. Still a long way to do (two or three years more...).

Hope also that gives you some insight ^_-.

Share this post


Link to post
Share on other sites
I'm going to share the basic design of a game I now and again spend time working on:

First, a little background...

Over fifteen years ago, I got a computer for xmas. It was a TRS-80 Color Computer 2, and it booted to BASIC. I had a cassette deck for saving/loading programs that I wrote.

One of the first games I wrote was called "Doorways". Essentially, this was an "RPG", albeit a very simple one. You were in a room with ten doors. You picked a door, and would face whatever was on the other side. You were then in a new room, with different doors, and you went again.

In the earliest version, there weren't even hitpoints. You had a 50% chance of killing the monster, and it had a 50% chance of killing you. Later, hitpoints were added (called "health" and not hitpoints), and a number of items were added: gold pieces, spells(not a particular spell, just spells), potions, electroshields(don't even ask), weapons, and finally different types of monsters. In latter days, keys, traps, chests, etc were added. Typically goals were "kill 6 dragons" and such nonsense.

Doorways has been written for TRS80, Atari800, IBM PCjr, Tandy 1000 EX. Over the years it has advanced, and has been inspired by a number of different other games.

One game was dungeon of daggorath, a game for the TRS80. Mostly, the inspiration came for the text input. I suppose another bit of inspiration came from the zork like games of the time. Another inspiration came from nethack and similar games, and the use of ASCII screens to represent rooms visually.

One sort of "spin off" of doorways was a dungeon editing tool. You could name rooms, doors, traps, items, monsters, etc, and put them all together into different little mini adventures. This was still a text based game, but it was a lot of fun to make, a lot of fun to make adventures with, and a lot of fun to play.

And this is the sort of game I like to work on, but it does have its gooballishness. Of late, I have been looking at two different versions I want to make of this game. One is a version for Cybiko, which perhaps a total of 10 people on the planet earth would play. The other is a web based version using ASP and talking to an MS Access database. Naturally, these would still be text/dialog/menu based games.

Personally, I'm now leaning more towards the web based version. The hard part of the game is deciding where to put the limits. For example, I allow various types of portals/doors to be named. Pretty much any sort of transition from one area (room) to another is a portal. But now, what directions are portals allowed to go in? Sure, north south east west, but what about up/down? And how about a portal named "hut entrance" and a direction called "in". Whoops, now I need a way to specify direction names. Now do I want to make the doors difficult to open(i.e. stuck)? If so, how does the player check to see if he can open them? Oh, I guess I'll need a skill system/attribute system.

And then, of course, the act of playing an adventure changes it, as monsters are killed off and items are picked up. How does one handle that?

Blah. It gets incredibly complex, rather quickly. Better to keep it simple.

Share this post


Link to post
Share on other sites
Heh heh.

Pretty much every game I've ever made or attempted to make has been a gooball. A very large, very sticky, very gloppy gooball. With stuff sticking out of it, and all sorts of nasty dripping things oozing around.

Good article there, TANSTAAFL.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!