Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Indeed, look up / down is very simple implemented. Just alter the horizon line position. This works for the human eye for small deviations such as ±20°, but will lead to perspective distortions for higher angles.


Same with leaning. Add one more line of code and tweak the draw call:

    var ylean = (input.leftright*(i/screenwidth-0.5) + 0.5) * screendata.canvas.height / 4;
    DrawVerticalLine(i, heightonscreen+ylean, hiddeny[i]+ylean, map.color[mapoffset]);
It adds a lot to the "feeling" IMO :)


Cool, that works!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: