A-Life Lite - Simulated A-Life Events

Started by SGT-Spartans, 19-01-2021

0 Members and 2 Guests are viewing this topic.

SGT-Spartans

Hello,

Intro
I'd like to preface this with a forward admission that I do not have much experience developing for GMod. I have reviewed some easy readings, most of what I am discussing comes with my experience with microservices and database development from my day job.

A-Life is the key factor in differentiating STALKER's emergent gameplay from other sandbox games of its time, and even the sandbox games of today (looking at you, Cyberpunk). It created a living breathing zone, and made every playthrough unique. Unfortunately due to Gmod server limitations, implementing this would need to be extremely limited and scaled down.

Stalker A-Life

The stalker A-Life system - at a glance - consisted of a few primary components:AI branching decisions and rulesets, Offline/Online A-Life simulation,  and Smart Terrain. To keep my post short and sweet, please do further reading here for a quick high level overview: https://blackshellmedia.com/2017/08/12/a-life-an-insight-into-ambitious-ai/

The feasible part for Gmod would be the Offline A-Life simualton. This is system requires the least amount of server resources. Think of this as a simulated background process - while there are no NPCs or active animations to show whats going on, it can create and active economy/interaction between traders and static NPCs. Sort of a simulated "story" of the server. It does not need to run via Gmod, thus is not consuming dedicated Gmod server resources.

This offline system can be ran on an cron or task scheduler. My idea would be to have a few discrete components: rules engine (defines rules and interactions), the events queue, the events manager (ran on cron, kicks off events based on schedule/rules), events, NPC data files, global data files, and player data files.

The system would operate like so:

1. Rules defined in Rules Engine (player interaction, NPC interaction/decisions)
2. Events - Define the effect of the event - Trader gets new item, new mission for the day, disposition changes etc.
3. Events Queue - Regularly scheduled events that are kicked off by the event manager, as well as taking into account events queued by player interaction on the server.
4. Events Manager - Service that actually executes the events, applies. rules and effects to data files.

The Gmod component would simply be reading and writing as the event manager is refreshed, and as actions in the service create new events.

In the scope of SRP, and for the sake of brevity, lets water this down to only Trader/Bar NPCs. Traders/Bar NPCs can trade and assign players basic objectives - fetch this at X location, deliver "x item" to "Z Stalker". For the inventory of traders, this simulation can run in the background and update - like an inventory refresh - based on events in the simulation.

Based on player interaction, rules, and events queued/created, Trader's inventories can look very different day to day. Gmod pulls the existing NPC datasheet, which would include inventory and other details, and refreshes as the events manager refreshes. If an interaction in Gmod would cause an "event" to be created in the event, the event queue would be updated.

-- TBD, wrote this in a rush. Feedback is still welcome, just need to organize my thoughts on this more as I'm starting to talk in circles/lacking clarity.
SRP chars:
Vasilli 'Vasoline' Nikolaev - Freedom - Alive
Aleksey Ipanov - Spooky Trenchcoat Man - Alive
'Pale' - Bloodsucker - Alive