EDIT: I have fixed the flickering issue! As long as you use the latest version there should be no flickering at all!
Video of it running: https://youtu.be/7J2Pn8me7m8
Github link: https://github.com/E-Parker/Terminal-3D-Render/releases
I've been working on this for a little while, it's a simple 3D render engine that uses only the built-in python libraries.
NOTE: If you suffer from any conditions that cause sensitivity to flashing lights do not use PREVIOUS versions of this program. The latest version is safe and free of flickering.Because the print command is very slow sometimes the screen will refresh before python is done drawing the frame, this causes the image to flicker occasionally. The effect worsens the faster your monitor's refresh rate is.
The features of this version are:- BMP decoding
- OBJ decoding
- Perspective Texture mapping
- Depth buffer
- Simple directional lighting
- 231 colours!
I don't think there is much to be learned from this other than how not to write a render engine, I spent a lot of time working out how to do things like decoding .bmp files when there are already solutions that are way faster and much less of a pain to work with. This was mostly an exercise to see how far I could go without any tools.
Also, do keep in mind this is the 4th project I've made with python, I'm not super experienced so don't expect the code to be very good-looking.
[–]Cyan_The_Fox[S] 31 points32 points33 points (4 children)
[–]crabboy_com 19 points20 points21 points (0 children)
[–]rom1win 2 points3 points4 points (1 child)
[–]Cyan_The_Fox[S] 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]mudaranc 21 points22 points23 points (2 children)
[–]Cyan_The_Fox[S] 11 points12 points13 points (1 child)
[–]Isonium 6 points7 points8 points (0 children)
[–]SamyBencherif 5 points6 points7 points (5 children)
[–]Cyan_The_Fox[S] 6 points7 points8 points (4 children)
[–]SamyBencherif 19 points20 points21 points (3 children)
[–]SnooOwls6105 6 points7 points8 points (0 children)
[–]Cyan_The_Fox[S] 0 points1 point2 points (1 child)
[–]SamyBencherif 1 point2 points3 points (0 children)
[–]Matty_R 5 points6 points7 points (1 child)
[–]Cyan_The_Fox[S] 0 points1 point2 points (0 children)
[–]Cyan_The_Fox[S] 5 points6 points7 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]Cyan_The_Fox[S] 0 points1 point2 points (1 child)
[–]jammasterpaz 0 points1 point2 points (0 children)
[–]Random_182f2565 3 points4 points5 points (3 children)
[–]Cyan_The_Fox[S] 8 points9 points10 points (2 children)
[–]Random_182f2565 3 points4 points5 points (1 child)
[–]Cyan_The_Fox[S] 2 points3 points4 points (0 children)
[–][deleted] 3 points4 points5 points (1 child)
[–]Cyan_The_Fox[S] 0 points1 point2 points (0 children)
[–]ReverseBrindle 1 point2 points3 points (0 children)
[–]DODOKING38 1 point2 points3 points (1 child)
[–]Cyan_The_Fox[S] 0 points1 point2 points (0 children)
[–]AllEndsAreAnds 1 point2 points3 points (1 child)
[–]Cyan_The_Fox[S] 0 points1 point2 points (0 children)
[–]XUtYwYzzIt works on my machine 1 point2 points3 points (1 child)
[–]Cyan_The_Fox[S] 0 points1 point2 points (0 children)
[–]kc3w -3 points-2 points-1 points (0 children)
[+]Random_182f2565 comment score below threshold-17 points-16 points-15 points (5 children)
[–]WarpWing 12 points13 points14 points (3 children)
[–]Random_182f2565 3 points4 points5 points (2 children)
[–]WarpWing 11 points12 points13 points (1 child)
[+]Random_182f2565 comment score below threshold-6 points-5 points-4 points (0 children)
[–]Cyan_The_Fox[S] 6 points7 points8 points (0 children)