9 ms·
Full-fledged FPS in WebGL
- tech-no-logical 12y agonice. loved the pac-man monsters :) the pointer-lock doesn't seem to work in chrome, but works in firefox (with a bit of a hassle from the context-menu that also pops up)
- not_with_retard 12y agoWorked on Version 40.0.2214.69 (64-bit) (Linux)
- pheo 12y agoabsolutely awesome. This is how far we've come.
- agentultra 12y agoThis is great! Other than for very specific OpenGL ES features or platform-specific acceleration I have a harder time recommending indie developers starting out to use anything other than the web as their platform these days. And with time I'm sure WebGL will catch up (and surpass?). I've played my part in making it happen and will continue for that push. It beats telling people to install this, link that, and all the tooling involved in packaging a game. It even beats an engine: it's free, distribution is built it, the network effects are there. The developer tools need to catch up but it's only a matter of time. Update: "platform specific acceleration" being a broad term for targeting platform-specific features; consoles for example or optimizing for specific features of a particular touch interface.
- z3t4 12y agoCompared to the Canvas 2d API, OpenGL is VERY hard to get into. It's very low level compared to the rest of the browser API's.
- jameshart 12y agoWhat about monetization? Still harder on the web than in the appstore or steam, surely?
- agentultra 12y agoIf anything it's probably easier. There are a glut of payment processors willing to help you out that would take a fraction of your profits compared to a curated download-only marketplace like Steam. There are, admittedly immature, marketplaces for web-based games such as itch.io However it's still possible to deliver a platform-specific download with the many web-wrapping runtimes out there (cordova, apollo, etc). It's not perfect right now but it's where the action will be in the next few years.
- rikkus 12y agoPointer lock working for me in chrome, but left mouse to fire only works intermittently. Assigning space to fire works though.
- disordinary 12y agoPointer lock and left mouse click work fine in firefox.
- deleted 12y ago[deleted]
- Retra 12y agoAh, is it doing the old "move sqrt(2) faster on diagonals" thing?
- davesque 12y agoI think so :)
- ncza 12y agoYou can play Quake at http://webquake.quaddicted.com http://webquake.quaddicted.com or Sauerbraten at https://developer.cdn.mozilla.net/media/uploads/demos/a/z/azakai/3baf4ad7e600cbda06ec46efec5ec3b8/bananabread_1373485124_demo_package/index.html https://developer.cdn.mozilla.net/media/uploads/demos/a/z/az...
- azakai 12y agoAnd here's ioquake3 (id tech 3-based), http://www.quakejs.com/ http://www.quakejs.com/ and (free-)doom (free, due to copyright), http://kripken.github.io/boon/boon.html http://kripken.github.io/boon/boon.html
- ap22213 12y agoWow, I forget how classic Quake is. It's such a wonderfully simple shooter in contrast to today's overly complex AAA titles.
- Crito 12y agoI really wish retro-style FPSes like this were more common. There is no shortage of retro platformers, but it seems like not many people are making shooters that harken back to Doom or Quake. Cover systems, realistic weapons, online ranks, etc is all fine; I just wish there were more games like this. I could play this game all day. The author links to this essay about Doom which I think really gets to the heart of it: http://vectorpoem.com/news/?p=74 http://vectorpoem.com/news/?p=74
- JimmyM 12y agoHave you played Ziggurat? It's a fantastic FPS/roguelike-like. Shades (well, more than shades) of Heretic. http://store.steampowered.com/app/308420/ http://store.steampowered.com/app/308420/
- zacwitte 12y agoKinda cool that Chrome added pointer lock, but the responsiveness of moving the cursor around the screen is pretty shit. Maybe it's mac mouse acceleration's fault?
- tgb 12y agoSame for me, but on Windows. Otherwise it's a pretty neat tech demo but is unfortunately rendered unplayable by this bug.
- davesque 12y agoFPS games kinda suck on Mac for this reason. This little control panel widget helps a little bit: http://smoothmouse.com/ http://smoothmouse.com/
- killertypo 12y agoI noticed this as well, but I use a trackball mouse and I can flick the ball and get good responsiveness.
- EpicEng 12y agoWorks fine on my 2013 MacAir
- zanny 12y agoNo problems on Arch, just the fps was underwhelming on a 290 on Gallium / Firefox.
- loudmax 12y agoWhat's underwhelming? I was getting 38 fps on chromium/Arch on a ThinkPad X230. I guess it's slow if you're used to 60 fps, but I was quite impressed.
- zanny 12y agoAverage fps was 47, but this game seems to be composed of very few polygons. I mean less than Quake 1 here. It should scream at 300+ fps at least on a video card like that. That, and it seems its either the browser or the game fps capped at 60. Which makes the experience on a 144hz monitor less appealing.
- Animats 12y agoThe page reports "Your browser does not support HTML5 local storage", because the browser here is configured to block that. Your game doesn't need local storage. It doesn't get to plant tracking information.
- captainbenises 12y agoHave you looked at the source? Maybe it caches a bunch of expensive to compute stuff? Or are you just assuming it wants to track you?
- FreezerburnV 12y agoIt seems to be caching game assets. After loading the game once (which took a while), the subsequent loading times were dramatically reduced. Though this is purely based off of quickly opening and closing the website, so I can't completely verify anything.
- sfjailbird 12y agoThe browser already caches most things, and caching binary assets (like graphics) in localStorage would require base64 conversion, adding 30% of bloat to data size, not to mention computational overhead.
- bovermyer 12y agoI guess you won't be playing the game then, huh? Tracking information, heh. As if that's the only use for local storage.
- cordite 12y agoIt is rather annoying that I can't bind my own keys in the same location since it does not allow binding to symbols like ',' or '.' (I use Dvorak) Please, don't be like mirror's edge, let my bind whatever I want.
- mstange 12y agoIn the future it'll be possible to use keyEvent.code for this: http://www.w3.org/TR/DOM-Level-3-Events/#keys-codevalues http://www.w3.org/TR/DOM-Level-3-Events/#keys-codevalues It's supported in Firefox Nightly + Dev edition. I don't know whether other browsers support it yet.
- nemasu 12y agoSame here, and my keys are mapped at the registry level in Windows (at work, don't judge :P). So I got to shoot and look around a bit. Looks awesome though, I just recently started making an engine that targets asm.js/Linux/Windows, makes me want to work on it more once I find a new job.
- shurcooL 12y agoI think this is awesome! As John Carmack said [1], you can hop in and enjoy in seconds. What is even cooler, IMO, is that you don't necessarily have to write JavaScript and target WebGL only to get your game to work in the browser. You can write using Go and use packages with 2 backends, WebGL/OpenGL and GLFW/Canvas, to abstract out the platform differences behind a common API. Then your game can be a single codebase that can either run as a native binary on desktop, or inside the browser. See a working demo of what I'm describing here: https://github.com/shurcooL/play/commit/e53557dd9c070ce0ec5251108249e5fa85333ae0#commitcomment-9101168 https://github.com/shurcooL/play/commit/e53557dd9c070ce0ec52... [1] - https://twitter.com/ID_AA_Carmack/status/553720089674260480 https://twitter.com/ID_AA_Carmack/status/553720089674260480
- tesmar2 12y agoGiven Carmack's view of JS, I am surprised he was so positive. Good for him!
- deleted 12y ago[deleted]
- jokoon 12y agoI don't understand when you say "you don't necessarily have to write JavaScript and target WebGL only to get your game to work in the browser" What is deployed then ? Is an executable deployed ? Is it something like nacl, or asm.js ? Or does the user have to install an executable on his system ?
- ewindisch 12y agoThe parent was referring to using gopherjs to compile golang code to Javascript.
- ferongr 12y agoSome suspension of disbelief required for that "full-fledged" claim (whatever that means). The mediocre performance, low complexity graphics and Doom-like movement and shooting mechanics are not comparable to any of the "full-fledged" FPSs I've been playing since 2000.
- Normati 12y agoYou might have missed the instructions - "Imagine it's 1994".
- pimlottc 12y ago> "Imagine it's 1994". Is that why it feels like there's some homework I should be doing instead?
- lgeek 12y agoI'm with you on this one. After seeing this running at 15-20 fps, my reaction was that web technologies have finally been shoehorned in a place where they can almost provide the same experience as 15 year old native games, while running on a modern machine. Oh well, the 'hardware is fast, overhead doesn't matter' crowd doesn't care.
- ahoge 12y ago> Doom-like movement and shooting mechanics Doom controls a lot better. I played some Brutal Doom just an hour ago. In Doom, there is some inertia. You accelerate and there is some friction. In this game, movement is a binary on/off thing. The bobbing is also very jarring.
- mpnordland 12y agoYou can turn off the bobbing in the settings
- ahoge 12y agoI did. I dislike bob/pitch/roll in general. I appreciate that they added a checkbox for that. Also, having a FOV slider is great, too. I couldn't set the mouse sensitivity high enough though.
- Touche 12y agoWhy no full-screen?
- ars 12y agoPress F11.
- Touche 12y agoOn OSX that makes the window hide.
- Raphmedia 12y agoWell, on OSX, simply put your window as fullscreen by using the full screen button at the top right of the window...
- Touche 12y agoStill shows browser chrome. There's a fullscreen API that puts an element into the full screen: https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/U...
- Raphmedia 12y agoView / Enter Presentation Mode No need to install any third party to have full screen without the top bar on OSX.
- Touche 12y agoNot sure what you are referring to as third party, the full-screen API is a web standard.
- roryokane 12y agoAre you saying to toggle the menu item “View” > “Enter Presentation Mode”? There is no such menu item in Firefox 35, and there hasn’t been for many versions. There is only “View” > “Enter Full Screen”, which enters full-screen, but with the top bar always showing.
- davesque 12y agoLove it! I'm an old-school FPSer and have been thinking about taking up a hobby project involving WebGL. This might just give me the inspiration.
- bane 12y agoThat was pretty awesome. It's basically a doom remake, tearing everything down to just the basics, but executing really well on them.
- MrBoomixer 12y agoI'm pretty sure this is made using ImpactJS for anyone that is interested.
- tamerito 12y agoIt's not. Retro first-person shooter, written in JavaScript using three.js.
- touristtam 12y agofor anyone interested, just look at the deps folder on the repo: https://github.com/timeinvariant/gorescript/tree/master/src/deps https://github.com/timeinvariant/gorescript/tree/master/src/...
- mrspeaker 12y agoI think you've confused it with the (really cool, recently released) TwoPointFive plugin for Impact: http://phoboslab.org/twopointfive/ http://phoboslab.org/twopointfive/
- lectrick 12y agoIt reminds me of this old game called The Colony http://en.wikipedia.org/wiki/The_Colony_%28video_game%29 http://en.wikipedia.org/wiki/The_Colony_%28video_game%29 Which I never finished because it was so damn hard lol
- hardwaresofton 12y agoI have no idea how this doesn't have way more upvotes. I just played through the first level, this game is amazing, I am thoroughly impressed. Maybe I'm easy to impress, but I think it's amazing
- curiously 12y agoman this was more fun to play than call of duty
- cbd1984 12y agoWhat browsers does this work in? I tried it in both Firefox and Chrome and neither showed anything other than a black screen.
- nighthawk454 12y agoReally cool! Was pulling 60fps in Chrome on a retina MacBook Pro. Doesn't work in Safari, as Safari doesn't seem to support the Pointer Lock API.
- jbevain 12y agoThe «immediate» experience is pretty awesome. You just open the web page and you're playing. It takes longer to download, probably the size of the engine and the assets, but I've been very much impressed with the Unity3D WebGL export of this FPS: http://beta.unity3d.com/jonas/DT2/ http://beta.unity3d.com/jonas/DT2/
- merlish 12y agoPretty cool. How do you get other weapons? Maybe I've just missed it, but I've played two levels and have been picking up ammo for other guns but am unable to switch to them with the numeric keys. Movement system is good and the music & sound effects have grown on me, but the shooting speed is pretty slow. (Again, I still only have the basic pistol though.) Edit: Never mind, just found a shotgun on the third map. I maintain that the pistol is a bit slow considering the pace of the game otherwise.
- Geee 12y agoNeat, but there's lag every second or so, making it unplayable.
- stelonix 12y agoJust tried it on Aurora on Linux and it runs great. Loved the Doom-esque feel to it. I did notice performance issues when too many enemies were "loaded" (not necessarily being seen on screen though).