Porting the UO-C Scripts and whatnot
Posted: Fri Mar 25, 2011 8:45 am
I've been considering trying to port some of the UODemo code to javascript. Sounds insane: why javascript? Because has a fairly thorough among other things and it runs on google's v8 javascript engine so there's crazy black magic happening to ensure the JS executes extremely fast. I've been using node.js for its capabilities as an http server(s) for the past month or two, which is what got me thinking about its potential for making a UO server.
It's single-threaded, but all the IO is asynchronous, so the end result doesn't appear to be single-threaded. It seems like it's a very basic and understandable platform (at least for me). I'm certainly not a veteran programmer, but I'm learning more and more about TCP every day and I understand enough C (or any basic procedural language) to start porting some of the UO-C scripts. (it might even be possible to create some kind of parser to preprocess or compile the uoc scripts into javascript.)
What do you guys think? Would this be reasonable? If the demo code was ported to a more malleable platform, maybe it could be put to work in the real world. The best part about this is, if it were ported to node.js, the code would have the potential to easily be converted to interface with a web socket API which leaves open the possibility of running UO in a web browser, completely native to any modern browser, no installation, no flash, no plugins required. This would utilize WebGL and the html5 canvas element on the frontend.
Realistic or no?
It's single-threaded, but all the IO is asynchronous, so the end result doesn't appear to be single-threaded. It seems like it's a very basic and understandable platform (at least for me). I'm certainly not a veteran programmer, but I'm learning more and more about TCP every day and I understand enough C (or any basic procedural language) to start porting some of the UO-C scripts. (it might even be possible to create some kind of parser to preprocess or compile the uoc scripts into javascript.)
What do you guys think? Would this be reasonable? If the demo code was ported to a more malleable platform, maybe it could be put to work in the real world. The best part about this is, if it were ported to node.js, the code would have the potential to easily be converted to interface with a web socket API which leaves open the possibility of running UO in a web browser, completely native to any modern browser, no installation, no flash, no plugins required. This would utilize WebGL and the html5 canvas element on the frontend.
Realistic or no?