Kitely calls for a push to the web

Kitely CEO Ilan Tochner told Hypergrid Business this week that the Second Life and OpenSim viewer can be ported to HTML 5 and Web GL in a matter of months — and he’s looking for people to help accomplish that.

Kitely CEO Ilan Tochner

Tocher said that’s he’s received a commitment from Alon Zakai of Emscripten to convert the viewer’s C++ code into Javascript and WebGL — but only if other people can help out and do some needed preparatory work.

Tochner said he hopes to meet with OpenSim and viewer developers on Friday when he is scheduled to speak at the Metameets conference in Amsterdam.

“I hope to gather enough support to get this off the ground,” he said.

Zakai has already demonstrated this technology, most recently with a conversion of Doom and of the Bullet physics engine.

“Instead of having a castrated Unity 3D viewer, you’d have the latest and greatest Second Life viewer compiled into Javascript,” said Tochner. “That could be huge for OpenSim and virtual worlds — and could be huge for Second Life itself, if they could have the technology.”

Users would still have to wait for the viewer to load the first time they visit a Web-based virtual world that uses it, but after that it would be cached in their computer’s memory. However, there might be some savings since the viewer would no longer need to have a built-in browser, since it would already be running in one.

Viewer developers would need to rewrite some code to use existing Web technologies to display in-world Web pages, images, and video.

Performance hits

Running a full viewer in the browser will entail some sacrifices, however.

For example, it will be slower, said Zakai.

“But I don’t know how much,” he added. “Expect one-tenth of the original for non-shader code, whereas shader code will run at the same speed. How much slower overall depends on whether shaders are used properly.”

In addition, the viewer will require more memory, he said, estimating that memory requirements would increase four times, without special optimization.

There are also some input issues. For example, Web browsers can’t do the mouse capture necessary for the mouselook view, Zakai said.

“And voice is not there yet in Web browsers, but is actively being worked on,” he added. “Running code like this on the web is a fairly new thing, and it is common to encounter browser bugs and inconsistencies. But, this is getting better all the time.”

Convention Center at KatiJack Emporium on Kitely. Web access would allow conference participants to visit the world without installing a viewer.

Easier user experience

On the plus side, users wouldn’t have to download or install any software, and companies wouldn’t have to worry about opening up their firewalls.

For Kitely in particular, a Web-based viewer would a breakthrough, he said.

Kitely offers easy to use and easy to create OpenSim regions — but users have to download and install a Second Life-compatible viewer in order to access them.

Tocher said that his company can’t do the viewer work itself, because they are GPL-licensed — and that would mean that company would have to stop contributing to the BSD-licensed OpenSim community.

“We already submitted four patches to OpenSim in the last few weeks, and want to continue doing that,” he said. “We need help from people to volunteer to do technical work, people who don’t have legal limits that prevent them from doing it.”

Tipodean's viewer uses Unity 3D and runs in a Web browser, but offers very limited functionality.

The end project would be open sourced as well, he added, and available for anyone to use.

“If we get the community involved, we could be months — not years — away from having a working Second Life viewer with all the features.”

The main thing that needs to be done is to create a way to handle UDP messages. The Second Life-compatible viewers make heavy use of this messaging standard, which is not supported by Javascript.

“We need to either change it to HTTP or do some type of proxy — with a Kitely plugin or a Flash-based proxy — to move the UDP to the server,” he said.

The Flash alternative would be easy to set up but would keep the viewer from running on the iPad, he added.

UDP is important for games that require fast reactions.

“Even Whisper voice uses UDP, since there’s no reason to re-transmit a packet if you miss it, because it’s no longer relevant,” he said. “I hope that the people who are pushing WebGL include it as a standard option so that people don’t have to use hacks to create gaming applications.”

According to Zakai, creating a workaround for UDP will also add some lag to the Web-based version of the viewer.

Another conversion issue involves graphics.

Converting OpenGL ES to WebGL is reasonably straightforward, but requires an OpenGL expert, Zakai said.

However, if the viewer uses general OpenGL, then the translation would “be a significant undertaking,” he added.

More technical details about the project are available on the company’s Get Satisfaction discussion board. Those interested in contributing can post on that board as well.

Maria Korolov