Archived

This topic is now archived and is closed to further replies.

Nazrix

Abstraction gives freedom of choice

Recommended Posts

I know I''m not the 1st person to come up with this but perhaps we can discuss it anyway: What I''m going to do is try to is give a loose example that is assuming that some certain code is in place. I am not so much concerned in the specifics of how each thing would be done but more about how abstraction can cause a vast array of possibilities and keeps us from relying on scripting. Assuming that an agent or Npc can send a message to another Npc instructing him to do something, the message could be sent verbally or in written form (this assumes that there''s some system in pace where an item can contain some sort of message of course) An example of the abstraction occurs because the NPC''s AI could be constructed so that it would act the same regardless of the source of the message. Let''s assume NPCs have the code to understand specific messages or commands (things like "npc x plans to steal item y", or "npc x has been kidnapped at location y" etc ) Example: Suppose an NPC wants to steal some item from a store and wants a few other NPCs to help. He has a messanger NPC carry a letter that asks one of those NPCs to help him. The player could intercept the letter (by stealing it from the messanger or what have you) thereby causing the message to never get to its intended receiver. This could mess up an Npc''s plan and cause the player to have quite a significant impact on the world. Then lets say the player decides to read the letter after getting it, thus finding out the Npc''s plans. Now the player knows what the NPCs were planning and can act on it. He could interfere, help, ignore, etc. Or the player could give the message to authority NPCs (guards, police, etc). They would then react to it as if it were any other message so no extensive coding needs to be made. Also, an NPC could do those same things and it would not take any special scripting. The point is not so much this specific example so much as the way abstracting the situations in the game can offer fairly interesting possibilities for the player & NPCs without special scripted situations. There are going to be many, many more possibilities than listed above especially when you have other elements besides just writing letters. The options could grow tremendously when you combine all the elements of your game. It is similar to what happens when you''re playing a strategy game and there are many ways to beat your opponent by manipulating the entities (your units usually) following the rules of the game.
A CRPG in development... Need help? Well, go FAQ yourself.

Share this post


Link to post
Share on other sites
This can be done in a much simplier way. Consider that insted of havin the NPC actually send a letter it only depends on what you do when you encounter a messanger wit hthe letter, if you let him go and move on to another area then the robbery will happen, this of course does nto actually need to invlove any other NPCs except for the messanger scripter to cause a event to happen depending on whether he is let go or not.

This way you dont'' need one NPC to send a message to more NPCs. Yo ujust need a messanger NPC and his effect on events therafter, much less coding involved in this. NOw if you take the note to the authoritive NPCs or even to where the messge was supposed o go i the first place it again affcts the world, however the messanger NPC idoesn''t actually go anywhere he is only encountered somewhere and the result of that encounter effects the game tellemitry.

Share this post


Link to post
Share on other sites
quote:
Original post by Kinmii
This can be done in a much simplier way. Consider that insted of havin the NPC actually send a letter it only depends on what you do when you encounter a messanger wit hthe letter, if you let him go and move on to another area then the robbery will happen, this of course does nto actually need to invlove any other NPCs except for the messanger scripter to cause a event to happen depending on whether he is let go or not.



I''m not sure if I understand exactly what you mean but the reason there''s more NPCs involved is because I was thinking that many NPCs would be needed to execute the plan. That was just this example though. It''s not really all the important to the general idea of this concept.


quote:

... even to where the messge was supposed o go i the first place it again affcts the world,...


Yes that is another great example of what abstraction like this offers.




A CRPG in development...

Need help? Well, go FAQ yourself.

Share this post


Link to post
Share on other sites
what I''m saying is you don''t need all those NPCs running at once to execute the lan you only need the messanger running and if you let him go it turns on the other NPCs are the robbery location therefore you cut them out of running unnnessisarily while you''re playing th game

Share this post


Link to post
Share on other sites
But Kinmii, by that method it becomes a hard-coded scripted event. If you wanted to have more time sensitive events, or more flexible methods of dealing with them, you''d have to abstract as Nazrix says, or make much more complex scripting... which does in fact lead to greater processor load, but also more interesting gameplay.

For example, say you do intercept the message... the message meant for the picklock the robbers wanted to use. He never shows, so the others have to make a decision. They could decide to bust in by force instead of quietly as they had first planned. They could decide to visit him personally to bring him over, and find out that he knew nothing about the plan. They could give up their life of crime... it gets rather complex, and only a very flexible NPC AI could handle this kind of open-endedness.

IMHO, the best way to implement this kind of flexibility is in a MMOG, where you don''t have to run NPC AI for everyone involved because all the characters involved are run by real people. Of course in ten years, that NPC AI might not be such a load compared to processor power. The nice thing about working with computers is that it might be pie in the sky now, but that pie comes into reach awfully fast.

---------------------------------------------------
-SpittingTrashcan

You can''t have "civilization" without "civil".

Share this post


Link to post
Share on other sites
Gha. I understadn the oncept, but you don''t need that many NPCs running at once. all you need is the messanger who goes on the path he''s supposed to if you''re in the right place at the right time you''ll encounter him. if not then it activates the other NPCs in another location, but only to do the robbery. everything is turned off unless it is NEEDED. this is easier on the compuer and the programmer

Share this post


Link to post
Share on other sites
Kinmii, as far as I understand you mistake a concept for implementation... no offense meant.

As for the original concept: I like the idea of real information-ways. I''m gonna use something like that in a game too, where there is a way to overhear bits of talk and learn from them. If you hear thieves talking about a planned robbery... well, go and spoil their plans!

This will definitely produce a more realistic game world - the only thing to bother with is to make it fun, too!


------------------------------
www.BadEntertainment.net

Share this post


Link to post
Share on other sites
quote:
Original post by grbrg

As for the original concept: I like the idea of real information-ways. I''m gonna use something like that in a game too, where there is a way to overhear bits of talk and learn from them. If you hear thieves talking about a planned robbery... well, go and spoil their plans!

This will definitely produce a more realistic game world - the only thing to bother with is to make it fun, too!


------------------------------
www.BadEntertainment.net


Yes exactly, and I believe this concept of abstraction could be used in many ways besides just information-ways.


A CRPG in development...

Need help? Well, go FAQ yourself.

Share this post


Link to post
Share on other sites