Skip to content

leolangberg/3D-Engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3D-Engine

SDL computer graphics engine in C that aims to implemented 3D using Linear Algebra and 90's style programming.

Version 1.5

Renderer can now read and construct objects from .obj files (e.g. Blender).
Lighting is also slighly improved.
mountains

Version 1.4

Incorporates real 3D calculations using object space, world space, and camera space.
This is combined with a complete 3D rendering pipeline consisting of multiple stages:
  • Object culling
  • Object local-to-world transformation
  • Remove Backfaces
  • Lighting
  • Object world-to-view transformation
  • Object clipping
  • Generate Polygon list
  • Clip polygons
  • Draw polygons

Renderer allows for reading of objects as PLG files and simple vector text files.

cubes

Version 1.3

Untextured Raycaster that casts rays on a 2D outlined map to compute distance to objects.
The height of each object can thus be determined by the distance the ray travels before reaching it,
the further the distance the smaller the object. Also referred to as "fake 3D" or "2.5D".
raycaster2

Version 1.2

Rotating Wireframe 3D cube built in the 1.2 version using matrix multiplication and world to screen projection.
spincube
Source References:
  • A. Lamothe, "Tricks of the Windows Game Programming Gurus | Fundamentals of 2D and 3D Game Programming", (1999, Oct).
  • A. Lamothe, "Black Art of 3D Game Programming | Writing Your Own High-Speed 3D Polygon Video Games in C", (1995, Sep 1).
  • L. Vandevenne, Lode's Computer Graphics Tutorial: Raycasting. Lodev.org. https://lodev.org/cgtutor/raycasting.html
  • "Programming a first person shooter from scratch like it's 1995", jdh.
  • "Code-It-Yourself! 3D Graphics Engine", javidx9

About

SDL computer graphics engine in C that runs 90's style programming.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages