News for hackers. Stuff that matters.
Re:Doom by thathonkey on Friday September 12, 2014 @09:28AM (#8307887)
Could you elaborate on how it is only "marginally" more effort to make faux 3D pixel games vs. 2D pixel art games? Seems like it would be quite a bit more complicated to me...
Re:Doom by jiggy2011 on Friday September 12, 2014 @09:34AM (#8307911)
A Wolfenstein engine is pretty simple to replicate, it's basically a 2D top down game projected into the 3rd dimension.

Here's how it works.

http://lodev.org/cgtutor/raycasting.html

A doom engine is a little more involved and requires BSP trees, more clipping/culling and something closer to actual 3d (floors and ceilings with variable heights, geometry that doesn't fit onto a grid).

Both of the games used 2d sprites for enemies rather than 3d models, so you could draw all of the graphics with paint rather than a modelling tool which would probably be a significant time saver.

Re:Doom by Scuds on Friday September 12, 2014 @03:07PM (#8309810)
The BSP* algorithm used in Doom was research paper material in 1991, and Carmack was among the first to apply it to low performance PC games.

* http://en.wikipedia.org/wiki/Binary_space_partitioning

I keep thinking about the Malcolm Gladwell "Ten thousand hours to expertise" idea, and for Carmack to be looking at this sort of stuff at the age of 22, he basically had to eat sleep and shit computer graphics for years and years on end before he could be in a position to apply this to a computer game.

Re:Doom by nailer on Friday September 12, 2014 @04:25PM (#8310252)
I read something from the System Shock developers about them finding out about BSP after Doom was released. They'd spent the whole time culling levels to try and fit into memory, never considered recursively chopping it up.
Re:Doom by thathonkey on Friday September 12, 2014 @10:48AM (#8308276)
That sounds pretty complicated to me :D But, I am admittedly a layman in this area.
Re:Doom by jiggy2011 on Friday September 12, 2014 @11:13AM (#8308432)
It probably makes more sense if you follow along with the article and convert the code examples into your favourite language. The good thing is that you don't even need to use Direct3D/opengl, you could do it with only a <canvas> element in javascript for example or anything else that lets you assign colours to pixels. You could even make an ascii art version if you were so inclined.
Re:Doom by ido on Friday September 12, 2014 @12:05PM (#8308775)
Or you can use unity.
Re:Doom by jiggy2011 on Friday September 12, 2014 @12:16PM (#8308836)
You could, but the renderer in unity is optimized to deal with environments far more complex than were possible in wolfenstein or even doom and thus uses very different techniques to put geometry onto the screen.

A psuedo 3d wolfenstein clone written with a reasonably optimized raycaster would probably outperform a unity version quite significantly. I don't know how well suited unity is for having 3d game entities represented by flat textures instead of 3d models for example.

Re:Doom by krapp on Friday September 12, 2014 @01:39PM (#8309299)
I'm just starting delving into SDL2 tutorials. If I ever get competent at it, this sounds like a fairly good idea for a project.
Re:Doom by cousin_it on Friday September 12, 2014 @09:43AM (#8307941)
1) Quantity and quality of assets - I don't see much difference here, do you?

2) Game logic - a game like Wolfenstein has basically planar gameplay, you can't jump or aim up and down. You could play the same game in top-down view on a grid of squares.

3) Rendering - it should take you at most a day to write a Wolfenstein like renderer. Might be scary if you've never done 3D before, but it's a great starter project.

Re:Doom by clarry on Friday September 12, 2014 @09:57AM (#8308005)
Doom has vertical aiming, but it's automatic. There are doom engine based games which relax this limitation and let you actually look up and down, fly, even jump. It doesn't actually make things much more complicated. See heretic & hexen.
Re:Doom by jiggy2011 on Friday September 12, 2014 @10:03AM (#8308040)
I haven't looked into Doom's code very much, but based on playing the game it seems that hit detection is done in 2d. If you are shooting a target above you there is no visual indication that you are aiming higher. You can shoot at a wall and still hit an enemy above you who you cannot currently see.
Re:Doom by clarry on Friday September 12, 2014 @10:07AM (#8308062)
You may be right, I can't recall whether the hit detection cares about height, but Doom does at least some slope calculation to display the bullet-hits-wall animation at the correct height. If you look at rockets and plasma, these projectiles will also move in a slope. So if you're rocketing someone high on a ledge, it won't show you a rocket hitting the wall at eye level... even though such a rocket (if you fired it while not lined up with the target) could possibly damage the target. That may have changed with some later versions. At least some source ports change it.

In any case, heretic and hexen actually let you look up and down. Crispy Doom (among others) have backported this feature and hook it with mouse aim.

Try shotgunning someone high up and far far away. Either there's a distance limit to auto aim, or it's just really damn picky about how perfectly you're lined up. Most of your shots will hit the wall below him.. it can be frustrating.

Re:Doom by jiggy2011 on Friday September 12, 2014 @11:09AM (#8308407)
I think it's just that there are less pixels to hit when the target is further away. I'm not sure if the height difference is taken into account when calculating damage on hitscan weapons, below a certain damage output (damage output is in part random) it might not register a hit.
Re:Doom by pdpi on Friday September 12, 2014 @10:40AM (#8308240)
It's actually a pretty tricky issue with the last stage of Doom 2, where the modern ports with true vertical aiming make it impossible to hit the (hidden) impaled head of John Romero.