WebQuake icon indicating copy to clipboard operation
WebQuake copied to clipboard

Chrome Packaged app

Open kzahel opened this issue 10 years ago • 8 comments

Hej! I created a fork and put it in the chrome web store https://github.com/kzahel/WebQuake

I am super impressed by your code. Did you write it from scratch by looking at the original source code? Did you use some kind of automatic translator?

I was wondering if you had done any work with quakeworld client / quakeworld server. I grew up playing those and would love to see them revived in a packaged app (which have UDP socket support, btw!)

kzahel avatar Sep 05 '13 01:09 kzahel

Hi!

I'm happy that you like the project! Yes, it's rewritten from scratch for more control over the code.

While hosting the port on Chrome Web Store may be good for easier access, it's likely illegal (the license agreement prohibits redistributing even the demo files - Mozilla's Doom on the Web was shut down by Bethesda), and would create fragmentation if I release updates.

No, I haven't done any work with QuakeWorld, and I don't have any plans to. It doesn't support single player game.

Triang3l avatar Sep 05 '13 17:09 Triang3l

Also, there are game-breaking issues with the release: you can't start new game (the button does nothing), load/save doesn't work, and the game is launched into E1M1 instead of the demos.

Please fix or remove it.

I could fix it by myself, but I don't want to do this for legal reasons.

Triang3l avatar Sep 05 '13 17:09 Triang3l

Also, Google Analytics is not what I really want to see in any distribution of WebQuake, sorry.

Triang3l avatar Sep 05 '13 17:09 Triang3l

Dang I didn't realize about the licenses! I assume it would be OK as a total conversion, not using any original id1 assets... but then that would ruin the point.

Sorry about breaking many features... I will try and make the rest of the functionality work, and also remove the google analytics.

It's really dumb that I had to change all the synchronous resource requests to async... it was a huge pain in the ass and it has lots of obscure side effects that break things

kzahel avatar Sep 05 '13 18:09 kzahel

"I will see about having the license changed on the shareware episode of quake to allow it to be duplicated more freely (for linux distributions, for example), but I can't give a timeframe for it. You can still download one of the original quake demos and use that data with the code, but there are restrictions on the redistribution of the demo data."

https://github.com/id-Software/Quake

Damn.

kzahel avatar Sep 05 '13 18:09 kzahel

Yes, using async IO breaks the Quake state machine entirely. I had to do whole-client-subsystem hacks to add WebSocket connection support.

Triang3l avatar Sep 06 '13 09:09 Triang3l

I'd be interested in knowing what you had to change in the state machine to have it work.

I made a bunch of fixes to make it work more like vanilla quake; loading demos on start, new game working, settings saving, and entering shareware mode. Also I removed the google analytics.

I also mailed asking about permission to redistribute the shareware files but haven't gotten any response.

I love your code, it's so awesome.

Somebody asked about gamepad support, I'm going to go find my gamepad and see if I can't get that to work...

Also out of curiosity, why do you use setInterval instead of requestAnimationFrame?

kzahel avatar Sep 07 '13 22:09 kzahel

Thanks for loving my code.

I had to change the Host.Frame function directly in a hacky way (by adding a global variable that makes only console drawing called in the current frame when set), and I throw an exception to stop execution of the current frame when starting a connection attempt.

I had an idea: split functions that load files into callbacks and save local variables when loading files, but it seems to be an awful mess, and IE apparently supports overrideMimeType of XMLHttpRequest now.

I tried to connect the X360 gamepad and an old DirectInput gamepad, neither worked with Chrome and Firefox.

setInterval is used so that multiplayer packets are processed when the tab is inactive.

Triang3l avatar Sep 08 '13 04:09 Triang3l