little update on myself and rambling.

Development directions, tasks, and features being actively implemented or pursued by the development team.
Post Reply
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

little update on myself and rambling.

Post by safemode »

I'm sorry i haven't been really active lately. Though, i notice there isn't much activity from most other developers at the moment. It's expected that there will be lulls and highs in participation, so i'm not surprised. I hope real life cools down a bit for me to have time to get back into things, but for now that's just not the case. I have time to sit around on the forum, but not much when i get home to get into any real serious coding.

That being said, the game itself has never been something i've really gotten into playing.

Overall, i think VS is moving in the right direction. I like the path it's currently on and I do plan on getting back into coding for it as soon as i can. I just dont think i'll find myself actually playing much of it, but then again, i dont really find any games fun for very long to play. There are ideas in motion to make VS more exciting, but i dont think some of the popular recurring ideas are things that are going to exceed the initial awe factor that many game features have. The game needs to make the progression of the story the central focus and drive of the player, with the tools being trading and participating in missions, and the tools of doing those being strategy and skill and to a much lesser extent, the upgrading of your ship. The minute the focus or goal of the player is something that is finite, the game has failed. It stops being interesting and once reached, loses any point in continuing.

Obviously, the area of campaign writing is a lowly populated area. One needs a background in programming and an artistic talent for writing, and those are usually mutually exclusive skills. I think it's been far overlooked in favor of visual content, and I think VS is really hurting from a lack of campaign content. Not only in the area of player initiated campaigns, but in campaigns that get activated behind the scenes. I think the idea of a single overall directed storyline is a harmful idea that limits the game, unnecessarily. Rather than think of campaign writing like you're writing a choose your own adventure story, it should be written like a highly modular program. The story should be a function of these modules being activated/revealed by the progression of the player and AI in the game. Not the other way around.


ok my rambling is done for now.
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: little update on myself and rambling.

Post by chuck_starchaser »

I agree that story would add a lot more depth to vegastrike than visuals. I tried to get into the background documents, though, and couldn't get through them. A lot of facts to remember and no central "theme" to it, it seemed to me. Or, if that is as intended; perhaps the backgrounding needs more zooming. There has to be some struggle, some jihad that the player can identify with, feel passionate about, rather than just A loves B who hates C who loves D who hates A. A bit of mystery too, like D hates A but when A was in trouble with E, D helped them, and nobody understands why, and it's one mystery for the player to solve.

I'm also not into playing games. The only game that still turns my crank is Masters of Orion. I enjoy development and modeling more than playing.

Anyways, Klauss is off development until the new year, he said. He took a teaching job in addition to his full-time job and simply doesn't have any spare time at all; but he's quitting the teaching job at the end of the term. There's still the cubemaps to finish if you get bored :)
Deus Siddis
Elite
Elite
Posts: 1363
Joined: Sat Aug 04, 2007 3:42 pm

Re: little update on myself and rambling.

Post by Deus Siddis »

safemode wrote:I just dont think i'll find myself actually playing much of it, but then again, i dont really find any games fun for very long to play.
Are there any exceptions; games that have any replayability to you?
There are ideas in motion to make VS more exciting, but i dont think some of the popular recurring ideas are things that are going to exceed the initial awe factor that many game features have. The game needs to make the progression of the story the central focus and drive of the player, with the tools being trading and participating in missions, and the tools of doing those being strategy and skill and to a much lesser extent, the upgrading of your ship.
There's also exploration, mining/harvesting and combat, my own personal favorites.
The minute the focus or goal of the player is something that is finite, the game has failed. It stops being interesting and once reached, loses any point in continuing.
Well that's actually the one big weakness with storylines some say- when someone reaches the end of all of them, they don't have as much reason to come back to player VS upon the release of 0.7, 0.8, 0.9, etc. Whereas combat, trading within a dynamic economy, mining procedurally generated asteroid belts and planets or just seeing what's going on the in next system of the generally dynamic universe- those experiences are never the same each time and that keeps things relatively fresh.

Whereas with mission driven storylines, there usually isn't unlimited variation- you'll hear the same lines from characters and try and accomplish the same quests. Not that that is a problem for people like me; if a campaign has a powerful setting, powerful characters and character development, powerful situations and scenarios, powerful mysteries and twists and a poweful presentation, then I will play that campaign over and over perhaps on an annual basis, forever. It's like a good movie, something worth watching over and over.
Obviously, the area of campaign writing is a lowly populated area. One needs a background in programming and an artistic talent for writing, and those are usually mutually exclusive skills. I think it's been far overlooked in favor of visual content, and I think VS is really hurting from a lack of campaign content.
You can always split up the work- have campaign content creators and campaign scripters. Together they work out the overall idea of the campaign, then the content creators go on to write dialogue, draw and model, while the scripters script the events and triggers and occassionally add any needed feature to the engine.
Not only in the area of player initiated campaigns, but in campaigns that get activated behind the scenes. I think the idea of a single overall directed storyline is a harmful idea that limits the game, unnecessarily. Rather than think of campaign writing like you're writing a choose your own adventure story, it should be written like a highly modular program. The story should be a function of these modules being activated/revealed by the progression of the player and AI in the game. Not the other way around.
Now that would be cool. Maybe there could be a whole salvo of campaigns that only become available and are in fact triggered automatically by something happening in the dynamic universe; like say, the Aera begin winning the war in earnest.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: little update on myself and rambling.

Post by chuck_starchaser »

Dynamic plot/story production would be a damn good feature; but I'd just like to inject the thought that it is neither
necessary nor sufficient to replay value.

Not necessary:
You probably won't find a more linear game than Privateer, and yet myself, and everyone I know who played it, played
through it multiple times.
Why?
Because it was so enjoyable one wanted to enjoy it again. Just like there's been a few movies I went back to the
cinema to see them again. Just like there's been books I've read a second time.

Not sufficient:
There's been games I have not enjoyed at all, and stopped playing due to boredom. Some of them were RPG's.
By definition, an RPG would have tons of replay value since you can design your character in a myriad ways; but what
good is that if the game is boring? Strategy games have the most replay value of any, probably; but Masters of Orion
3 was so bad, that all its inherent replay value was for nothing.

I think the most important ingredient for replay value is play value; and anything else is icing on the cake.
And to have play value you need an engaging story, charming characters, mysteries, enigmas, conspiracies, riddles
to solve, and, more generally, a character you can identify with. I haven't played VS in a long time, so this remark may
be obsolete; but the last time I played VS, I didn't even have a face; let alone a personality. Compare that to playing
Privateer, where you know your face; you know you're a privateer; you know you're always after the money; you
have a sense of humor; you avoid notoriety, and don't think too much of the confeds. It doesn't matter that I'm
not like the character I play; I can enjoy being someone other than myself while playing a game; but playing a
game where you don't even know who you are or what your face looks like is kind of impersonal. One great motivator
in our lives is our sense of justice; --right or wrong. I'm not going to say that every game should have good and
evil, but to make a game (or book) where there's no clear right or wrong and still make it engaging takes a genius.
A book like Robert Fowles' The Magus is just one such masterpiece. Another is Robert Anton Wilson's Illuminatus
trilogy. What these books have in common is that you think you see clearly where good and evil are, at the start of
the book, but gradually you begin to understand things from a more profound perspective. But like I said, those are
masterpieces.

Anyways, I'm rambling. What I wanted to say was, I think you guys are taking a bit of a mechanistic approach to a
subject that is hugely subjective, rather than objective. Have you ever read a book where the plot is quite good
but characters are never properly described, physically or otherwise? I recently read one such book: The Sandworms
of Dune; the most recent Dune series book, but written not by Frank Herbert, but by his brother Brian, and Kevin
Anderson. It's probably the worst book I've read in like 10 years. I forced myself to finish it because I hate not
finishing a book I start reading; but it was the most painful book to read, together with the books by Peter Telep.
It's not that the characters are not described at all; but they are so simple to understand it's like you're dealing
with talking dolls or archetypes, rather than real human beings. You can't make good art by applying formulas and
techniques. Of course artists use techniques; but just as the needs of graphic artists ought to be what drives the
graphical features that are implemented; and the needs of sound artists what drives the sound features to be
implemented, I think it should be the story writers that should be requesting features. But right now, at least it
seems to me, nobody is writing stories; and all the features in the planet won't make the stories happen. And when
story-writers have asked for features they haven't got them. One such feature request that's come repeatedly, for
instance, is having dialogue choices; --like multiple questions to ask, or things to say. It was said to supposedly
be easy, not sure if it's true, but it wasn't done. I requested having the ability to read magazines in-game, and
had some magazine articles written, and there was a promise made of software to come that never came. And
I'm rambling again; but I think that the content for those dynamic stories and triggers and whatnot should come
first. When art is in the pipeline waiting for a feature, that's when a feature should materialize, IMO. VS right
now is all background and abstractions, as far as I've read. No personal stories. No heroes. Take Asimov's
Foundation series. Why is it such a classic? Why is it so engaging? Because it's one hero, then another, then
another... People who made history. In Asimov's case, his heroes are distinguished by cleverness. If you take
the novels of L. Ron Hubbard, his heroes are distinguished by decency and moral strength. If you take Superman,
the hero is distinguished by superhuman powers. Or knowledge of the jungle for Tarzan. But there's always some
people to identify with; a human struggle, and human virtues to overcome the struggle, and for the reader or
player to identify with. This is what is sorely missing in VS, IMO, and what needs to happen first. VS' background
is good and rich; but cold and impersonal; and no amount of features, background or plot can make up for a lack
of human aspects.
And not just heroes, but people in general. If you meet fixers and all you get from them is a mission then you're
not getting 1% of the potential game value of meeting a fixer. Each fixer should have a personality, a personal
story. Some should make you laugh, but some should make you cry. Some should make you angry. Some should
give you insights. It is a waste of a character to have them ONLY give you a mission.
IOW, you need to find GOOD story/dialogue writers, the kind that can touch people's hearts, and then let them
ask for what features they need or would like to see.

When features are implemented that are not driven by content creation, what happens is that they never get
used, or get used in embarrasingly poor ways. Take the news generation feature, for example. There's a few
stories that repeat and repeat and repeat with just the names changed, right? Or has that been addressed by
now? If the feature had been requested by someone working on news content, probably there would have been a
richness of content waiting for the feature; and more to come after its implementation, I bet.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: little update on myself and rambling.

Post by safemode »

well, the problem with implementation is that as a developer, you are always interested in making the foundation and structure of what you're building better and better. It's never good enough. Hence, you never get to put the furniture and stylistic touches that make a building great.

This eventually leads to the open source plague known as the rewrite phase. Before the project even gets to a non-beta-esque release, it's being rewritten. Sometimes this is necessary if the direction has changed, or a fatal flaw has been found from code used early on in development, usually however, it's because the developer considers the code to be too ugly and that a much better and flexible implementation would work better. This can loop around forever if it's not just stopped by a project leader and forced to move on. There will always be some new feature that we may want to add in the future that requires rewriting some lower level code to handle it.

At some point we have to say, this is what 1.0 VS will be like, and start working on the furniture. The fixing of the foundation and structure has to be pushed to after 1.0. It will never be perfect, that's why they invented numbers bigger than 1.0


Really what it will come down to is a shift of focus from C++ engine work, and then adding the python to take advantage of it, to python work and adding any C++ that is necessary to make that python function.

Some content features that i consider 1.0 important.

real dynamic news. News that is pulled from the game state, not simply pulled from a text file or anything lame like that.

dynamic events system. This is a C++/python base structure for handling everything from AI commands to campaigns. I've previously outlined it's api.

Concurrent campaigns. This includes interactive and non-interactive campaigns. Even AI characters can be given a campaign, providing for other characters to rise in prominence in news and such without having things become hard-coded. Non-interactive campaigns could be used for long arching storylines, which could cover multiple smaller, seemingly unconnected campaigns.

Massive number of fixers. These would be characters who not only provide missions/campaigns, but also simply give you clues and secrets. They would be used to reveal things about the player that could change the direction they take in the game. These would be helpful to the player, and not just filler.

History computer databank. In various systems the near-history of the ruling faction of that system can be accessed and looked at by the player on certain bases. This would reveal relations between that faction and others and possibly reveal motivations and any other significant characters that will show up in prominence. Added to any fixer secrets revealed, the player could unearth conspiracies.

Many more types of missions. in addition to the standard : patrol nav points, clear enemies, escort ship, trade cargo - type missions. Many more types of missions should be added. Specific mercenary type missions, including assassinations, espionage, putting bugs or generally mucking up station computers etc. Those would involve docking and punching in a secret key code given to you at the base computer and following the instructions given to you in your mission. In addition to those missions, i'd like to see rescue missions of people and cargo. Also, when the time comes, missions to participate in epic battles.

Finally, AI revamps. Utilize the dynamic events system, have the code to handle dealing with campaigns so that an AI player can be given the character of someone important to the game's story. Personality fields so that the AI can be customized on a per-unit level when needed for things like aggressiveness, morality, confidence, discipline. The AI should have varying levels of computation, much like mipmaps for graphics. Most AI units can be treated as a simple singular faction AI, just with varying locations and commands. Then we have the AI's that are close to the player. These AI's will also have their personality fields processed so that they behave more unique. Most will have generated fields based on their faction and number of kills etc. finally, there will be special character AI's. These are AI's that have been given a character to play in the story and they should be processed the same exact way the player is, no matter how close they are to him. Their personality fields are given by the character's initial values and get modified over the course of that character's experiences.

This is to say, rather than a singular AI that gets modified for every ship unit that has to be simulated, I would have the following.
A general faction AI that handles processing the units we dont really care about. (like how the current one works). The difference is, we make them separate for each faction so that we can keep the lists small and to help the dynamic events system send commands on a per-faction basis.

Then i would have a separate AI made for each special character described in the campaign (with additional characters that may be introduced later on to get their own AI spawned as well). This is to make sure that the AI is persistent, despite the character changing factions or such things.

The overhead in duplicate functionality is small compared to the cleaner processing and functionality provided by such a setup.
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: little update on myself and rambling.

Post by chuck_starchaser »

Sounds good; but don't forget to put bug-fixes ahead of new features. The biggest problems with the AI right now are general stupidity in following orders, ships moving backwards/sideways, and aiming infallibility: they come out of flying a loop in perfect alignment and shooting. That's not realistic; it's not believable at all. As someone was telling me the other day "it doesn't matter if their weapons are weak anyways", it makes you lose the suspension of disbelief, the immersiveness is gone, when you see ai's making maneuvers with a perfection no human player could hope to achieve.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: little update on myself and rambling.

Post by safemode »

Well, that's when the personality fields would go into effect, since it's close to the player.

Things like, aggressiveness, discipline would alter the aim. They would alter the value returned by the ray collider function used to determine where to point the ship to fire. This function returns the current position of the ship. Using things like speed (too long to deal with guessing speed the old fashioned way that we have to as players), it can be given random values for where to shoot within a range decided by the skill of that particular unit.

The other issue with how great the unit flies will be drastically altered with dynamic events. Gone would be scripted routines for flying around. Instead, the AI knows basic rudimentary means of achieving small goals, such as how to move to reach a destination, how to shoot to destroy a target, how to communicate to dock, how to match speed to follow. Then, we break what used to be singular routines into goals. We leave how to reach these goals up to the AI unit. We can make the AI single minded (stupid) or provide fallback goals that it can decide on each sim frame.

so something like looping around a target and firing would be broken apart like this:
event 1: move to destination 50 meters below target.
event 2: move to destination 50 meters behind target.
event 3: move to destination 50 meters above target.
event 4: destroy target.

All the time this is happening, defense routines could kick in at any time and cause a different set of events to come into play, depending on that particular faction/unit, the defense routines could cause it to run away, or return fire with evasive maneuvers.

These events would be part of a single event that can be labeled by the different routines that they describe. Allowing a ship to have a whole arsenal of maneuvers available.

another more advanced loop maneuver could have conditionals available to modify the maneuver.

Basically, we move from one set of events to another constantly during the battle. between, higher level events describing maneuvers to lower level events that tell the AI what to do to do what the higher level scripts are demanding (like "destroy target"). Events get nested until eventually we arrive at something that is fundamental. It works recursively, meaning once the lower level event is accomplished, we return to the next higher event and determine if that's accomplished, and so on. Once we finish an event in a list of events, we move to the next in that list.

What hopefully will result is AI units that fly more realistically, they fly in response to their missions. in addition to this, they will benefit from the ray collider which will give them a line to try and follow.

The other idea we can also implement is only allowing the AI to guess the location of your ship using the last known location and velocity vector. Basically, the AI unit saves the location of it's target every sim frame. When it's ready to shoot, it has to use this saved location and based on the velocity, it must guess at the current location of it's target. We can do this for everything, providing a sort of delayed response that we'd expect to see in a non-ai ship.

I think we'll see a huge difference with the ray collider and inserting the delayed response into the AI, then even more so if/when the events system is used.
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: little update on myself and rambling.

Post by chuck_starchaser »

This sounds so good I'm almost speechless.
And yet I have to object again; though now on different grounds.
I think that what AI needs is a customizable .dll; NOT Python; a .dll.
Why not Python? Because nobody knows Python. Everybody and their cousins can write C/C++; but trying to find someone
who can write Python is a lottery. Yet, having to compile the entire engine to make an AI customization is a pain.
A .dll (.so for *nix) would put an end to this eternal problem.
And so in this .dll there should be routines that define behavior, both at high and low level, and everything inbetween.
And why should AI be customizable?
Because whatever AI you write for vegastrike will guaranteed be unsuitable for PU.
Take the case of the kilrathi: According to canon from the novels, the kilrathi MUST know who amongst them killed an
enemy. Uncertainty about it cannot be resolved or negotiated. It must be known; otherwise honor will compel both
parties to fight each other to death, to resolve the issue. So when they fight they always take turns. Even on initial attack
they break formation one at a time.
It wouldn't be fair of me to ask you for special kilrathi ai for pu; and I can write c/c++. What I cannot do is compile the
whole engine; and I cannot write Python.
I think the way the AI should be organized is one .dll per faction; --e.g. pirate_ai.dll, confed_ai.dll, etceteras. Perhaps
chopped even thinner, like
pirate_fighter_ai.dll
pirate_corvette_ai.dll
confed_fighter_ai.dll
confed_bomber_ai.dll
confed_frigate_ai.dll
and so on.
In addition to fields and whatnot, of course.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: little update on myself and rambling.

Post by safemode »

python is gaining massive popularity since google's programming api is all python.

I have no real objection against doing it in C++... in fact, i think the low level stuff maybe should be C++. What might be done is simply allowing both. Some events may be native C++, some may come in as python objects. In the end, all python would be doing is describing a collection of C++ directives in a more readable and customizable format that wouldn't require a recompile of anything. There would be more overhead, so it would probably be relegated to higher level events, or new novel events that can be tested in python prior to being included in a C++ collection in some later release.

basically an event is simply a list of directives or events. So whether python constructs it or it's built by some other C++ code, the engine will see the same structure.

edit:

Yes, the way the ai works for mods that recreate games like pu and wc work completely different from the manner that they would function in VS. Probably due to the lack of cpu power in those days, the ai had to be coded with strange idiocincracies.

Still, they could utilize the new events system. it would just require some playing with certain attributes like discipline level. Since they are close enough to the player to fight, they would be processing this field of the ai. So, events can be forced to be followed with extreme certainty that they'd be followed to the letter, since kilrathi discipline would be maxed out. The trick then would be coordinating the attack. What can be done is the standard kilrathi attack event can check if any kilrathi ship is closer to the player (fighter ship), if so then we follow at current distance. If no kilrathi is closer than us, then we attack, either once or twice and then if the target is not destroyed, we run away to the standard distance kilrathi like to hold from a target when not attacking (basic event list would have had <move to N distance to target>, <attack target>). This moves through all the ships in that little group until the target is destroyed or no ships remain to attack.

sent to all units in flightgroup killz (3 kilrathi)
1. move to 1000 meters of target
2. destroy target
3. move to jump point N
4. jump from jump point N to system Y

the destroy target event in kilrathi land looks like this:
1. if target doesn't exist, exit
2. if closest unit to target, attack target. (the conditional only checks against wingmen, since flightgroups are static, we may need a new field for missions that group units together. Attack target only refers to 1 attempt)
3. else move to N meters of target and match target. (This tells the unit to basically mirror the target's velocity vectors to keep distance. It is completed each frame so it wont restart).
4. restart (needed to restart events that exit each frame but may not be complete).

the event obviously gets interrupted by sim frames, the last event not completed restarts on the next frame. Certain base functions that dont require any further manipulation by higher level events exit after one frame, but their commands (like any base event ) stay in the AI until replaced by new AI commands. So, we can say "match target" and forget about it in the events world, but the AI will continue to match the target until we tell it to do something else. It's an interruptable approach, where as we can make it un-interruptable by placing the match command inside an event that ends in restart. Then it would require a higher priority event to interrupt, ship nearing death via attack or some other overriding situation (target destroyed, docked or jumped).

Obviously, this is a gross simplification of the type of handler needed to deal with events. Suffice it to say, that they should be flexible enough to allow units great amounts of say in what gets done but they should also be able to via unit and event coordination to hard-script actions like in the old games. That is to say, if i max out discipline and make the events of the highest priority, i should be able to depend on the actions being carried out as scripted in the events. How scripted the events are is totally up to the writer. In VS, they would be much less fine grained than in the recreation type mods. Think of it like a moving between parallel execution or linear. VS would be crazy parallel. PU would be very linear. Both should be possible to create with events.
Ed Sweetman endorses this message.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: little update on myself and rambling.

Post by safemode »

so what would happen with our 3 ships would be the following.
they would travel to 1000 meters of the target, obviously one would reach this point before the others and proceed to the next command in it's event queue. The others who process the next command after the first would see that the first has progressed closer to the target than them, and hold position. Perhaps flying around back and forth while waiting. whatever.

The first ship would go in via some various method of attack (this would be totally up to available attack vectors provided by the mod, either random selection or some other means). It makes one pass, or more depending on what you guys decide, then decides if it failed or succeeded. Either way the destroy target event is restarted. If it still exists, it returns to 1000 meters from the target.

all the while this attack was happening, the other two ships were getting sim frames too, but they kept seeing the first ship as being closer so continued to wait. If the unit had been destroyed, the destroy target event would have exited and the next event would run, such as return to base or whatever. The same would happen to the first ship as it returned and restarted it's destroy target script, if it survived.

If the first ship returns or is destroyed, the other two will be closer to the target and one will be the closest. It goes next. This happens over and over until either the target is destroyed or the 3 ships are.

The only thing that i dont see an easy way of controlling is that they all go in turn. It will be random between the two not making a return back to the distance the others are waiting (due to momentum, that ship will likely overshoot a bit and always be further away, so it wont get put right back in to battle Hopefully). I dont think this would be a real problem though.
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: little update on myself and rambling.

Post by chuck_starchaser »

Sounds good; but it may be simpler to implement:
Say, in a flight-group, probably the ships have numbers, right?
And the fighting AI is probably a state machine.

Code: Select all

state approach_target
{
  ....
}
state fire_on_target
{
  ....
}
state fly_away_from_target
{
  ...
}
state wait_for_turn
{
  ...
}
All ships in the flight-group except the first go to state wait_for_turn, while the first enters the state machine at the top.
As soon as his state is fly_away_from_target, the next ship goes to the first state.
Keep in mind that here we assume that the three kilrathis are attacking a single confed ship. If there were 3 confed ships,
they'd pick one each.
In fact, this is the biggest handicap of kilrathis; they cannot defeat an enemy "in detail", which is the military term for the
strategy of multiple units concentrating fire on one enemy at a time in order to dispatch them quickly and thin out their
numbers.

AI is such a broad subject...

I'm not sure exactly what you mean by discipline, but in WC, Christopher (Maverick) Blair and Todd (Maniac) Marshall are
polar opposites in that Maverick full-hartedly believes in following flight academy instructions, whereas Maniac doesn't
believe in their instruction at the academy at all. Yet they are probably the two best confed pilots; except for the fact
that Maniac doesn't make much of a wingman or team-player. A good AI system would be able to model such wild differences
while still making them fly distinctly like human fliers, as opposed to kilrathi, for instance.

And AI also covers such things as destroyer AI versus frigate AI versus cruiser AI. And cruiser AI should be very different if
the cruiser is part of a fleet or operating alone. When capital ships are part of a carrier fleet, their priority ought to be to
defend the carrier at all costs.

Cargo ship AI. Spiritplumber implemented cargo ship AI so that they'd fight until they started getting damage; then they
flew away leaving a trail of units of cargo. :D That was a riot and would be great to see again.

Station AI: Presently, ships arriving at space station magically move through walls, and have a nasty habit of poking their
noses through the walls into the parking lot right when you're parking. I also see more than one ship occupying the space
of one. Would be nice to have some kind of station AI that routs arriving ships to un-occupied ports; and maybe also
gives them a list of way-points to follow so they don't have to use magic tricks and fly through rock.

Speaking of parking, approaches and kilrathis, the kilrathi have a ship, the Kofar, which works as a mobile
extension to a carrier. Not only it would require its own AI, but puts an additional challenge/opportunity for carrier-based
fighter AI.

Last but not least, formation flying AI is a disaster right now. If you tell a ship to follow you they follow you at a precise
spot and distance regardless if there's an asteroid right in front of them. There need to be layers and priorities in AI;
self-preservation should be more important than keeping an exact position.

The important thing about all these examples is not to code them, though, as much as thinking about the interfaces
and data structures.
I still think the best idea would be to have a set of dll's by faction name x ship size classes that can be modded and
recompiled. And I insist, C++ would be much better than Python. Maybe python's popularity is on the rise, but in absolute
numbers, python programmers are as easy to find as 4-leaf clovers. At PU we don't have a single python programmer,
whereas we have about half a dozen people that know C, at least, and one that knows C++ for sure.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: little update on myself and rambling.

Post by safemode »

discipline would be the attribute for a given unit that tells the ai how likely it is to follow the event or keep doing what it was doing. Every single event is essentially optional for the unit to follow.

Defensive events would be triggered by the ray collider if an object is obstructing the units path. What we'd have to do is construct a script that would deal with moving around obstructions. Basically, using the ray collider to map out a path to continue on course.

For the most part, by using events to control the AI, along with attributes particular to the unit, itself, we'd be able to have tuned AI routines per ship type etc without having to hard-code various AI routines in-game.
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: little update on myself and rambling.

Post by chuck_starchaser »

Sounds good. Not sure I get the full picture; but as long as it is moddable and documented it will be much better than what we got.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: little update on myself and rambling.

Post by safemode »

Well, units would be inserted in the game with some attributes to go along with them. These get stored in the Unit base class. These would be chosen based on the script writer's choice. Usually by faction, but some hand picked units may be generated with unique attributes to play as certain important characters in-game.

These attributes can mutate as the game progresses and the unit interacts with other units. They basically control how likely the unit is to follow a command in an event, and it controls how well it follows the command if it's chosen to do so. It would even dictate what events get retrieved in certain situations, like in choosing fight or flight and such.

In addition to these attributes, certain functions of the AI are pooled into groups that are separated by faction/ship type/ etc. IN addition to that, the faction may have it's own AI that would act as "the central government" in providing events to ships of that faction, which would thus be retrieved from a pool that is different from other faction's.

So this leads to a _very_ distinct separation in responses, actions and behavior between factions and slightly less of a distinction between units within that faction, except for special characters.

Of course, there would be a "common" pool that had generic events to cover for any faction/ship type or whatever that didn't have it's own specific pool of events to grab from. This would allow differentiation to be worked in over time, instead of having to do it all at once.
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: little update on myself and rambling.

Post by chuck_starchaser »

Sounds wonderful. In fact, having fleet-level and flight-group level ai's would be even better: A carrier in a fleet would carry the
fleet command ai. As it launches flight groups it gives them destination, mission and priorities. Then the leader of each flight-
group would have the flight-group AI, which decides on some way to carry out the mission and commands the other ships in
the flight group.
I'm not sure how confident I feel about ALL ai behaviors being controlled by variables. I still think that the code should be in
dll's to be easily moddable.
One aspect of ai that must absolutely be controlled by variables, though, is all stuff relating to difficulty settings.
Preferably as variables that modify other variables used by the algorithm, to try and keep difficulty related code away from
the moddable ai and avoid polluting it with too much stuff.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: little update on myself and rambling.

Post by safemode »

It's not necessarily all controlled by variables, but a few variables do decide on how well the AI executes the events given to it, and can alter from what pool the events come from.

On one end of the spectrum, you'd have the units behave like pawns. this is ideal for games that recreate older games with highly restricted AI's.

On the rest of the spectrum, you'd have units that gradually behave less like pawns and more like real players. Commands and such passed down from higher up may or may not be followed by the commanded unit. A faction's stereotypical behavior may or may not be followed by a given unit in that faction after some time. Basically, the game dynamics become much more fluid and undefined. We'd allow the universe to balance itself, which might be better than any sort of synthetic balancing that we'd be able to do in scripting out the gameplay.

It kind of gives the game a life of it's own in that we have very few tunable variables and a plethora of available events and let our guidelines given to how the universe functions, correct itself. We can at times insert disruptions in this balance, via the campaign storyline, but allowing the universe to function in this manner allows it to behave much more realistic. How realistic is all up to how good we are are creating the events and conditionals controlling the AI.

I'd like to see a range of these units across the game. Some that will behave like pawns, some that are totally rogue and everything between.

The way it would be implemented would have to follow this order i think:
1. Event subsystem created. Python hooks for campaigns/missions to send events.
2. Ray collider support.
3. AI hooks to ignore commands and follow events when events are recieved. (this allows old method to work if no events are used in a mission/compaign)
4. Write events for more and more actions/missions/campaigns. Remember: an event is the most basic directive, to a list of directives, to a list of lists of directives. etc. it can be recursive.
5. Differentiate AI's. This only refers to pools of events, not any actual change in AI methods. eg, Military fighters, merchant cargo ships, pirates. etc.
6. Create the faction AI and special character AI. these have different methods than normal AI's. The faction level AI acts as a commander and looks at a larger picture and has different goals that relate to the faction's success. Special character AI have specific special events and they aren't bonded to a given faction for the entire game. Thus, they must retain behavior across faction changes and such.
7. Fully work out the optimal balance of the tunable variables and events. This requires a totally functional campaign.
Ed Sweetman endorses this message.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: little update on myself and rambling.

Post by safemode »

basically, your dll's would be directories of python scripts.. . Unless it's determined that there is a fairly easy cross platform way to modularize that wouldn't peg us to specific versions of such api's on different OS's.

Making a runtime loadable module in linux is EASY. Making one in windows or mac, I have no idea. Making them all use the same api, who knows. Having them get built by the same makefile, well, i'm sure cmake may have some solution, but outside of that it's likely to be very different on each OS.

In any case, such features could be ported from the python code at a later date. It's much easier to make such modifiable code python for now.
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: little update on myself and rambling.

Post by chuck_starchaser »

Again, this all sounds fantastic.
Maybe, I might suggest to extend the AI layers upwards to faction central military AI and government AI.
This could finally replace the current (intractable) python code for universe generation and dynamic universe updates with regards to the
spawning of flight groups. The current system is undocumented and utterly impossible to understand.
I'd also like to inject a caution about making bold assumptions about the desirability of having a totally dynamic universe.
While this may be totally desirable for vs the game; it is not necessarily so for every mod, and the engine needs to take that
into consideration.
PU happens in the greater WC universe, whose history of the war is a matter of canon. We cannot have merchants suddenly become
enemies of the confed any more than we can have New Constantinople destroyed, or New Detroit fall to steltek control. We cannot even
have Perry be overwhelmed by the kilrathi. These things did not happen in WC history.
We tried to implement a semi-dynamic universe, about a year ago, while making bases, like Perry, virtually invulnerable; but the result
was that the kilrathi kept trying to overwhelm Perry, and you could not even enter the Perry system anymore, at some point, as the
whole sky was red with kilrathi ships.
The system should be such that a mod can adjust harrassment levels per system, perhaps; bottom up logic: If this system is not to be
taken, then strategy should be poor enough to ensure it doesn't get taken, or something along the lines.

Dll's are extremely simple to produce. Much simpler to build than executables, in fact. A friend of mine once brought me a game to try
but when running it it complained about a missing dll function used for network playing. I fired up the compiler and created multiple
do-nothing functions by the given name and accepting different combinations of input parameter numbers and types and returning
void; then copied the whole thing again and replaced void by int and made the new group return zero. Just a do nothing dll with about
2 or 3 hundred overloads of the same function. Then compiled to a dll, ran the game, and it worked. A 30-minute job.
My friend was impressed. :D
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: little update on myself and rambling.

Post by safemode »

Well, by setting the the discipline attribute to be maxed out during unit creation, you should be able to mimic the behavior of a simplistic ai where it's given no choice but to follow orders.

In VS the game, this would be hardly ever used. In certain mods, this might be used throughout.

The trick with making certain things impossible in some mods where you dont want certain actions to ever occur, no matter how the player tries manipulating it to occur. Events could be made such that attacking certain bases/units would yield specific event scripts that would cause the desired outcome to occur.

In the end, it's nearly impossible to make certain hard-restrictions like what you describe in pu, and what existed back in the WC games without making it obvious that you're artificially enforcing or disallowing certain events from occuring, like the taking of perry or such. The scripting will have to be done much more carefully than in VS.

In VS, we may have certain things written in stone, like the rise and fall of powers and outcomes of wars, but how those ends are reached can be done by an infinite number of ways....and those ways can be left unwritten. Eg. Say we know in the war the game is taking place in, the aera are destroyed and beaten into submission. Yet, in-game, players are finding the aera are overrunning the other powers and it looks as if they're unstoppable. Well, what happens is after the period the game covers, something apocalyptic happens to the aera and it provides the means for which they are then defeated and beaten into submission. Etc. The game covers very little time, we can have anything occur after it to bring the state back to a level of canon. The problem is when people get too damn writer happy and want to outline every minute detail of the history that the game covers. It leaves nothing of interest any room to move around. You might as well shoot yourself in the foot. Might as well play a game based on a movie.

There's a reason why in WC they made a lot of games that take place in "secret missions" or covert ops. Or why new games take place in distant pasts or futures or in previously completely un-interesting areas of the universe. Detailed written canon is a plague to any new content. Luckily in VS, we hopefully still have time to keep that to a minimum.
Ed Sweetman endorses this message.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: little update on myself and rambling.

Post by safemode »

it's all just an idea until some real code gets written and tried out.

I have had threads in the past with some in depth pseudo code. Basically, that comes to down to more important and bug related fixing that needs to get done. Though, i think if a move is made to get some real campaigning done, then this would be a very necessary feature to think about because it would result in writing the campaign and missions totally different than if there was no dynamic events system.
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: little update on myself and rambling.

Post by chuck_starchaser »

Well, it's a matter of taste. I like dynamic universes in games of strategy, myself; I don't care much for it in other types of games.
Particularly in Vegastrike I wouldn't care, since, the times I played vegastrike I did all my trading while moving across the whole
map, to get to explore the universe; so I see a changing scene anyways, regardless of whether there's dynamic change or not.
IMO, a dynamic universe would make a lot more of a difference in PU, where the universe is tiny compared to VS's. But we can't
have one, for canonical reasons; nor do I care much for one, personally.
It was actually Spiritplumber that was really keen on giving PU dynamic elements, and she didn't finish the work she started, and
like I said, Perry became impossible for the player.
If we could just control the probability of a ship or flight-group of faction x at system y per-physics-frame, that would probably
better than what we have now, which we don't know what it is or how it works. Not to speak of those python files where, to
control the relative probabilities of ships of each type to spawn, you have to repeat their names multiple times. How ridiculous
is that? What if I want to have a ship be so rare to find there's a 50% chance to have seen one after playing the whole game?
(Yes, this is something we want to do with several ship models, in fact.) With the current system, I'd have to put that ship once
in the line, and repeat all the others like 700 times.
This whole thing needs to be rewritten from scratch, with full prejudice and no preconceived notions; and use numbers where
numbers belong.
Maybe spawning rate could be a sum of a static probability and a dynamic system, with a variable to lerp between the two.
If you put the variable at 0 you get a simple probabilistic spawning. If you put it at 1, you get a dynamic universe. And I might
try 0.1, then.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: little update on myself and rambling.

Post by chuck_starchaser »

This is kind of OT, but, could collision detection use gpu power?
Certainly AI could, like to compute which units are in the visual field of which other units.
The OpenCL specification just came out.
http://www.khronos.org/registry/cl/
Not just gpu power, but this could also help use multi-core processors without multithreading.
OpenCL looks at multiple processor cores as well as gpu's as computation resources.
http://www.khronos.org/opencl/presentat ... _Nov08.pdf
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: little update on myself and rambling.

Post by safemode »

We're already heavily gpu bound with the shaders. Adding more to the GPU would leave the gameplay up to the 2% that actually have fast enough and expensive enough hardware to handle it. Duplicating the functionality duplicates the maintenance load, so having both for a very rare minority while doubling our work doesn't seem to be very smart.


Perhaps in a year or two when the hardware is commonplace, this will make more sense.


A dynamic AI would be much more intrusive to the play of the game than simply jumping around in the systems. Gone would be the robotic and synthetic behavior of ships sitting around jump points or predictable attacking etc. They wouldn't do things that dont make sense. You could still mimic the old behavior, but you'd have the option in other mods (like vs ) to use the new events and ai to the fullest extent.

And for the number of systems, we really should scale that number better.

Low power should have maybe 1 system active, and roughly 1-40 units active. Total systems in game, maybe 100.

Medium power should have maybe 3 systems active, roughly 1-180 units active. Total systems in game, maybe 500.

high power should have maybe 6 systems active. roughly 1-600 units active . Total systems in game, maybe 3000

Super high power should have maybe 10 systems active, roughly 1-1200 units active. Total systems in game, maybe 7000

i also think the game can and should, detect the number of cpu's available, and spawn that number of threads for processing off-screen systems. That is to say, the current system would use the primary cpu, then other systems would get put on a worker thread that the OS could swap to another cpu if needed. Thread safeness would only need to be done when a unit jumps to or from the current system from/to one of the offloaded ones. This should be fairly easy to handle.

The numbers of the above were just pulled out of my ass. it's just meant to be an example of how scale in the size of the game should be better matched to the abilities of the computer. And by using all the cores in a computer, we should be able to scale a consistent universe much better, since many more surrounding systems can remain fully rendered and processed, rather than swapping them out and dealing with much less otherwise we negatively impact the current system. It also means, the current system can be quite complex, now that we dont have to worry about offscreen processing taking up much of our cpu time.

As for the spawning. I haven't ever looked at that code.
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: little update on myself and rambling.

Post by chuck_starchaser »

safemode wrote:A dynamic AI would be much more intrusive to the play of the game than simply jumping around in the systems. Gone would be the robotic and synthetic behavior of ships sitting around jump points or predictable attacking etc. They wouldn't do things that dont make sense. You could still mimic the old behavior, but you'd have the option in other mods (like vs ) to use the new events and ai to the fullest extent.
The prospect of having AI's not do things that don't make sense is attractive enough I'd be willing to bend WC canon in PU for it. There has to be a reason and a plan for a unit to attack you, more than just "because it hates you". It should only do so if it perceives it has a chance against you, first of all. Pirates should always give you a chance to drop cargo willingly first, not shoot first and ask questions later. And so on.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: little update on myself and rambling.

Post by safemode »

Indeed, it would seem that the general mode of pirate attack would be to sneak up on you. Lock weapons. Communicate their demands. Wait and if you dont do what they ask, or try getting away, they open fire.

It's much more likely to get good cargo if it's dropped, than if you destroy a ship and hope it's not damaged or destroyed.

Though, sometimes if you're recreating an older game, certain things have to be done that dont make sense. Because, the plot of the story, and thus canon, has flaws. Flaws are unavoidable when you combine detailed accounts of what goes on in a game with the unpredictability of a player acting in that timeframe.

For instance, perry keeps getting taken over by the kilrathi, but the canon says this doesn't happen. Why? If it's happening so easy in the game, what's different from the game's state to the canon's? If the dumb AI can defeat perry so easily, something is off, either in the game, or in the canon. The game can be adjusted if it's found to be in error, but if it's the canon that makes no logistic sense, then we have to fudge the game, and that's where players come up to stupid situations where a ship is not able to be damaged, or actions you normally would be able to do are locked out if you go out of order.

In VS, we have the room to make our AI and campaigns without such restrictions. I'd hope we'd have zero situations where going out of order leads to strange impossible things needing to be done to keep the poorly written campaign from falling on it's face. Back in the day, they needed to do that, and recreations would have to mimic that, but VS (the game) doesn't and shouldn't need to.
Ed Sweetman endorses this message.
Post Reply