A while ago ChatGPT and I made a basic wireframe 3D engine. By adding @AqeeAqee 's triangle filler now you can fill in sides (without sorting )
So, here I’m just going to play around and make some 3D games and models.
The first thing I’m going to show you is a 3D tennis court! I am going to make this into a game if I can.
if you flip it upside down, it will look weird. this is because I haven’t done any depth sorting code so all of the lines and triangles draw in the same order
I have created an Arwing from Starfox! hopefully sometime I can finish my starfox game and make it in real 3D.
hold A and move the arrow keys to free rotate
there can be a lot of z-fighting with some models, but I tried to work around it in this one.
in case you didn’t know what z-fighting is I’ll explain:
The painter’s algorithm gets the average depth of each triangle using it’s 3 vertices and then draws the triangles with the most depth first, and then the ones closer to the viewer last. Z - fighting as far as I can tell is when the average depth of a triangle behind another is higher than the one that is supposed to be in front. This usually happens with long, skinny triangles. But there are ways that you can get rid of it making small adjustments to your model.
also, If anyone is wondering how to make your own model, all you have to do is edit the 3d cube with sorting project, set your desired amount of vertices to the positions you want them to be in, (try to use multiplications and divisions of the “size” variable instead of integers so it will look the same when the size is changed) find the triangles array thing. each triangle needs 3 vertices and one color so change the vertices in your desired amount of triangles and choose a color. now, you are done! but it takes a whole lot more to create a 3D game!
I’ve tried this before, but it seems like it is not really in ChatGPT’s capabilities. I am just going to code this game by myself this time. I’m thinking of calling it: Escape From the Huge Disgusting Dinosaur Bugs 3D