Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Code you wrote [Part II]

Name: Anonymous 2014-09-18 3:37

All I've worked on tonight is this dumb raycaster: http://hastebin.com/iyerililov.rs

I screwed up the projection something awful and I have no idea how, but otherwise it sort of works.

To compile: Install a recent Rust+Cargo nightly, save this file http://hastebin.com/huyobaripa.toml as "Cargo.toml," put the Rust source in "src/ray.rs," and type "cargo run." It will automatically download and build the dependencies.

Name: Anonymous 2014-09-19 14:07

>>5
I like this change, but I haven't decided whether I'll add more keybindings later, and it's not terribly semantic anyway, so I'll probably break up that big array into several smaller ones containing only the mutually exclusive sets (ie. one array for W and S, and others for A/D, left/right turning, jump/crouch, etc.) and pattern match on each of them separately.

Not gonna lie, I wrote some pretty awful code there. The whole thing is in need of major refactoring and optimization. You could probably halve the line count and quadruple the frame rate if you knew what you were doing — as opposed to me, who had never written anything in Rust, or used SDL directly in any way, before slamming this together in a day and a half.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List