AlbianWarp / AlbianWarpClient

Albian Warp Client component!
http://blog.albianwarp.com
GNU General Public License v3.0
9 stars 2 forks source link

Expanding DMAs/RTMDAs to include a mesg-writ function? #37

Closed Amaikokonut closed 4 years ago

Amaikokonut commented 6 years ago

This is related to #36 but is kind of it's own thing. If the client could mesg writ the engine after injecting RT/DMAs, it would save a lot of resources on the engine's part since it wouldn't have to have scripts that constantly check for new RT/DMAs and slow things down. This might become quite an issue once a lot of warp-reliant agents are being developed.

I propose that an RTD/MA could have two optional variables, called "aw_target_agent" and "aw_target_script". "aw_target_agent" would be a string corresponding to a game variable that holds an agent, for example "aw_housekeeper_agent" or "aw_immigrant_checker". "aw_target_script" would hold the script number that would be messaged.

There would have to be a way to 'whitelist' scripts so people aren't sending DMAs to any agent's scripts just to force someone's game to execute them. I propose that if an agent wanted to be set up to receive mesg-writs from the client, it would have to:

Example:

A mail message DMA is created: "aw_recipient" = "bob" "aw_target_agent" = "aw_mailman_agent" "aw_target_script" = 1005 "some_other_vars" = "some other content"

Does this seem like a viable thing to consider for future development?

KeyboardInterrupt commented 6 years ago

This is a really great Idea!

What if we allowed Agents to register them self in the registry via SMA's, The registry could be used to associate the aw_target_agent String with the Agent ID to target. This could then be used by thirds party developer to register their own Agents as possible targets. This would also allow to register multiple agents of the same type with different names like: warp_ball_toy_01, warp_ball_toy_02, warp_ball_toy_03 each being another Agent/Toy.

To avoid accidental mischief by overwriting names we could issue an interactive Prompt asking the player if it wants to re/register the Agent. but on the other hand, this wont stop truly bad intent, as there is no protected CAOS or whatever ^^.

But can we make these new variables optional? what happens if we omit them? What is the default behavior?

Amaikokonut commented 6 years ago

I think if those new variables are omitted, the client will just behave as it does now-- inject the RT/DMA and let another script worry about picking it up and scanning it. Probably not every developer will want to use this system.

Do you think using SMAs to tell the client which agents/scripts are target-able would be better than just using GAME/NAME variables? I am concerned about things like if the client closes or crashes, would the agents need to re-register themselves? How would they know to do that? What if they need to "unregister"? I feel like it might be easier to check for those variable flags in the engine's game/name vars, since those are simple to change already.

KeyboardInterrupt commented 4 years ago

This is made obsolete by the Switch to ReBabel