RPG tutorials?

Started by
17 comments, last by Possumdude0 17 years, 6 months ago
Quote:Original post by Possumdude0
I guess what I really need is info on how to do a dialouge system and an an NPC system. Like when you talk to an NPC, how does the game know which NPC you're looking at? Do you have to search through all the NPC's data to find matching coordinates?


Yes and no, and it depends. :)

If you have to deal with massive worlds, thousands of NPC's and all, you'd want to do some culling beforehand. Like checking in what region the player is, and only taking the NPC's in that region into account. If you're dealing with only few characters, then such an approach might be overkill. Either way, in the end there's still a (hopefully small) list of NPC's to test against. Usually it's not worth culling every other character since that could take more time than testing the resulting list of a rough, but fast, culling method.
Create-ivity - a game development blog Mouseover for more information.
Advertisement
RPG tutorial*









* What, that's not what you wanted? [grin]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Original post by Eddy999999
I'm in the process of creating an RPG right now as well. I'm using VB6, so I can't give you actual code, but I can tell you how I am doing things.
quote]

I use VB6 and I was wondering how you are making an RPG and what type of RPG is it. If you could give me any help yourself or if you could show me an excellent site to go that teaches.

Thanks Much.
Quote:Original post by Possumdude0
I guess what I really need is info on how to do a dialouge system and an an NPC system. Like when you talk to an NPC, how does the game know which NPC you're looking at? Do you have to search through all the NPC's data to find matching coordinates?


If he see the NPC, you already drawn NPC on the screen. How did you do that? You might use the same technique for discovering where is the character, and where is a NPC.

Often all NPC in the game has assigned an unique ID. It's often trivial to get from graphics subsystem an ID of object that is under mouse, then simple look up the matching ID. Other type is using array and expect the character is in adjacent field to NPC.
Quote:Original post by JBourrie
The only one I know of


Seconded. I haven't read the book or anything, but way back in the days of GPMega I was reading Jim Adams tutorials, and he definately is a good writer who knows his stuff.
If its a tile based engine as you say then an easy way to find the correct npc would be to have an npc pointer on each tile which points to any npc standing on that tile then you can simply check the array or whatever your storing your map info in to see if there is someone on a tile adjacent to you. You could even have a pointer to a general game object which could be an npc or could be an item or whatever and then the game object can decide how you interact with it.
Raghar- I haven't drawn any NPCs on screen yet, just the basic maps and the player. But I get what you're saying.

rdansie- I don't see how that would be any better than checking an array of the NPCs

Captain P- culling, while not necessary for my current project, sounds good. I'll probably use it when I do a big RPG.

Fruny- LOL ;)

All- sorry for the long intervals between responses, I'm only online at school. Thanks for all the help.
Poor little kittens, they've lost their mittens!And now you all must die!Mew mew mew, mew mew mew mew!And now you all must die!-Pete Abrams
Quote:
rdansie- I don't see how that would be any better than checking an array of the NPCs


Because checking an array of npcs means that you have to check through every npc to see if they are adjacent to you which will take time whereas you could just check a single tile adjacent to you to see if there is something standing on it.
Oh. That does make sense.

What about a dialouge system? Is it better to have the dialouge as a part of each NPCs data, or to use a database of dialouge like in Morrowind?
Poor little kittens, they've lost their mittens!And now you all must die!Mew mew mew, mew mew mew mew!And now you all must die!-Pete Abrams

This topic is closed to new replies.

Advertisement