Floors! Sounds!

Java Lesson 5 finally covers how to raycast floors. In the C++ raycaster I had some pretty crazy lighting stuff going on but no floors. Now I have floors but no lighting tricks. That’ll change as we progress through the tutorials.

I had found the equations for floors long ago but could never get them to work. Turns out it was a simple problem of scale. Most tutorials do a very good job of leaving out details that turn out to be very important. My own java tutorials are pretty sparse for details right now. That’ll change later. My goal right now is mostly to just move along and summarize the advances. I’ll go back and rewrite the tutorials at a later date.

Adding sound effects turned out to be pretty easy. I found a quick and dirty wav playing class on-line. After a few hours it was turned into a solid solution. I never understood the obsession with using a fixed size array when loading files into memory. Is it really that hard to check the file size and make the buffer just the right size?

Anyway, Lesson 5 is a huge advance. Lesson 6 will continue with cleaning up and improving the code. I may add one or two new key components of game programming.

Leave a comment

You must be logged in to post a comment.

ss_blog_claim=70b9168863fc97c91e6d88b40542a327 ss_blog_claim=70b9168863fc97c91e6d88b40542a327