Posted By: Adam Kinney | Oct 22nd, 2008 @ 7:07 PM | 93,147 Views | 26 Comments
In this video, I'm running a preview version of QuakeLight a Silverlight-based port of Quake.  Its very impressive to see an old-school classic game come to life in Silverlight 2.  Stunned, along with others, I interviewed Julien Frelat about the story behind QuakeLight, coding techniques used and when there will be a public release.
Rating:
10
0
littleguru
littleguru
<3 Seattle
Nice. I hope we are going to see this in the wild Smiley Awesome work by Julien.
Bas
Bas
It finds lightbulbs.
Amazing! Why isn't this somewhere more prominent, like the front page or something? If anything is an in-your-face demonstration of the power of Silverlight 2, this is it.

Edit: I guess it is on the front page. Didn't notice it before.
rhm
rhm
I'm looking forward to seeing how this is done. I mean obviously you can re-write the Quake software renderer in C# and have it write to a byte[] in place of video memory and with PCs being as fast as they are today compared with 1995, that will get you a decent fps at the resolutions demonstrated. No contoversy there. But what I don't get is how you get that byte array on screen in Silverlight 2, because I've been through all the API documentation and I just can't see a way other than turning each frame into a PNG and then having it decoded by the framework again and that surely wouldn't be fast enough.
Koogle
Koogle
I'm a Terminator - Astalavista, Vis7a!

My interests in silverlight have just gone up! Smiley

figuerres
figuerres
???
rhm:  in part i'd say the "secret" is that quake used Open GL and SIlverlight/ WPF has primitives that are in some ways like OGL ones.
I'd bet they had to make a kind of Maping from the quake engine calls that in turn called OGL to a C# classes that call the Silverlight / WPF bits.

not trivial but I bet it's not byte[] in most cases....

Quake had for example Textures as brushes on a surface to fill a triange/ mesh
Silverlight has an ImageBrush that can fill an enclosed path rect, triangle etc....
rhm
rhm
No, the author of Quakelight already stated that they are not doing that. They ported Quake's software renderer into C# like I said. I suppose people forget that games used to have software rendering engines. There won't be a Quakelight3 for example.
Unless there's some super-secret reasonable way of getting a bitmap onto the screen in Silverlight, I'm sure he's encoding each frame as a PNG.  It's not as bad as it could be if you make no effort to do the lossless compression, but there's still got to be some time wasted there.  I would love to know what % of time is spent on that piece.
I also wonder what machine he is getting this FPS on.  Furthermore, Silverlight does have some multithreading capabilities that I could see being used to speed up the rendering really well.

Maybe also he is using an optimized data structure.  For example, Analysis Services 2008 is using the probability based bloom structures for sets with NULL/Empty records.  Just by moving to this structure cubes with sparse data performa 20-30% faster. 

I wonder if something like that is going on where if it is doing simple png rendering with buffered rendering on other threads with some advanced probability data structures to figure out movement.
Microsoft Communities