JavaScriptDoom Posted November 30, 2005 Hi, I am about to start making a doom port to run in a web browser under javaScript and using the new Canvas element. If you have firefox 1.5 or safari 1.3 you can see a quick proof of concept exmaple I have whipped up: http://www.abrahamjoffe.com.au/ben/canvascape/textures.htm Now I am looking for a resource that will help me learn how Doom runs, I have found many specs and such that detail how the data was stored and WADs and stuff but I am not so interested in that, I would like to write it my own way as this is a very different environment and will require very different optimisations. So I am after information like units used and accellaration, framerate, scales, AI rules, collision detection and everything else that will help me along these lines (nothing that talks about 4 bit integers and other programming jargon that is irrelevent to me). I would also appeciate if I could have a link to the origional bitmaps of the sprites and textures used in the origional. (BTW I am only working on the first 9 levels for the time being, I may do the others once they are finished). I appreciate all the help I can get, thanks alot! 0 Quote Share this post Link to post
wildweasel Posted November 30, 2005 Hey, I know you...I saw this demo from a link on Joystiq. Pretty awesome stuff. Unfortunately, I can't be of much help outside of providing encouragement. I wish you luck with the project though - God only knows the only good browser-based FPS games out there are Alien X and Scared, and those don't begin to come close to Doom. 0 Quote Share this post Link to post
KwadDamyj Posted November 30, 2005 WildWeasel said:Hey, I know you...I saw this demo from a link on Joystiq. Pretty awesome stuff. Unfortunately, I can't be of much help outside of providing encouragement. I wish you luck with the project though - God only knows the only good browser-based FPS games out there are Alien X and Scared, and those don't begin to come close to Doom. I have played Alien X but never played Scared. May I please have a link? 0 Quote Share this post Link to post
wildweasel Posted November 30, 2005 http://www.brackeen.com/home/scared/ Requires a Java-capable browser. I don't recommend trying it in Firefox. 0 Quote Share this post Link to post
PainElemental Posted November 30, 2005 Hmm, correct me If I'M wrong but what you're going to make is a full remake of the original Doom, including all the levels etc (since you don't wanna use the original WADs - which would be a next-to-impossible thing in JS anyway :). Apart from legal issues (cause, I believe the original textures are still copyrighted) that's gonna be damn hard work. I'd just give you the advice of converting the shareware WAD into some more convenient data structures and start from there. Oh yeah, the raycaster is soo damn slow on my Athlon64 2800+ (ok not the newest hardware but come on, Wolfenstein was running on 8086s :). I don't know if you're using a built in vertical line texture scaling function but if you do, imagine texturing the floor setting a pixel at a time, since you gotta do this nasty perspective divide :) All in all, I'd consider doing that in Java, maybe even using OpenGL. The performance should be A LOT better... And for the whole game programming, coldet, ai etc stuff take a look at gamedev.net or devmaster.net. -phil 0 Quote Share this post Link to post
insertwackynamehere Posted November 30, 2005 the first link doesnt work :'( i have the newest firefox and javascript enabled. 0 Quote Share this post Link to post
TheDarkArchon Posted November 30, 2005 Scared has a Doomish feel to it (Think messages and sky) so you're half-way there. Good work! | (=3 0 Quote Share this post Link to post
JavaScriptDoom Posted December 1, 2005 Pain elemental, yes I know about the numerous problems with doing this with javaScript but that is part of the reason I am choosing this language, it is just about the last one you would choose. I will only have gradient filled floors and ceilings with textured ones as an option. Bear in mind that the above link has not been optimised yet, I plan on scaling the textures to many different dimensions before as the game starts and several other techniques that will dramatically speed it up. EDIT: And yeah I know about the legal issues, but I doubt that it would be worth their trouble to sue me, I will release it under the title of ID software and seeing that the origigional is free they would have to be pretty tight to come after me. 0 Quote Share this post Link to post
PainElemental Posted December 1, 2005 Seeng it from that point of view, it's indeed an interesting challenge. If you succeed it'd be a real proof of concept, since nothing even close to the level of Doom graphics has been released yet using entirely JavaScript (AFAIK); most of the web graphics engines are written in Java or VRML :). However, if I were you, I'd still consider converting the original shareware WAD to a more JS-friendly data structure (in that case, your program could even be considered a source port, so no worries about legal shit) instead of remapping every single Doom level from scratch. Technically the floor/ceiling rendering is the most challenging path. Even if you only light-shade them, you'd still need a perspective divide. You could do it every 16 pixels (or so) only and linearly interpolate inbetween, but then again there's no way to precompute some scaling tables as in the case of the vertical wall lines, since you have varying floor/ceiling heights. However, if you should master it, I'd be glad going to your site to play Doom, no matter where I am and what I'm doing. Hell, you could play it even on those street internet access points :) Good luck! 0 Quote Share this post Link to post
myk Posted December 1, 2005 JavaScriptDoom said: Now I am looking for a resource that will help me learn how Doom runs, I have found many specs and such that detail how the data was stored and WADs and stuff but I am not so interested in that, I would like to write it my own way as this is a very different environment and will require very different optimisations. Well, if you're going to redo the resources structure you're going to either have to redo the resources from scratch or prepare a program that reformats the wads. I would also appeciate if I could have a link to the origional bitmaps of the sprites and textures used in the origional. If you have the game, you have your "link." DOOM's source code was released first under its own license and then under the GPL, but the resources (wads) are owned by the makers of the game (id Software) and may only be used under the conditions imposed in their terms of use. Read those; here's the latest EULA in text format. You cannot distribute the games' resources in a standalone game without a special license by id. 0 Quote Share this post Link to post
funduke Posted December 1, 2005 Probably FreeDooM is a solution. It's not the original stuff but it's free: http://freedoom.sourceforge.net/ Greetings Funduke 0 Quote Share this post Link to post
bejiitas_wrath Posted December 1, 2005 How are you going to do pixel by pixel texture and flat mapping along with at least 320*200 resolution in a web browser. You would need a Cray 9000 XMP 2x to run it at 800*600 resolution. I am recoding dosdoom to run on Linux and I know how much CPU is required to run the game. Javascripts would not be able to access /dev/dsp on Linux would it? For Linuxers you would have to code a driver program to sit in between Mozilla and the Alsa or OSS sound software and allow sound. Which would undoubltedly have quite some latency. Unless you made something with Java instead of Jscript. Java can at least build bytecode. not ragging on the project, any new Doom project, is cool, but I think Java is the better idea. And you are not going to run FIZZB1.WAD with that either. You would need a computer from Snow Crash to run it. 0 Quote Share this post Link to post
Grazza Posted December 2, 2005 bejiitas_wrath: Please drastically shorten your signature, or else stop using it. 0 Quote Share this post Link to post
JavaScriptDoom Posted December 2, 2005 I have no interest in recreating Doom for another platform, my goal is to push javaScript canvas to its limits. 'Flats' casting will probably be out its leage however fast computers may be able to handle the wall textures at least, either way I think it will be a fun challengle and fun to play online. Imagine level editing and video recording all through your browser. 0 Quote Share this post Link to post
KuriKai Posted December 2, 2005 Stop putting the guy down. @JavaScriptDoom. best to recreate the shareware version of doom. Is the source hidden or is it avalible to view? Good Luck with the project 0 Quote Share this post Link to post
JavaScriptDoom Posted December 3, 2005 Upon further consideration I have decided that the engine is not going to be modelled after the Doom one, I may in future make a mod for it to be similar but it is no loger the primary initiative. Thanks anyway. 0 Quote Share this post Link to post
PainElemental Posted December 3, 2005 What are you gonna do then? 0 Quote Share this post Link to post
Graf Zahl Posted December 3, 2005 Wanna bet that this ends up the same way as all the other 'I am going to create a new source port' threads? (i.e. no end result) Sorry for my skepticism but it has happened far too often and not a single one of these things got anywhere. If you have to ask for basic information before you even start your work you are practically doomed to fail. Some intimate knowledge about Doom's inner workings is a requirement for pulling such a thing off. 0 Quote Share this post Link to post
JavaScriptDoom Posted December 3, 2005 Graf Zahl, actually that is part of the reason that I am changing my mind, I have looked into the doom spec and seen how many things I would need to learn (I never really played Doom much). I also agree that many projects dont get done, I have given up on at least 4 on the scale of this, however in this case I am doing it for a class project and if I don't do it I get a Fail. 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.