{"action":"created","issue":{"url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/issues/538","repository_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom","labels_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/issues/538/labels{/name}","comments_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/issues/538/comments","events_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/issues/538/events","html_url":"https://github.com/chocolate-doom/chocolate-doom/issues/538","id":73497486,"node_id":"MDU6SXNzdWU3MzQ5NzQ4Ng==","number":538,"title":"Chocolate Doom should have an Emscripten port","user":{"login":"fragglet","id":96821,"node_id":"MDQ6VXNlcjk2ODIx","avatar_url":"https://avatars2.githubusercontent.com/u/96821?v=4","gravatar_id":"","url":"https://api.github.com/users/fragglet","html_url":"https://github.com/fragglet","followers_url":"https://api.github.com/users/fragglet/followers","following_url":"https://api.github.com/users/fragglet/following{/other_user}","gists_url":"https://api.github.com/users/fragglet/gists{/gist_id}","starred_url":"https://api.github.com/users/fragglet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fragglet/subscriptions","organizations_url":"https://api.github.com/users/fragglet/orgs","repos_url":"https://api.github.com/users/fragglet/repos","events_url":"https://api.github.com/users/fragglet/events{/privacy}","received_events_url":"https://api.github.com/users/fragglet/received_events","type":"User","site_admin":false},"labels":[{"id":257755512,"node_id":"MDU6TGFiZWwyNTc3NTU1MTI=","url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/labels/feature%20request","name":"feature request","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2015-05-06T03:02:46Z","updated_at":"2018-08-13T21:17:11Z","closed_at":null,"author_association":"MEMBER","body":"First of all, I played around with Emscripten several weeks ago and although I had success getting other things to work, I didn't manage to get far with Chocolate Doom. That said, I do believe that an Emscripten (ie. Javascript) port is possible and we ought to support it.\n\nBrain dump of current thoughts:\n- One big problem is restructuring the code to be event-based. With an Emscripten program you cannot have infinite loops, which crash the browser. In practice this means restructuring d_loop.c and txt_desktop.c so that their event loops are event driven by the Javascript event loop.\n- Emscripten has built-in support for the SDL API, but this is really a half-baked reimplementation of SDL rather than a port of the code. A whole bunch of the API functions are missing. I got as far as getting one of the libtextscreen demos to run, but ultimately just hit a blank screen, because it didn't support palettized surfaces.\n- However, [the SDL developers have done a proper port of SDL2](https://twitter.com/icculus/status/550022999160913920) to run on Emscripten. This almost certainly offers a better basis for a port, and means that any Emscripten port is going to be based on sdl2-branch (#450). The Emscripten port isn't in the current release (2.0.3) so we'd have to use a version of SDL2 from Mercurial HEAD.\n"},"comment":{"url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/issues/comments/412667682","html_url":"https://github.com/chocolate-doom/chocolate-doom/issues/538#issuecomment-412667682","issue_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/issues/538","id":412667682,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjY2NzY4Mg==","user":{"login":"fragglet","id":96821,"node_id":"MDQ6VXNlcjk2ODIx","avatar_url":"https://avatars2.githubusercontent.com/u/96821?v=4","gravatar_id":"","url":"https://api.github.com/users/fragglet","html_url":"https://github.com/fragglet","followers_url":"https://api.github.com/users/fragglet/followers","following_url":"https://api.github.com/users/fragglet/following{/other_user}","gists_url":"https://api.github.com/users/fragglet/gists{/gist_id}","starred_url":"https://api.github.com/users/fragglet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fragglet/subscriptions","organizations_url":"https://api.github.com/users/fragglet/orgs","repos_url":"https://api.github.com/users/fragglet/repos","events_url":"https://api.github.com/users/fragglet/events{/privacy}","received_events_url":"https://api.github.com/users/fragglet/received_events","type":"User","site_admin":false},"created_at":"2018-08-13T21:17:11Z","updated_at":"2018-08-13T21:17:11Z","author_association":"MEMBER","body":"@linguica I'd rather just not have the debate. Fact is, it's clear they don't want Doom playable on a webpage and I doubt the particular technical details of how it's done are going to make much of a difference to them. Rather than potentially piss them off or risk any kind of takedown notice I'd rather just put up something unambiguously okay, like FreeDM. But it's @hifi who's hosting the page so it's up to him.\r\n\r\nAnother bug report: The screen scaling doesn't appear to be working right yet. If you look at the weapon while it's bobbing you'll see a rippling pattern. I suspect the linear scaling part of the screen scaling process is being skipped."}}
{"actor":{"display_login":"fragglet"}}