hn-classics/_stories/1996/13285619.md

159 lines
6.2 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[Source](http://permadi.com/1996/05/ray-casting-tutorial-table-of-contents/ "Permalink to Ray-Casting Tutorial – permadi.com")
# Ray-Casting Tutorial – permadi.com
__ __
__ [ ![permadi.com][1] ][2]
* [Home][3]
* [Activities][4]
* [Games][5]
* [Mobile Apps][6]
* [Tutorials][7]
* [Blog][8]
* [About][9]
* [Awards][10]
* [Contact][11]
* [Social links][12]
* __ __
Javascript is disabled in your web browser. Please enable it [(see how)][13].
[All][14] [Technology][15] [Programming][16] [HTML][17] [Blog][18] [Adobe Flash][19] [General][20] [ActionScript][21] [iPhone][22] [JavaScript][23] [Mac][24] [facebook][25] [Flex][26] [Graphics][27] [Google Android][28] [Games][29] [Java][30] [PHP][31] [iOS][32] [xCode][33] [WordPress][34] [Photoshop][35] [RSS][36] [Tutorial][37] [Unity3D][38] [(more)][12]
[General][20]
Ray-Casting Tutorial
May 6, 1996 By fpermadi
[__0][39]
### Ray-Casting Tutorial For Game Development And Other Purposes
### by F. Permadi
#### PREFACE
This document explores the fundamental theory behind ray-casting, a pseudo 3-dimensional rendering technique that are very popular in game development arena in the 90s.  In general, this document does not bother with implementation and coding detail. The discussion will be mainly about concepts, the implementation is up to the reader.  For a casual reader, the knowledge of the _Pythagorean theorem_ and knowledge of high-school level math are assumed.  
This document was written in the year of 1996, and although ray-casting has been supplanted by newer and more powerful techniques (and hardware!), the reader can hopefully still benefit from the technique.  
Please be sure to read the [disclaimer][40] before proceeding.
#### CONTENTS
* [Introduction][41]
* [A Brief History][42]
* [What is Ray-Casting][42]
* [Ray-Casting vs Ray-Tracing For Game Development][43]
* [Limitations of Ray-Casting][42]
* [Creating a World][42]
* [Defining Projection Attributes][44]
* [Finding Distance To Projection Plane][45]
* [Finding Walls][46]
* [Finding Distance to Walls][47]
* [Drawing Walls][48]
* [Texture Mapped Walls][49]
* [Drawing Floors][50]
* [Drawing Ceilings][51]
* [Walls with Variable Height][52]
* [Horizontal Motion /  / Making the Player Move][53]
* [Looking Up and Down][42]
* [Flying and Crouching][42]
* [Combined Effects][42]
* [Shading][54]
* [Bibliography, References and Notes][55]
* [Example in Java (with source code)][56]
![caster10][57] 
Copyright 1996-2010 F. Permadi
[permadi@permadi.com][58]
This document may be printed for
personal/non-commercial/educational use, it may not be reproduced
and/or distributed without permission.
**<< [BEGIN TUTORIAL][59] >>**
[Next post__][60]
Advertisement
[Like Us on Facebook][61] | [Follow Us on Twitter][62] | [About ][63] | [Privacy Policy][64] | [Contact][65] | [Site Terms of Use][66]
(C) 2017 F. Permadi
__
[1]: http://permadi.com/wp-content/uploads/2015/05/logo.png
[2]: http://permadi.com/
[3]: http://permadi.com/ "Home"
[4]: http://permadi.com/activity-category/non-game/ "Activities"
[5]: http://permadi.com/activity-category/game/ "Games"
[6]: http://permadi.mobi "Mobile Apps"
[7]: http://permadi.com/category/tutorials/ "Tutorials"
[8]: http://permadi.com/category/blog/ "Blog"
[9]: http://permadi.com/about-me/ "About"
[10]: http://permadi.com/news-and-awards/ "Awards"
[11]: http://permadi.com/contact "Contact"
[12]: http://permadi.com#
[13]: http://www.enable-javascript.com
[14]: http://permadi.com/1996/05/ray-casting-tutorial-table-of-contents/
[15]: http://permadi.com/category/tutorials/technology/
[16]: http://permadi.com/category/tutorials/programming/
[17]: http://permadi.com/category/tutorials/html/
[18]: http://permadi.com/category/blog/
[19]: http://permadi.com/category/tutorials/flash/
[20]: http://permadi.com/category/tutorials/general/
[21]: http://permadi.com/category/tutorials/flash/actionscript/
[22]: http://permadi.com/category/tutorials/iphone/
[23]: http://permadi.com/category/tutorials/javascript/
[24]: http://permadi.com/category/tutorials/mac/
[25]: http://permadi.com/category/tutorials/facebook/
[26]: http://permadi.com/category/tutorials/flash/flex/
[27]: http://permadi.com/category/tutorials/graphics/
[28]: http://permadi.com/category/tutorials/android/
[29]: http://permadi.com/category/games/
[30]: http://permadi.com/category/tutorials/java/
[31]: http://permadi.com/category/tutorials/php/
[32]: http://permadi.com/category/tutorials/ios/
[33]: http://permadi.com/category/tutorials/xcode/
[34]: http://permadi.com/category/tutorials/wordpress/
[35]: http://permadi.com/category/tutorials/photoshop/
[36]: http://permadi.com/category/tutorials/rss/
[37]: http://permadi.com/category/tutorials/
[38]: http://permadi.com/category/unity3d/
[39]: http://permadi.com/1996/05/ray-casting-tutorial-table-of-contents/#respond
[40]: http://permadi.com/raycdisc.html
[41]: http://permadi.com/1996/05/ray-casting-tutorial-1/#INTRODUCTION
[42]:
[43]: http://permadi.com/1996/05/ray-casting-tutorial-2/
[44]: http://permadi.com/1996/05/ray-casting-tutorial-4/
[45]: http://permadi.com/1996/05/ray-casting-tutorial-5/
[46]: http://permadi.com/1996/05/ray-casting-tutorial-6/
[47]: http://permadi.com/1996/05/ray-casting-tutorial-8/
[48]: http://permadi.com/1996/05/ray-casting-tutorial-9/
[49]: http://permadi.com/1996/05/ray-casting-tutorial-10/
[50]: http://permadi.com/1996/05/ray-casting-tutorial-11/
[51]: http://permadi.com/1996/05/ray-casting-tutorial-13/
[52]: http://permadi.com/1996/05/ray-casting-tutorial-14/
[53]: http://permadi.com/1996/05/ray-casting-tutorial-15/
[54]: http://permadi.com/1996/05/ray-casting-tutorial-19/#SHADING
[55]: http://permadi.com/1996/05/ray-casting-tutorial-bibliography/
[56]: http://permadi.com/activity/ray-casting-game-engine-demo/
[57]: http://permadi.com/wp-content/uploads/2015/05/caster10-300x225.jpg
[58]: mailto:permadi%40permadi.com
[59]: http://permadi.com/ray-casting-tutorial-1
[60]: http://permadi.com/1996/05/ray-casting-tutorial-1/
[61]: https://www.facebook.com/pages/Permadicom/102374649838897
[62]: https://twitter.com/PermadiWebsite
[63]: http://permadi.com/about-me/
[64]: http://permadi.com/privacy-policy/
[65]: http://permadi.com/contact/
[66]: http://permadi.com/terms-of-use/