News for hackers. Stuff that matters.
Re:OpenLara – Web-based classic Tomb Raider engine remake by robmccoll on Sunday April 23, 2017 @11:06AM (#14178438)
In case anyone is curious, this appears to be an Emscripten-compiled C++ project. The remake and engine itself isn't necessarily 'web-based'.
Re:OpenLara – Web-based classic Tomb Raider engine remake by flohofwoe on Sunday April 23, 2017 @11:19AM (#14178485)
...and for this it is really small, really nice! The asm.js blob is just a 180 KByte download, including the WebGL and WebAudio wrapper (and it looks like an ogg-vorbis and/or mp3 software decoder is also included, although I don't know which one is used in the emscripten build).
Re:OpenLara – Web-based classic Tomb Raider engine remake by robmccoll on Sunday April 23, 2017 @11:34AM (#14178550)
Appears to be ogg if not Emscripten based on the sndName in game::init() https://github.com/XProger/OpenLara/blob/master/src/game.h

Yeah Emscripten and projects like this are pretty impressive

Edit: I apparently can't read

Re:OpenLara – Web-based classic Tomb Raider engine remake by floatboth on Sunday April 23, 2017 @12:50PM (#14178937)
Wow, the demo is just published with a level from the original game with the original assets… If OpenMW did a directly playable web version with the original world, Bethesda would not like that :D
Re:OpenLara – Web-based classic Tomb Raider engine remake by bitwize on Sunday April 23, 2017 @03:17PM (#14179880)
Yeah, they're going to be hearing from Square Enix's lawyers.
Re:OpenLara – Web-based classic Tomb Raider engine remake by fyolnish on Sunday April 23, 2017 @09:13PM (#14181332)
It's the demo level iirc
Re:OpenLara – Web-based classic Tomb Raider engine remake by asvitkine on Sunday April 23, 2017 @01:59PM (#14179380)
Super impressive!

I played a good chunk of the demo level and only noticed a few glitches (e.g. bear getting stuck in the wall, some non-optimal camera movement - but maybe that matches the original?).

One error that I hit a good way through the level (in the room with the disconnected stairs and pool in the middle) is a JS stack overflow:

exceeded,RangeError: Maximum call stack size exceeded at Bi (http://xproger.info/projects/OpenLara/OpenLara.js:5:113674) at Bi (http://xproger.info/projects/OpenLara/OpenLara.js:5:118632) at Bi (http://xproger.info/projects/OpenLara/OpenLara.js:5:118632) at Bi (http://xproger.info/projects/OpenLara/OpenLara.js:5:118632) at Bi (http://xproger.info/projects/OpenLara/OpenLara.js:5:118632) at Bi (http://xproger.info/projects/OpenLara/OpenLara.js:5:118632) at Bi (http://xproger.info/projects/OpenLara/OpenLara.js:5:118632) at Bi (http://xproger.info/projects/OpenLara/OpenLara.js:5:118632) at Bi (http://xproger.info/projects/OpenLara/OpenLara.js:5:118632) at Bi (http://xproger.info/projects/OpenLara/OpenLara.js:5:118632)

Re:OpenLara – Web-based classic Tomb Raider engine remake by seibelj on Sunday April 23, 2017 @04:51PM (#14180378)
Must add the roll button! That was key during battles for me back on the playstation.
Re:OpenLara – Web-based classic Tomb Raider engine remake by rzzzt on Sunday April 23, 2017 @05:55PM (#14180657)
Shooting while moving forward is a bit cumbersome as well.
Re:OpenLara – Web-based classic Tomb Raider engine remake by BonoboBoner on Sunday April 23, 2017 @12:30PM (#14178831)
Instantly had me hooked again. The game does not move on after the city of vilcabamba, though :-/
Re:OpenLara – Web-based classic Tomb Raider engine remake by JorgeGT on Sunday April 23, 2017 @02:14PM (#14179471)
They usually sell it for 1.5€ or so in Steam! At first I was afraid of advancing because I remembered the wolves x)
Re:OpenLara – Web-based classic Tomb Raider engine remake by icebraining on Sunday April 23, 2017 @05:00PM (#14180419)
GOG sells a pack of the first 3 for $2.49, DRM-free.
Re:OpenLara – Web-based classic Tomb Raider engine remake by afro88 on Sunday April 23, 2017 @03:22PM (#14179921)
WebGL noob question - why is this silky smooth on Safari on my MacbookPro but Mine 3D [0] (and to be fair basically any other Web GL) is noticably low fps?

I understand Chrome has better support, and I'm in the habit of launching Chrome to check out Web GL stuff. But I absent mindedly followed this link on Safari and was pleasantly surprised.

[0] http://egraether.com/mine3d/

Re:OpenLara – Web-based classic Tomb Raider engine remake by wodenokoto on Sunday April 23, 2017 @05:04PM (#14180441)
Because this is asm.js

It is a sub-set of javascript that you can roughly think of as javascript-bytecode and this can be heavily optimised in the browser compared to full javascript.

http://asmjs.org/faq.html

Re:OpenLara – Web-based classic Tomb Raider engine remake by moron4hire on Sunday April 23, 2017 @05:07PM (#14180454)
A few things:

First, they aren't apples to apples comparisons. The render loops of these two games will look completely different from each other.

OpenLaura is built with Emscripten, so it's actually a C or C++ program that is complied to ASM.js, a subset of JavaScript that some JavaScript interpreters can basically convert 1-to-1 to native code that runs directly on the C runtime rather than needing to be interpreted, specifically because it avoids the dynamic features of JavaScript that require interpreting.

Mine3D is straight, object oriented JavaScript. And while I haven't had time to dig too deep into the code yet, I know from experience that it can be very difficult to avoid garbage collections in such a design. There are a lot of places in JS where you implicitly create objects, and there are a lot of idiomatic JS patterns that involve creating short-lived objects that get dumped on the floor very quickly. It's possible to make high-performance, object-oriented JavaScript, but it's very hard.

So between the two (and again, this is just speculation), there could be upwards of an 8 to 10x improvement in "performance". That's difficult to put into meaningful terms, though, because again, the two games are built completely differently and do different things.

One of the ways in which they are completely different is that Mine3D is using relatively large image files for its textures. Almost all of the variations in materials in Mine3D appear to be done through the textures. I don't want to go to the trouble of checking, but I would not be surprised if the textures used in the OpenLaura demo completely fit inside one of the letters inside one of the Mine3D textures. However, I doubt that is the source of the problems. It could actually go either way. The large textures could be impacting fill rate, or having all of the materials based on the same texture could be improving draw call batching.

Much more likely is that Mine3D uses a lot of idle animation, transition effects, and DOM manipulation. A lot of modern graphic design (or rather, more modern than the original Tomb Raider games) emphasize having a lot of visual "breath" in a game. All of that sort of stuff runs on the CPU, where it will be hurt the most by not being tuned completely.

And it's really hard to get DOM and WebGL working together smoothly. There are a variety of things you can do in DOM that will trigger disabling hardware-accelerated 2D compositing in the browser, and I am not aware of anywhere they are documented clearly and plainly, so trying to mix the two is fraught with peril. It's best to just not do it and implement your UI for your game 100% in WebGL.

Re:OpenLara – Web-based classic Tomb Raider engine remake by letalvoj on Sunday April 23, 2017 @10:11AM (#14178210)
Bats just followed me under water... Also I am unable to shoot them as long as they are attacking me. Is it a OpenLara bug or feature from the original game?
Re:OpenLara – Web-based classic Tomb Raider engine remake by bshimmin on Sunday April 23, 2017 @10:21AM (#14178259)
Bug.

This is an incredible achievement though and just the sort of thing I love to see here on a Sunday!

Re:OpenLara – Web-based classic Tomb Raider engine remake by badsectoracula on Sunday April 23, 2017 @12:40PM (#14178882)
The first is a bug. The second is still a bug, but it is how the bats behave in the original game.
Re:OpenLara – Web-based classic Tomb Raider engine remake by emilioolivares on Sunday April 23, 2017 @10:46AM (#14178347)
Wow, I played this game when I was a kid. Can't believe it's just running inside the browser. Great job.
Re:OpenLara – Web-based classic Tomb Raider engine remake by jhoutromundo on Sunday April 23, 2017 @11:00AM (#14178406)
Ho my...Tomb Raider is my favorite game since I played Tomb Raider 2. I've got extremely excited about this project! Nice 60FPS, nice movements (although the controls are completely different from the TR1-5 games)!

I'll try to help this guys somehow.

Re:OpenLara – Web-based classic Tomb Raider engine remake by eriknstr on Monday April 24, 2017 @02:07PM (#14186528)
Oh man this is positively insane! The original Tomb Raider games are probably my all time favorite video games. I recently revisited Tomb Raider for PlayStation in an emulator on my laptop. I find it a bit mind-blowing that OpenLara in the browser seems to be performing better than the native PSX emulator did.

I think perhaps the ctrl-action button is more sensitive here than it was in the original PC version? In order to get out of the water hole I had to swim into the corner basically. It was a long while since I played the original on PC though so who knows.

Mad respect.

Re:OpenLara – Web-based classic Tomb Raider engine remake by thedudemabry on Monday April 24, 2017 @02:15PM (#14186605)
Wow. I remember playing the original almost 20 years ago on a PC that really didn't support it at a terrible framerate. The fact that I can play it now in a browser window on a netbook without it breaking a sweat is astonishing.
Re:OpenLara – Web-based classic Tomb Raider engine remake by Vanit on Friday April 28, 2017 @03:27AM (#14217532)
The Anniversary remake is worth checking out if you haven't already :)
Re:OpenLara – Web-based classic Tomb Raider engine remake by bobajeff on Sunday April 23, 2017 @10:28PM (#14181551)
This work pretty well on my phone. Like the touch controls almost make it convenient to play without a gamepad.

They just need to fix the issue of the browser highjacking touch inputs and add fullscreen support.

Re:OpenLara – Web-based classic Tomb Raider engine remake by coding123 on Sunday April 23, 2017 @11:20PM (#14181730)
Same here can't believe we reached a point where the phone can play these..
Re:OpenLara – Web-based classic Tomb Raider engine remake by thirdsun on Monday April 24, 2017 @02:36AM (#14182342)
In a browser, no less.
Re:OpenLara – Web-based classic Tomb Raider engine remake by futun on Sunday April 23, 2017 @03:38PM (#14180012)
Very nicely done. Congrats.

Always thought the TR games were pretty awful, personally. Those were the days when they were still trying to get 3rd person 'right'. But the implementation here is solid.

Re:OpenLara – Web-based classic Tomb Raider engine remake by NTripleOne on Monday April 24, 2017 @02:48AM (#14182376)
They were great games hampered by some pretty abysmal controls, dual analogue wasn't exactly commonplace at the time (hell, the dual analogue controller was released the year after TR1 came out) so there was only so much you could do with just a d-pad. The controls got noticeably more tolerable as the series went on but even then it was the same tank controls full of animation lock-in (sidestepping being the main one).
Re:OpenLara – Web-based classic Tomb Raider engine remake by Kenji on Sunday April 23, 2017 @10:05AM (#14178189)
Rock solid 60fps, works out of the box on Chrome. I am impressed.

EDIT: To swim forward under water, press space!

EDIT2: Somehow, there's a bug with climbing out of the water, making her climb up on the edge, then places her like half a meter forward and she plays the climb animation again (clipping into the ground), then places her half a meter forward, etc, until she is stuck in the wall.

Re:OpenLara – Web-based classic Tomb Raider engine remake by hammerandtongs on Sunday April 23, 2017 @10:29AM (#14178293)
Why don't you make an issue?

https://github.com/XProger/OpenLara/issues

Re:OpenLara – Web-based classic Tomb Raider engine remake by shmerl on Sunday April 23, 2017 @04:15PM (#14180226)
Very good. Looks like it's using OpenTomb?
Re:OpenLara – Web-based classic Tomb Raider engine remake by eriknstr on Monday April 24, 2017 @04:26AM (#14182721)
It says that it's inspired by OpenTomb. From a cursory glance it does not seem to me that it's using OpenTomb.
Re:OpenLara – Web-based classic Tomb Raider engine remake by pinum on Sunday April 23, 2017 @02:40PM (#14179646)
Nice! But if you're keeping the original PC controls, why swap alt/space? It's severely messing with my muscle memory.

Edit: Also a wolf followed me underwater and ran around normally. And I seem to have unlimited underwater time. Is there a tracker for how complete the project is/a roadmap? Either way, awesome stuff!

Re:OpenLara – Web-based classic Tomb Raider engine remake by gregmac on Sunday April 23, 2017 @03:39PM (#14180020)
Space to jump seems quite normal to me, but what didn't was that A/D turned instead of side-stepped. I remember playing Tomb Raider when it came out, but I don't remember it doing that. I actually find it nearly impossible to move around with those controls, and I had the same problem with web ports of Wolfenstein.

This port doesn't have configurable controls, but with Wolfenstein you can't even configure it to do strafe without a modifier key.

It seems like at some point all these 1st/3rd person games switched to strafing by default, and using the mouse to look/turn/aim. Anyone know when that happened? What game first allowed that configuration and what first used it by default?

Re:OpenLara – Web-based classic Tomb Raider engine remake by ChickeNES on Sunday April 23, 2017 @06:31PM (#14180793)
It was popular in competitive Quake play, was included as an option in Quake II and the original Half-Life was the first game to ship with the standard WASD + mouse scheme that every game uses today.

Here's a more in-depth article on the history of WASD: http://www.pcgamer.com/how-wasd-became-the-standard-pc-contr...

Re:OpenLara – Web-based classic Tomb Raider engine remake by kstenerud on Sunday April 23, 2017 @10:18AM (#14178246)
Hmm... doesn't work on Chrome.

Uncaught TypeError: Cannot read property 'getSupportedExtensions' of undefined

Re:OpenLara – Web-based classic Tomb Raider engine remake by moron4hire on Sunday April 23, 2017 @10:25AM (#14178269)
Worked in chrome on my phone
Re:OpenLara – Web-based classic Tomb Raider engine remake by the_duke on Sunday April 23, 2017 @11:01AM (#14178410)
Works fine with Chrome 57 on Linux.
Re:OpenLara – Web-based classic Tomb Raider engine remake by pheuberger on Sunday April 23, 2017 @12:22PM (#14178783)
Also works on my Chrome on macOS
Re:OpenLara – Web-based classic Tomb Raider engine remake by chj on Sunday April 23, 2017 @10:09AM (#14178205)
Barely runnable on Firefox on Raspberry Pi but it's already incredible.
Re:OpenLara – Web-based classic Tomb Raider engine remake by corysama on Sunday April 23, 2017 @03:00PM (#14179781)
Runs great on an iPhone 6+.
Re:OpenLara – Web-based classic Tomb Raider engine remake by andybak on Sunday April 23, 2017 @06:33PM (#14180799)
I love the fact that we're even considering running stuff like this on such hardware inside a web browser.
Re:OpenLara – Web-based classic Tomb Raider engine remake by demarq on Sunday April 23, 2017 @05:08PM (#14180457)
Plays smooth like a totally native game on my old android!!
Re:OpenLara – Web-based classic Tomb Raider engine remake by pheuberger on Sunday April 23, 2017 @12:23PM (#14178789)
Man this is really sweet. Takes me back all those years.
Re:OpenLara – Web-based classic Tomb Raider engine remake by JabavuAdams on Sunday April 23, 2017 @10:18AM (#14178241)
What's with the orbiting cam? That's a really big no-no, especially since it's colliding with the environment.

Cool effort, overall.

Re:OpenLara – Web-based classic Tomb Raider engine remake by beaconstudios on Sunday April 23, 2017 @10:31AM (#14178297)
it's part of the original game.
Re:OpenLara – Web-based classic Tomb Raider engine remake by JabavuAdams on Sunday April 23, 2017 @02:59PM (#14179774)
Wow, I don't remember that.