Skip to content
/ BiT Public

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

License

Notifications You must be signed in to change notification settings

frenchfaso/BiT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published