GithubHelp home page GithubHelp logo

frenchfaso / bit Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 2.0 302 KB

BiT (Back in Time) - a multithreaded raycasting recursive maze generator/game developed for JS13k 2019

License: MIT License

JavaScript 90.15% HTML 9.85%
raycaster game js13k webworkers canvas2d

bit's Introduction

BiT

BiT (Back in Time) - a compact multithreaded raycasting recursive maze generator/game developed for JS13k 2019

BiT screenshot

Play BiT(original JS13k version)

Updates since JS13k

  • moved to deferred rendering (2 passes + final mixing)
  • added simple lighting based on distance and wall angle
  • added super simple/fake ambient occlusion

Deferred rendering screenshot

This raycasting engine is inspired by the excellent Lode's raycaster tutorial series, and has been adapted to work on the web platform.
It uses webworkers to spread the work on multiple cores:
the main thread manages the gameloop (input, gamelogic), orchestrates 2 webworkers (each rendering 1 partial frame) and fuses them on the "frontbuffer" when ready. The number of threads is a variable, so you can play BiT @ 4K and 64 threads on an AMD Threadripper ( :-D this should work...).

The recursive maze generator algorithm is inspired by this wikipedia page

The A* (A-star) pathfinding algorithm is inspired by Daniel Shiffman's P5.js version.
Btw, If you don't know Dan, check out his youtube channel: it’s packed with lots of lovely creative programming tutorials and coding challenges.

The textures are from OpenGameArt: "Metal textures collection" from "Rubberduck".

It was a lot of fun working on this project. I always wanted to learn about raycasting: I fell in love with computers and 3D graphics the first time I saw and played Wolfenstein 3D with my buddy Toni. Thanks John!.

bit's People

Contributors

frenchfaso avatar zgypa avatar

Watchers

 avatar  avatar

Forkers

zgypa js13kgames

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.