447 karma · joined January 24, 2012
Small UX thing: Make it so you can just click a word to fill in the next empty spot, instead of having to drag, similar to when building sentences in Duolingo. Especially when not on a touchscreen, having to drag is pretty painful and reduces accessibility.
Calculate the two vectors from the camera at the very left and right of the screen (using your fov angles and sin/cos, that's fine). Then, to find the ray direction vectors for each column, interpolate linearly between your left and right direction vectors, and possibly normalize the resulting vectors if your ray walking algorithm requires it.
This will create a perspective that integrates tightly with sprites that you 3D project the usual way, and lines will stay straight lines.
k is very common shorthand for kB, at least historically.
Could save a couple of cycles per iteration by preloading the shift amounts into several GPRs before entering the loop, instead of initializing them just before use.
(Though yeah, there will be a dropoff for sure, it's just not visible here).
Generate two points which represent the left and right edges of the screen - you'd put them in at say 45 degrees left and right of the forward vector of the player. Then to generate the direction vector for each column of the screen, just interpolate linearly between those two points, and find the vector from the player to that intermediate point.