a 3D maze game implemented using p5.js in WEBGL mode.

Channel:
Subscribers:
831
Published on ● Video Link: https://www.youtube.com/watch?v=FebrboVVv3A



Duration: 0:00
14 views
0


link:https://setapolo.github.io/PaMa/FebrboVVv3A.html
This code is an example of a 3D maze game implemented using p5.js in WEBGL mode. The maze is defined as a 2D array where a value of 1 represents a wall and 0 a passage. The player is depicted as a red sphere and is initially positioned at (1,1). Movement is controlled by the arrow keys, with collision detection ensuring that the player's position is updated only if the destination cell is not a wall. The maze cells are rendered relative to the center, and orbitControl() allows the view to be rotated and zoomed with the mouse. Additionally, resetMatrix() is used to reset the WEBGL transformation matrix to switch to 2D mode, enabling the display of the player's current position as text on the screen. This serves as a brief overview of the implementation.