This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

SPower presents ...


Raycasting Engine

This is a raycasting engine based on a tutorial I found, with my own fixes and additions. It's quite fast, although it's A LOT faster once you download it. It also has support for sprites (objects in the world).

-Arrow keys to move forward and backward and turn
-Hold shift to strafe using the left and right arrow keys.

It is a conversion of the raycasting tutorial found here (3 parts): (not implemented)

The texture mapping textures and the sprite images are taken from the game Wolfenstein 3D.

I've changed the way the texture mapping works, by taking slices (each with the width of 1) of the image, scaling the height and drawing them. I also added a way to load maps from really simplistic txt files.

I hope you like it, and please give me feedback!

10374 views / 1514 in the last 7 days

18 votes | 0 in the last 7 days

Tags: demo with-source 3d sprite raycast raycasting

This scenario is a member of: Reusable actors & support classes, Ray Casting

open in greenfoot

There is no HTML 5 translation of this scenario available.
View legacy version (requires Java plugin)

This scenarios uses Java features that are not available for use after conversion to HTML 5. Please try the legacy version, which requires the Java plugin to be installed.

A new version of this scenario was uploaded on Sun Sep 22 17:19:58 UTC 2013 -Added depth sorting of sprites -Huge memory improvements
A new version of this scenario was uploaded on Sun Sep 22 17:24:16 UTC 2013 Improved comments


Wow! It is good to see that you fixed the glitches and improved the code. Good job!
Yay, much better, really like this. Great job!


Thanks to both of you!


Now THIS is amazing!




I'm actually making a game using this engine, but with some great extras. Something great is coming up! (although I don't know how long it will take)


Hey, I am impressed with your implementation, but you probably hear that a lot.


Actually, I don't! Thank you! And maybe you should check out the original tutorial, it explains alot more about the technology (if you're interested in that)

See all comments

Want to leave a comment? You must first log in.

Who likes this?

Nosson1459 EthanMc Oldmoe RUMMAKER blobfishlover Game/maniac bourne Builderboy2005 Upupzealot MatheMagician Zamoht JetLennit Busch2207 wabuilderman USBest Entity1037 FlyingRabidUnicornPig Kartoffelbrot