A first-person engine in 265 lines (2014)
playfuljs.com
playfuljs.com
For example, raycasts run in constant time, so you can load up a massive world and it will just work, without optimization, as quickly as a tiny world.
If someone has some more time to try this out, the layer images of the 6502 processor here might make a good world to play around in: http://www.visual6502.org/images/6502/layers_index.html (that site appears down/intermittent currently, but archive.org has copies.)
var i = 0, s;
setInterval(function(){
i+=0.02;
s = Math.sin(i)
camera.focalLength = 0.8 + s * 0.2;
player.rotate(s * 0.02 - 0.01);
}, 16);I thought 2.5D was the term used for 2D assets used in a way to appear 3D.
Pardon my lack of familiarity with game engines if I miss-understood this.
Wolfenstein 3D for example is practically a 2D game, you could redisplay it as a top-down shooter reminiscent of early 1980s games (much like the early Wolfenstein games, actually), and not lose anything. There is no Z axis in consideration for any game logic.
Doom, on the other hand, actually does have a Z axis, determining which floors can and cannot be reached, how they are displayed, whether projectiles hit enemies or not, and so forth. The (original) engine and map format don't allow any rooms-over-rooms though, so it is still considered 2.5D -- somewhere in between a 2D game and Quake.
The term 2.5D has been obscured to the point that it no longer carries any useful meaning. We should all stop using it.
New Super Mario Bros is a 2D platformer with 3D graphics.
The fact it isn't called a 3d engine, to me as an old person who played Doom on its release, makes "first person engine" a more appropriate. name
2.5D started with Doom and it refers to games where you can move on Z axis, but can never be at the same XY point at more than one Z. That is you can't walk under or over some other path.
I don’t remember full details, but the gist of it was that Carmack optimized rendering algorithm around this specific restriction.
It's a bit old but also explains a lot of the underlying logic. And it's not written in javascript so it may be more readable to some.
Its predecessor Arena did appear to use one though.
0 - http://fabiensanglard.net/duke3d/build_engine_internals.php
Pretty cool article though!