🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

The Tree of Death

Started by
59 comments, last by Landfish 23 years, 3 months ago
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!


Why not take a note from the Sims and have each building emit a signal of either "Good ppl dwell here" or "Evil ppl dwell here". That way, evil ppl know what to burn down (goodies) and the good ppl know where to avoid (baddies).


NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ...
"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick
Advertisement
Abstractions were something I was thinking about too. On the one hand it makes sense to have an abstract object like a town; Some values, like town morale, you can''t really pin down on a particular object. On the other hand, abstractions are generally things that you would have to script in from the begining, which is bad. Say the player founds a town on some island, if the abstract "town" object is something that you script in from the begining, then the player''s town is never going to become a "town", even if it has all the same elements. If you go the other way and try to make the "town" object something that is dynamically created, then your faced with the question "at what point is it a town?" I think that with some work you could probably make some kind of tech tree-ish thing where "if it has this and this, then these values are created", but I''m not sure if that''s the right way to go or not. Another thing about abstractions is that they''re just that, abstractions, they don''t exist. They''re just a generalization of a group of objects "this creates a town, a town has these characteristics, a town does this kind of things", when really, a "town" doesn''t exist, it''s just a lot of small objects working together that create the illusion of a larger thing. Of course that can be said about reality too, when you come down to it, your an abstraction. Your just a lot of little cells, working together, that make the illusion of a larger whole, which are themselves made up of even smaller particles working together... *shakes head* ANYWAY, some level of abstraction is obviously needed, we can''t go around computing what all the particles in the world are doing, but I think that the less abstraction you have, the more interesting your world is going to be, and the more likely it is that your game will be able to suprise you.

About NPCs...
I''m not sure about "smart" and "dumb" NPCs. There''ll be smarter and dumber NPCs, but making an arbitrary distinction between the two... well, I already voiced my opinion on abstraction . I can understand where your coming from though, the rogue lord Razont is probably going to be more interesting then a farmer named Bob. What''s more, there will probably be a lot of farmers like Bob and only one rogue lord like Razont. But if one of them dies, they will both have a consequence on the same scale, just of a differing magnitude (that makes perfect sense, really...).

I think you have a better handle than me on the story system Wav, it sounds good.

What I really want to think up is a sufficiently abstracted (in the good way, or maybe I just don''t know what abstract means) object system, so that it can be adapted to any system we can think of, be it a story system, a town system, stealth, whatever. For example, all objects would probably be able to do passive emmition of some sort, they''d have a list of all actions they could perform, etc.

Sorry if I got carried away anywhere.

-Firecat
NPCs could have two relative strengths, a smart view and a dumb view, where a human peasant and a human wizard might appear the same to a dumb NPC, but a smart NPC can tell the difference.


NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ...
"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick
Dangit, I''m an amateur, I don''t have to think about this "programming reality" stuff. All NPCs will have complex personalities, complex interactions, and an aunt named "barbra".

There.

-Firecat
I thought she was called Barbara?


NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ...
"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick
Right... um... well, it''s a long story that you probably don''t want to know, but now they just call her Ed.

-Firecat
Well, I can share with you what I *think* I'm going to be doing...

It's an SF RPG composed of 1 to around 200 or so star systems. There are seven empires, and up to seven factions (rebels, trade guilds, cults, etc)within each empire.

The star systems function very much like villages. They're owned by empires or unclaimed. Within each system are a number of system objects like bases, planets, etc. that are all akin to buildings.

Starships of various make and model flit between the "buildings." They'll be my NPCs. Because they're inanimate objects my task for making them realistic is a bit easier. (Heh, or so I think.)

First I determine the overall stats of an empire (things like trade, military strength, diplomatic leanings, etc). This filters down to each system, and to what the player sees.

Take a single stat: military strength.

The total amount of this is broken up between stellar "villages" based on the status and AI of the empire. If it's at war, or about to attack, for example, most military resources will be allocated near its enemy's borders. Once initialized, these values can change over time (to reflect internal movement, like massing to or returning from the front).

When you get to any given system it has to figure out what's there. The game will do so from the stats: high military, and the "village" will be swarming with a strength equal to the military power, cooked up out of thin air, and preserved for awhile for continuity's sake.

Buildings and such in the "village" work the same way. Each kind has a varying "strength" No stats is an abandoned, empty system devoid of life, planets, or ships.

In Part II I'll deal with AI...



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

Edited by - Wavinator on December 19, 2000 2:23:15 AM
--------------------Just waiting for the mothership...
Okay, AI: (last post was getting long, sorry)

My hope is to devise a kind of RTS AI for the NPCs (ships) and the village (star system). One great thing, though, is that I''m not straddled with fast paced build or production decisions, only unit movements. So a complex layer of strategy that would chew up cpu time goes away.

The "village" is made up of a bunch of interacting parts. Solar Collectors, for example, gather power and beam it to different structures. Some structures, like mines, ship raw materials to orbital factories, which in turn convert them to products, and send them to stations for retail. The system operates like a great (interruptable) chain. This all happens in real time.

I see the NPCs and buildings being able to emit information like in the Sims. Each object can have multiple emitters that it puts into a "mailbox." Objects read from that mailbox over time. For instance, if an object is on fire it might emit a distress message, which would be read by rescue / firefighter objects. They''d be drawn (based on their own status) to the emitted ''signal'' of the object. (Here signals work literally, but they could also be things like "Hey, I''m carrying illegal cargo, can you see it?" or "Hey, I''m your enemy, want to kill me?")

Signals can contain lots of different info, and priorities as well. I''m not sure if this will be efficient for fast AI decisions, however, like combat responses. It seems to me that agents should respond not just to signaled stimuli, but an internal state as well. In fact, the internal state could determine what signals the AI agent responds to. For example, an AI militia pilot might get a signal to attack a target, but also be severely injured. In this case, his internal filtering might lead him to search for the closest "healer" signal and go there.

Not sure if this is making any sense...


--------------------
Just waiting for the mothership...
--------------------Just waiting for the mothership...
It sounds cool. I''m a bit sleepy though so I''m probably not understanding you fully.

The message box sounds good, it makes sense for NPCs and such.

I''ll have to think about this more tommarow, I''m sleepy.

-Firecat
It makes sense You would also eliminate pathfinding and a lot of blitting.

Alternatively, have you considered using a global distribution node for each planet? Have all messages from a particular planet, (or categorise if you wish) transmit to central messaging system which correlates the data and sends out a single, data-rich message. This way, the AI can read ONCE and get all the information they need.

One thing : You said you were using an isometric map. Are you using a z value, or just one layer?


NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ...
"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick

This topic is closed to new replies.

Advertisement