Prespawning from Seamless ATs

Scripted ALFA systems & related tech discussions (ACR)

Moderators: ALFA Administrators, Staff - Technical

Locked
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Prespawning from Seamless ATs

Post by AcadiusLost »

We should be able to avoid visible spawn lag quite effectively in exteriors connected by seamless ATs, by calling the spawn system to activate the adjacent area as the PC enters the seamless AT trigger, as the AT process won't even begin for another 3-6 seconds (assuming the PC doesn't "abort" the AT process by stepping back out of the AT).

However, I realize that this may introduce a hole in our defenses against ATing into hostile spawns- the spawn system is checking for PCs within visual range of the spawn target (but the PC won't be there yet at this point), and the Seamless AT system is checking the PC's AT destination for nearby hostiles (but they won't neccessarily be finished spawning yet by then). So, there may still be opportunity for the PC to sneak in, right in between the two countermeasures, and appear right next to a hostile.

My thought was that the first event will be determining the PC's putative AT destination (happens before the prespawn call, since we need to know which area to prespawn)- at this point the PC still won't be moved for 3 seconds- but we could create a waypoint there immediately, prior to the prespawn call. Then, the spawn system could be called, with a modification to the "check if a PC is within visual range" test, to also check for such waypoints. The waypoint could be destroyed after the PC "leaves" the seamless AT, to keep them from cluttering up the areas.

Sound reasonable, or does a simpler / more elegant solution suggest itself?
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

My preference is to only spawn when PCs are within a pre-defined proximity of an encounter. I would rather the CPU expend energy spawning things in and out dynamically than controlling AI and pathfinding for all sawned mobs in a 24x24 area. A good radius is 50 feet...far enough away to appear somewhat realistic, but close enough so that mob numbers are kept low.

Once the PC moves beyond 50 feet, the mobs are despawned.
Image
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Post by AcadiusLost »

Hmm, well I've got an option in the new version of the configuration file, acf_spawn_i.nss, which allows folks to disable the seamless-AT prespawn behaviour, but currently spawns are active on a per-area basis- the way I understand it, running a proximity-based approach would require continual rechecking of all PCs with respect to all spawn points, and would be somewhat limited in effectiveness with our current pseudoheartbeat implementation (if it's only checking every 20-40 seconds, it's likely the PC would be right on top of the spawn by the time it fired).

Notably, the spawns under the current system just stand there (no random walking/pathfinding) at this point, as that trends into AI systems, which I know very little about so far. So, on the plus side, they aren't taxing the server with pathfinding (unless they are chasing a PC), but they're easier targets to start with from stealth.

I think we'll need to have some testing in a beta mod environment to get a better idea of what is needed to keep lag and system resource hit low.
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

Cool bananas.

I've looked at the spawn system mod and AT demo. It's good code and effective. I'll use the AT system for sure, although I'll need another exterior before I get to use it in our mod.

Given your above post, spawning into hostile spawns is best avoided by simple area management when building. Never put a spawn point within 50 feet of an open border.

The spawn system has some interesting options, but I couldn't explore them much owing to a basic WTF does that do factor. Will continue to play.
Image
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Post by AcadiusLost »

I left most of the documentation on the wiki in it's original pre-coding Ronanese- makes perfect sense to me, but then again I learned it from the inside out. If you could let me know which options don't make sense within a 2-3 second glance, I'll see about rewording them to be more intuitive- we're trying to make the system pretty accessible to new builders if possible.

http://www.alandfaraway.org/docs/Technical/ACR2Spawn
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

Ahh...yeah, that's very similar to the functionality of the MPWC documentation...I know Ronan and Mykael were both basing theirs off Knat's spawn system, so no doubt they're both similar to Knat's. I'm currently still using the MPWC but will switch to ALFAs now that I see the functionality is pretty much identical.

The wiki entry is fine as is.
Image
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Post by AcadiusLost »

Back on-topic, these are working nicely now, I even managed a nice fix for the potential exploit re: meta information from the spot check.

New version will be in the next testmod, and the first early ACR release.
Locked