rpge-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Rpge-devel] My thoughts on message-passing


From: Remco Bras
Subject: [Rpge-devel] My thoughts on message-passing
Date: Mon, 17 Sep 2007 21:27:19 +0200
User-agent: KMail/1.9.6

Hi again,

I thought it'd be pretty useful to explain the message-passing idea. 
Essentially, we need a way to communicate in two ways in some conventional 
way between two different scripts running for two different mobs (in my 
opinion, it should still be discouraged-but-possible to keep the script 
running from mob creation until program (or mob) termination). Also, it would 
be useful to have some way to store global data from scripts, but that shall 
be the subject of some other message to this mailing list sometime.

For now, I'd say we could specify pretty much a conventional set of data, for 
example certain symbols, like 'player-contacted' which would be pushed on to 
some stack and popped by the script if needed. If there is no script running 
contantly, we could "assign" scripts to symbols so the scripts were executed 
as a matching event came in, possibly discarding the event in the process.

This way, users could choose both 'callback-like' and 'event loop' ways of 
programming RPGE. Also, the option of discarding events if there is a 
dedicated script for these stops the otherwise possibly insane growth of 
event stacks. I'd personally dislike a cap on stack size because we cannot 
tell nor dictate how fast event loops process events. Generally, I would like 
processing to be as fast as possible, but there's no telling what people will 
do with RPGE.

By the way, the implementation of event stacks would add to the growing 
problem of 'stack proliferation' in RPGE, by which I mean that RPGE's getting 
an insane amount of semi-duplicate very similar dynamic array 
implementations. Perhaps someone would find it interesting to tackle this 
problem by generalizing these dynamic arrays.

In closing, I'd like to state that the generic idea of message-passing makes 
for very clean communication between mobs, but I still have no idea exactly 
what data would be associated with what event. There should be some data, for 
example a 'mob-contacted' event should probably contain the numeric mob id of 
the contacted mob.

Have fun discussing these ideas further,

Remco.
-- 
If I have any talent at all, it's merely the talent of having extremely bad 
luck.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]