3D Graphics For Gamelab

3D Graphics For Gamelab

I’ve been working on a 3d renderer for game lab for a while now, [[HERE]]

Features

It's a working 3d renderer that is fairly reliable. The main focus on the program is to condense rendering a line/face to a single object:
  {Type:"quad",V1:{x:-10, y:10, z:-10}, V2:{x:10, y:10, z:-10}, V3:{x:10, y:-10, z:-10}, V4:{x:-10,y:-10,z:-10}, Color:"red"},

Currently, the program uses perspective projection, instead of orthogonal. I haven’t worked out a reliable method to implement orthogonal so that is the reason it isn’t available.

Speed

Unfortunately too many objects can slow down the game, and by that I mean > 50 3d points (This is actually dependent on your computer). In the game, I have created a cube, which consists of 6 faces. Each face contains 4 3d points, therefore a single cube would contain 24. However, multiple points are in the same place so it is possible to shorten down the amount of points to only 8.

Modifying it

There are many uses for 3D graphics. A working game would be this one: [[HERE]] This game is just a proof of concept for some kind of 3d rpg game, where you could chat with NPCS and stuff. Also take note that the camera system is different than the first one, which was essentially freecam. How a camera behaves is not part of the renderer and should be implemented independently. Creating objects to render is very simple: Change the contents of the array game (should be line 147).

Is there a way that you could create a raycasting demo?
not raytracing, raycasting is what the original DOOM and Wolfenstein 3D used.