#1 2013-02-11 17:11:14

Spirit
Administrator

Quake in WebGL

SiPlus published the source and a implementation of a WebGL port of GLQuake.

Update: http://webquake.quaddicted.com/, have fun!

Everything below this post might be outdated. Right now that installation is the shareware for legal reasons. The deathmatch server might occasionally be running but don't expect it to.

Last edited by Spirit (2013-12-08 15:59:36)

#2 2013-02-11 17:27:51

SiPlus
Guest

Re: Quake in WebGL

Thank you very much!!! But please keep it up to date, some fixes are very important (at the time of writing it's 1 build old).

#3 2013-02-11 18:24:16

Spirit
Administrator

Re: Quake in WebGL

:)

Press p to toggle between texture filtering on and off.

I added some maps (either append ?+map MAP or enter "map MAP" in the console):

ac
arcane
cogs
could
czg03
czg04
damaul6
dm7rmx
kjsp1
nastrond
networld
oblivion
rpgsp1



Watch Quake done Quickest (Quake in 11:29 on Nightmare difficulty): http://www.quaddicted.com/stuff/WebQuak … me%20qdqst

#4 2013-02-11 19:30:38

Paul
Guest

Re: Quake in WebGL

Hi, could you tell me the folder structure you have on your server for this game .. I can't seem to work out where to put the unpacked ID1 folder ?

#5 2013-02-11 19:44:11

Andrew
Guest

Re: Quake in WebGL

Great job with this so far. Are you planning on making it fully featured? ie mod support etc?

#6 2013-02-11 20:12:14

Spirit
Administrator

Re: Quake in WebGL

Paul: For example like this

/dir/
/dir/WebQuake/
/dir/WebQuake.htm
/dir/id1/
/dir/id1/pak0.pak
/dir/rogue/
/dir/randommod/

Make sure everything is lowercase (unless you are on a Windows server).

Andrew, mods work. :) Try http://www.quaddicted.com/stuff/WebQuak … me%20qdqst or http://www.quaddicted.com/stuff/WebQuak … me%20czg07 (that one crashes after the start map) or http://www.quaddicted.com/stuff/WebQuak … me%20quoth (I have not tested that one yet).

#7 2013-02-12 06:58:46

SiPlus
Guest

Re: Quake in WebGL

I tested Quake Rally and Navy SEALs, they're safe to install. Team Fortress works too, but it's pointless at the moment.

#8 2013-02-12 06:59:36

SiPlus
Guest

Re: Quake in WebGL

"WebQuake" folder and JavaScript files shouldn't be lowercase.

#9 2013-02-12 07:41:40

SiPlus
Member

Re: Quake in WebGL

Quoth is completely broken, looks like it was made for some specific engine.

#10 2013-02-12 08:14:55

SiPlus
Member

Re: Quake in WebGL

Pushed a commit (build 10) adding forgotten console command and variable and forcing all requested file names to be lowercase.

#11 2013-02-12 14:01:00

onetruepurple
Banned

Re: Quake in WebGL

"Quoth is completely broken, looks like it was made for some specific engine."

Absolutely not the case...

#12 2013-02-12 15:12:06

Spirit
Administrator

Re: Quake in WebGL

Updated!

Yeah, Quoth should definitely run. I noticed the same issue (texture garbage) in dm5rmx. Reminds of the good old "grey flash", ie maxed out edges and faces.

#13 2013-02-12 15:42:12

SiPlus
Member

Re: Quake in WebGL

Quoth's start.bsp works, but e1m1quoth has completely broken polygons. Some of them flash, some of them are extended into infinity, some of them are drawn only partially. The collision hull looks mismatched, and many entity polygons are missing. There's something wrong with the face-to-triangles conversion code, I think. dm5rmx has the same issue as well.

Last edited by SiPlus (2013-02-12 15:43:45)

#14 2013-02-13 08:14:17

SiPlus
Member

Re: Quake in WebGL

DM5RMX doesn't work properly in WinQuake, a lot of polygons are missing. I'm not going to fix this. It was compiled with a hacky compiler.

Last edited by SiPlus (2013-02-13 08:16:20)

#15 2013-02-13 12:01:20

Spirit
Administrator

Re: Quake in WebGL

I do not know the technical details but that was a performance issue back in the days. You can increase the numbers for r_maxedges and r_maxsurfs to get the rendering to work. That was a common thing to do even in the DOS days.

A modern GL client should not limit the amount of rendered edges/surfs but eat whatever is legal in the BSP format (actually, more than that to support maps compiled with modern BSP compilers!).

Grep http://user.tninet.se/~xir870k/tooltips.txt for "grey" and see the bottom of http://user.tninet.se/~xir870k/readmegl.txt
Some stuff from there would break the protocol. The modern standard protocol for SP is Fitzquake's protocol 666 which allows for more entities etc.

#16 2013-02-13 14:01:03

SiPlus
Member

Re: Quake in WebGL

There's no limit in WebQuake, map parts are dynamically allocated, but in WebQuake I don't see the same polygons as in WinQuake. In WinQuake, they sometimes appear, but in WebQuake, they are completely missing, and there are lots of garbage and overlapping polygons. As I said, I tried to render all polygons at once, but I still didn't see the missing polygons, so I don't think this is caused by rendering leaf marksurfaces instead of node surfaces.

For some strange reason, WebQuake renders 62000 (!) triangles on dm5rmx when all leaves are visible. While in GLQuake that's slightly over 9000 polygons, and polygons on dm5rmx usually consist of 2-3 triangles, so there shouldn't be more than 27000 triangles.

Last edited by SiPlus (2013-02-13 14:06:57)

#17 2013-02-14 03:39:20

than
Guest

Re: Quake in WebGL

Amazing work! We need a webgl editor now!

I kind of want to try doing a webgl editor, but I have a funny feeling I never will. Would be cool to be able to map on any device that supports JS, HTML5 and WebGL.

#18 2013-02-14 06:33:12

SiPlus
Member

Re: Quake in WebGL

than, can you imagine how long will it take to compile a map with vis in JavaScript?

#19 2013-02-14 11:05:33

Spirit
Administrator

Re: Quake in WebGL

#20 2013-02-14 16:18:51

SiPlus
Member

Re: Quake in WebGL

Would be great if there was a web version of Worldcraft, but with 3.x-like camera controls, not awful view-roll-changing mess from 1.6.

#21 2013-02-14 17:28:01

SiPlus
Member

Re: Quake in WebGL

Spirit, could you remove that pak2.pak you installed? The animations are much slower because of it, this can be easily seen on zombies in the Hard hall.

#22 2013-02-15 16:36:25

SiPlus
Member

Re: Quake in WebGL

Spirit, do you use Steam?

#23 2013-02-15 19:23:32

Spirit
Administrator

Re: Quake in WebGL

Removed the pak2.pak even though I am not sure how that could be possible. From what I know the only change in it is fixing the dead fish count bug which is probably a one liner. I will have to slap negke really hard if that was the culprit.

Also pulled again. ~5000 unique IP addresses so far. About 150 Gigabytes I think. Not bad!

Would it still work if I unpacked the pak files? Then I could spy what files are requested. ;)


I hate Steam with all my heart but I do have an account and ~3 games in it (for research!).

#24 2013-02-16 09:09:56

SiPlus
Member

Re: Quake in WebGL

I think it works without pak files. But pak files have higher priority than real file system. So, if you want to override anything, you should pack it into pak2.pak.

To fix the fish count bug without recompiling, in progs.dat, change 0xd6 to 0xd5 at position 0x26640.

Last edited by SiPlus (2013-02-16 09:26:43)

#25 2013-02-16 09:52:32

negke
Moderator

Re: Quake in WebGL

The pak2.pak only contains a new progs.dat with the fish count fix. However, it's based on version 1.06 whereas the one in pak0.pak is only 1.01. I don't see how or why it would affect the animations, though.

Board footer