Advertisement

The Tree of Death

Started by December 14, 2000 10:40 AM
59 comments, last by Landfish 23 years, 8 months ago
You mean I''M not the only one working on this ???

So Wavinator, If I interpret your response to firecat

correctly Princess would -USE ITEM- "holographic plea for help"

near the (Location: Droids in the hanger)

But if she -USE ITEM- "Blaster" in (Location: Princess

quarters) she kills herself. //this may provide a useful "end of
//branch" and avoid some of the
//Tree of death endless spawning
//problems however, -Charater dies-
//is the most often abused // divergence "solutiuon"


If she -USE ITEM- "Blaster" in (Location: Engineering Core)

she blows up the whole corvette (stormtroopers vader and all)

since the base of the "tree" has Vader taking out the Emporer

in ACT 3 that is very interesting.

If she -USE ITEM- "Holographic Map of rebel base" in

(Location: Occupied Corridor) then She switch sides,

Princess=access to DARKside locations=true

Now she potentially learn the force from her Daddy?????
(hidden value)

If she -USE ITEM- "BLASTER" in occupied corridor -ENTER Battle

Mode-

???????????????????????????????????????????????????????????????

Is this what you mean? it certainly so;ves alot of problems

however, we need alot more than this system to make up a game

Battlemode "hand2hand",Battlemode "spaceship", Exploremode,

Trainingmode, it certainly beats the hell out of Multiple Choice

Hmmmm, wait I HATE interactive games, how do we keep this from

being a "MYST" or a Dune 2
"do you like my helmut?"-yoghurt
You''re back to the Tree of Death, but in this case it deals with AI instead of plot. If the game engine is to function independent of a scripted plot (i.e., you can do whatever you want, and the game should react appropriately), you need to build agents that can respond to the given stimuli.

Princess.FireBlaster( StormTrooper );
Call Event( StormTrooper.BeingAttacked( Princess ));

And then you have the storm trooper react accordingly. (We could almost convert these code examples directly into a scripting language.) In the end, it comes down to a finite state machine. You just need to accommodate as many states as possible. This is identical to building a Tree of Death, but you''re writing AI instead of plot.

I rather like this idea myself, but then I''m a programmer first and a writer second.

GDNet+. It's only $5 a month. You know you want it.

Advertisement
Sorry I didn''t post last night, winter weather strikes again.

Well, I didn''t really get a system or anything, but I did think up some things that it would be nice to get some feedback on. Again, excuse me if I don''t make sense, I''m still waking up

I started out thinking about the basic types of objects there would be. There''s basically buildings, npcs, items, and scenery. Scenery would be for things like lamposts or whatever that you wanted to have some effect, but weren''t big enough for buildings. Every object would have two basic ways of affecting it''s enviroment. One would be passive, just by existing it could change values in some "zone of effect", or it could change global values. The other way would be more active, it would be triggered by the player or an npc performing some kind of action on the building. Then you would set things like "when building destroyed: do blah", and stuff like that.

This got me to thinking about how something like a grainery would work. When it''s destroyed, a value, the towns food, goes down. There would be two ways you could implement it. The first thought that came in my head is that you''d put some kind of trigger in it saying something like "when building destroyed: town food -= 30 (or however much the grainery was producing)". The other way I thought of, which seems to make more sense, is that you''d just have the grainery stop adding it''s passive 30 to the towns food supply when it was destroyed. This seems to be a far better way to go about doing things. It''s not that the grainery being destroyed means that suddenly there''s a penalty to the towns food, it just means that when the grainery''s destroyed, they don''t get food from it anymore. This sorta leads to values having a type of inertia, their natural state is 0. Things can add or subtract from the value, but when they stop adding or subtracting from it, well, it goes back torwards 0.

Now for a bit more about the different ways for an object (be it building, item, npc, or scenery) to passively effect suroundings. So far, there''s two ways. One is that it changes a value globally. That means that the object just changes that value. This would probably be used for more abstract values like "town morale" that aren''t linked to a physical object. The other way is a zone of effect system. This would change a value within a certain radius of the object. Take the grainery, buildings on the other side of the world don''t get any benifit from the grainery, only the buildings within it''s radius of effect. Now, imagine building a town made up of all these radiuses of effect. You''d have lots of buildings that were dependent on other buildings to work, destroy one of them, and things that were dependent on it would stop working. Which could in turn be linked to quests that would have triggers something like "if food < somenumber".

The building dependency is a bit like a Starcraft tech tree. There are rather large differences though. One thing is, learning how to build a building, and having that building be able to do anything are seperate things. I think for the actual building of buildings you just need to have someone who knows how to build them. For the buildings to do stuff you could make them have dependencies, like say for a grainery to generate a food value, you might need a mill (stupid example but whatever). Now this is going to be at the heart of a lot of stuff I think. For the values that an object generates, you can set prequisites. Like the object''s value of something has to be so and so before it''ll start outputting. Take the mill/grainery example. The mill sends out a value of, whatever the mill generates, say processed food, to a certain radius outside the mill. Now we have a grainery within the radius the mill is generating, so it''s processed food value is whatever the mill is generating. Whenever the grainerys processed food value is over a certain amount, it starts generating something like stored food. Then say you have houses in that radius, they get the stored food, so they do, uh, whatever houses do.

Buildings aren''t the only objects that generate values though, lets go back to the cross in the church example. You have the cross, which outputs something like "holy treasure". Now, the church has a prequisite for generating morale, before it can start generating morale, it needs to have a certain amount of "holy treasure". If the cross is in the church, generating it''s holy treasure stuff then the church generates morale. If you take the cross out of the church, the cross isn''t in there generating it''s holy treasure value anymore, so the church doesn''t generate morale. The cool thing about this, is your not saying "if the cross is in the church", your saying, "if something that generates holy treasure is in the church", this allows for a large range of different things the player could do to try and save the church. First of course they could go try and find the cross, but they could also try and find someone who can make a new one, or maybe they would find a golden statue of the god Poodoo in the woods, and that would work. There''s a whole range of possibilities. This applies to everything too, say the grainery gets destroyed, what you need is something that generates "stored food", and any kind of object can do that. Maybe you find an item, a "pot of plenty", maybe you have a vehicle, like a peddlers wagon, and if you drive it to town that could work, you could have some build a new grainery, or you could have someone build something that works even better than the grainery. The key is not referencing things specifically, but by the effects they generate.

So far I''ve pretty much just been talking about buildings and stuff. I''m thinking that in Kingdom I want the player to be able to build buildings and towns as one possible means to an ends, but there''s still a lot of other systems, such as stealth, reputation, wealth, whatever. I''ve been thinking about those, and I''ve been trying to think up a extensive enough system of objects that it would be possible to create your own systems like these from the editor alone. Let''s take stealth for example, I''m not sure exactly how that would work in a 2D game, but I''m assuming there would be some kind of "hiding in shadows" thing going on, and maybe items the player could get that would add to their stealth. I don''t think that would be that hard to implement with only the system I''ve layed out here so far. All you''d do is create a value called something like "player stealth". Then you''d give items, and scenery and such, a passive value emition thing. Say you had a crate with shadows, you''d just say that the crate emitted a stealth rating one square around it, and it added such and such to the players stealth. This brings up something that I might have to add to the object system to make it work well, customized shapes for zones of effects. That way you could just have the side of the crate that was shadowy add the players stealth rating. Or for buildings, or whatever. For items it would be easy too, just have them add such and such to the players stealth (or subtract for that matter). Then for actually making stealth do things, you could just have it so that npcs would respond differently to seeing the player depending on what his stealth level was.

Here''s some random things that I think would be cool and/or things that I might need to add the object system. One thing is that other buildings might not be the only things buildings are dependent on to work. Like the mill for example, might need a person around, basically, an object that generated such and such "mill work", for the mill run. That way you could have things happen if the player killed NPCs too. You kill the guy that runs the mill? Well, then the mill stops working, which means the grainery stops working which means that npcs don''t have enough food which means... etc. Another thing I think would be cool is that maybe objects could somehow be linked together to increase on of them''s zone of effect. Like say you somehow linked a person with a cart to the grainery, then the grainery''s zone of effect could be greatly raised so that it didn''t have to be in the middle of the town. There might have to be some kind of "invisible zone" type thing, that would basically be invisible squares for catching values. Take for example the cross and the church. The cross would only add it''s holy treasure value to the church if it was in it''s special niche, so there might have to be some kind of invisible square over that niche to be where the cross was supposed to be, and it was the only thing that caught the particular thing the cross emitted, I''m not sure. Vehicles I think, are going to be rather important. At least, I want that to be something that the player can get into if they want to, getting parts, and putting things together. Trading, I want to be very possible. That should be one of the ways that you can become the most powerful person in the kingdom, by becoming the richest. Trading seems to be the best way to get rich, so it should be there. Then you could hire bigger ships or carts or whatever to carry your wares, hire mercs to defend them, whatever.

Well, this is getting rather long so I think I''ll shut up now. Tell me what you think!

-Firecat
I''ll be damned! Implicit surfaces applied to a world simulator! Who would''ve thought something unique to graphics programming would squirm its way into the Game Writing forum and actual turn out to be an outstanding idea?

I think Firecat is looking at the next generation of RPG, when we start adding elements of a Maxis simulation to make the world more dynamic. The Sims functions a bit like what you said; each object in the house emits a usage signal, so the residents know where to go when they need something. E.g., the refigerator emits an "I have food" signal, and the stove emits an "I can cook food" signal. Without one, the other is just not very useful.

Now the only problem is getting NPC''s to think and act realistically in this new dynamic world. The evil villains will need a reason to destroy various components of a town, and the good citizens will need to react accordingly. Player influence has never reached such a profound level!

GDNet+. It's only $5 a month. You know you want it.

I like the part where the character

presents the church with a pagan dung

sculpture.
"I''m here to help!"

"I''m running for king by the way."

heehee I like this guy already.

seriously I like these ideas let me think for a minute

"do you like my helmut?"-yoghurt
Yes, Poodoo is the god of poo, snot, and various other human excrements. He''s rather new at the god buisness, having been created when the other gods suddenly realized they didn''t have anyone to handle those kinds of things. They managed to dupe poor Poodoo, a not to bright satyr, into accepting the job, telling him how "honorable", and "prestigious" it was. He''s not very good at it. He does have these monks though, that are about two feet tall and wear diapers... scary buisness.

Back to the other things, I''m not quite sure how NPCs would work. I was thinking that they''d be rather like NPCs in a traditional RPG, except that they could have triggers based on values, i.e., "town food < blah", instead of "wizmo the evil gnome burns down grainery". If it was done this way, you still would have something of a descision tree, the player would just have a lot more leeway in getting between the points. I don''t know if that''s the best way or not though. It certainly would be the easier, but it might be worthwhile trying to think up an even more dynamic system for NPCs. I''m not sure about this though, it''s definitely something that it would be good to hear opinions on.

One thing I was thinking about is some kind of "ownership" system. Like for example if you tried to give the cross you stole from the church to a villager in the town, they''d probably turn you in or sound the alarm or something. The two conditions for the villager turning you in would be that they''d have to know that the cross didn''t belong to you, and they''d have to be nice or lawbiding enough to care (can we say "unscrupulous merchants"?). The lawabiding-ness would be pretty easy, just some kind of numeric value for the NPC, and then there might need to be another value for how well they liked the character that the item belonged to. For the ownership, it might be a little bit more complicated. For example, everyone in town would probably know that the cross was from the church, but no one in town would know where the pink underwear you stole from the mayor came from. Coding for each NPC and item whether or not the NPC knew who the item belonged to would be tedious, and it wouldn''t support items created while the game was running. I think something where if an NPC came into contact with the owner of an object and the object at the same time, then they knew who it belonged to could work. The reason that they would have to come into contact with the owner and the object at the same time is that many of the townspeople might come into contact with the mayor, and you might show them the pink underwear, but they still wouldn''t know who it belonged to. I suppose this could also be used for deceiving NPCs. If they see you and an item together at the same time, as long as they haven''t seen it before, they think that the item belongs to you. Then if someone else gets it, they think that the person stole it, even if in actuality it belonged to them in the first place.

Hmm, I''m a little bit tired and I''m not sure I''m thinking clearly. In the intrests of not creating another monster like the last post, I think I''m going to stop now.

-Firecat (with laxative ray)
Advertisement
firecat, that is alot of work isnt it?
what do you think about having two levels
of NPC''s. Dumbs and Smarts.

Dumbs just wander around and have a choice
of five things they can say based on the town
value. You could still count them. ie how.many.dumbs.town
or count them per building.

Where as Smarts could burn down buildings,
steal things, become king and so on.

I think this idea holds if you are going to have
any NPC''s behave in a uniform way. ie. they all tunn
the character in if he shows them the cross.

otherwise I think you get treeD

"do you like my helmut?"-yoghurt
Excellent elaboration, Firecat. Excellent!

I''ve been trying to use this idea to build a large scale empire / RPG hybrid. One thing I''ve been working out is how to reduce / abstract simulation depth. How would you do something like this not just on the scale of a town, but for an entire kingdom composed of many towns?

It''s tricky, but one possibility is a sort of "mip-mapping" as applied to simulation elements. Let''s say that every level of abstraction is a "level" as you described. Take the church. It''s defined as geometry with a bunch of regions of effect. The values add to a global pool.

When you leave the church, you''re at the town level. All the buildings add to the global pool, just the same way as the church did. If you leave the town, all the town and surrounding lands add to a global pool in a similar manner.

As far as simulation goes, you only care when something has changed. Like you mentioned, the steady state idea applies: When the grainary is destroyed, it forces a re-evaluation. You wouldn''t have to evaluate everything at once, btw... changes take time to propigate.

I think it''s important that many of the values at each level have some kind of "access" method. That way, you can change the value directly (or indirectly, via the cascade effect). And that way, your changes could possibly affect the entire realm!

--------------------
Just waiting for the mothership...
--------------------Just waiting for the mothership...
quote: Original post by lupine

firecat, that is alot of work isnt it?
what do you think about having two levels
of NPC''s. Dumbs and Smarts.


I think this would be great, but I wouldn''t be so obvious about it. This kind of dovetails with abstraction, like I was talking about above.

Think about it this way: In any interactive tale, you''re going to want to interact with only a limited number of people in detail.

So there are major characters, and minor characters. Major characters get detailed bot AI. Minor characters get generic bot AI.

The generic bot AI should be basic enough for the AI to respond to his environment reasonably enough, without much detail. It''s ideal for NPCs off screen, and those the player isn''t interacting with closely.

Major characters get to scheme and plan. They get to "pathfind" through the plot, consider relationships, alter the environment, and generally "think." Since this is processor intensive you only do this for a limited number of characters at a time.

Now the trick is to making this look good is twofold: First, you have the ability to switch any character into and out of major or minor status.

The other trick is to develop a macro level to an NPC''s AI simulation. Rather than intricately figuring out if the major steals the cross, you reduce it to a few tests. If you know the majority of actions beforehand, you could have dozens of events happening throughout the town without them actually happening in depth. You do need to work out an appropriate transistion before you collapse or expand the simulation detail, and you need to connect inputs and outputs of both (so that if you bargain with an NPC to do something, the system will resolve him doing it, just not at the same level of detail as it would if you were with him)

Think about how empire games work, the ones that let you abstract a battle or fight it in detail (Age of Wonders, for example). Then apply it to something beyond combat.

--------------------
Just waiting for the mothership...
--------------------Just waiting for the mothership...
quote: Original post by Tom

I''ll be damned! Implicit surfaces applied to a world simulator! Who would''ve thought something unique to graphics programming would squirm its way into the Game Writing forum and actual turn out to be an outstanding idea?


Ah, a convert, then? (j/k, you had me thinking all weekend about that scripting example... )

quote:
I think Firecat is looking at the next generation of RPG, when we start adding elements of a Maxis simulation to make the world more dynamic. The Sims functions a bit like what you said; each object in the house emits a usage signal, so the residents know where to go when they need something. E.g., the refigerator emits an "I have food" signal, and the stove emits an "I can cook food" signal. Without one, the other is just not very useful.


Agreed. I''ve been wanting to see this for some time now, because I want my RPGs to have the flexibility of my RTS games!!!

quote:
Now the only problem is getting NPC''s to think and act realistically in this new dynamic world. The evil villains will need a reason to destroy various components of a town, and the good citizens will need to react accordingly. Player influence has never reached such a profound level!


May I suggest once gain strategy games? Why does one side do anything to another in a strat game?

Look at the goals. Look at the strategies they use to persue them. What if story was strategy. Could it then be possible to perform evaluations (pathing, searching, etc.) on the story? You would not have to do this constantly, btw, and something like this could be in its own low priority background thread.

What you''re really looking for is incremental world changes. Right now, I''m trying to see if you can use something approximating turn-based strategy game AI to do this. But rather than armies and cities, the elements are characters and objects.





--------------------
Just waiting for the mothership...
--------------------Just waiting for the mothership...

This topic is closed to new replies.

Advertisement