GithubHelp home page GithubHelp logo

nathanielfernandes / ray-casting-sandbox Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 0.0 2.74 MB

An implementation of raycasting to display a pseudo-3D playground

Home Page: https://raycasting.nathanferns.xyz

Rust 100.00%
raycasting rust macroquad

ray-casting-sandbox's Introduction

Ray Casting Sandbox

An implementation of raycasting to display a pseudo 3D playground

Many early "3D" games (such as Wolfenstein 3D) used the same or similar techniques to create pseudo 3D worlds. Although only squares can be placed in the editor this engine works with any polygon or shape. (diagonal walls aswell).

About

This ray casting engine was written in rust and uses the macroquad game development library for drawing to the screen. It was very fun to work on and I will update it to be a complete resource for anyone trying to make one themselves.

Highlights

  • The engine corrects for all distortion and has toggles between different distance calculation methods and ray casting methods.
  • When in debug/settings mode there is a visualization of what the camera sees vs the rays being cast out.
  • Almost everything from the FOV to Amount of rays being cast is adjustable live.
  • There is a few different textures to select through and they can be placed freely.

Try it out

The engine was built for wasm and is available HERE

Screenshots

pic1 pic2

ray-casting-sandbox's People

Contributors

nathanielfernandes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.