Post by melvin2001 on Apr 3, 2008 21:56:21 GMT -5
I have been tinkering with the idea of some kind of multi-user environments... such as multi player games or collaborative writing space. the main issue i have come across is there is no model in place for communicating between running instances of the same program (or different programs for that matter). I propose adding functionality something like this:
etc. etc....
then what would happen is while the program is "waiting" it is looking for incoming connections from other running programs, or data received into a buffer. when such an event occurs the associated block is run. kind of like user generated events in the GUI for liberty basic. then of course you would have to have some kind of command to return lines from the buffer or the whole buffer or whatever... similar to the commands i have seen with SQL. there is obviously a lot more that would have to go into making this something thats actually worth implementing.
also something that would make my day, and is very loosely related to the above feature request is the ability to add functionality to the "wait" command. meaning we can then have the program doing something while it is waiting, without having to make the program get stuck in a while loop. for instance, if we wanted to periodically have the program check for changes in a text file, but still let the user interact with the program. not really sure how the syntax for that would be structured, but maybe you could print a command to a #wait handle with a [] that would be run, also there would have to be some kind of timer event involved to keep it from eating all the CPU.
these are just ideas i had in-between doing nothing at work the past few days, they are by no means intended to be implimented without some serious discussion by someone that actually knows what the heck they are talking about (unlike myself). and who knows, this stuff may just add complexity to runbasic and make it harder to learn, which is pretty much the opposite of carl's vision i believe...so please, comment away!
open (Port(#) or some ID #) for sessioncomm as #ses
print #sescom, "onconnect [sesconnect]"
print #sescom, "ondatareceive [sesdatarec]
wait
etc. etc....
then what would happen is while the program is "waiting" it is looking for incoming connections from other running programs, or data received into a buffer. when such an event occurs the associated block is run. kind of like user generated events in the GUI for liberty basic. then of course you would have to have some kind of command to return lines from the buffer or the whole buffer or whatever... similar to the commands i have seen with SQL. there is obviously a lot more that would have to go into making this something thats actually worth implementing.
also something that would make my day, and is very loosely related to the above feature request is the ability to add functionality to the "wait" command. meaning we can then have the program doing something while it is waiting, without having to make the program get stuck in a while loop. for instance, if we wanted to periodically have the program check for changes in a text file, but still let the user interact with the program. not really sure how the syntax for that would be structured, but maybe you could print a command to a #wait handle with a [] that would be run, also there would have to be some kind of timer event involved to keep it from eating all the CPU.
these are just ideas i had in-between doing nothing at work the past few days, they are by no means intended to be implimented without some serious discussion by someone that actually knows what the heck they are talking about (unlike myself). and who knows, this stuff may just add complexity to runbasic and make it harder to learn, which is pretty much the opposite of carl's vision i believe...so please, comment away!