This is an exercise in whether I could and not whether I should try and write a primitive 3D engine within 1024 compressed bytes. Turns out I could but visually it would've been better to fake it. Nevertheless, I thought I would upload it here anyway. As it's pretty rough I won't enter it officially into the jam. It would be interesting to see how people from the community who are more proficient go about the same challenge.
It lacks any depth ordering so I put some dithering in there which I wanted anyway and helps mask the problem. Similarly I thought it would be cool to have a street light effect on the "road" so dithering was used there. It also has some really ghetto hacks to prevent clipping.
Thanks @freds72 for the tri fill code from SupaHex.
Maybe this one's better overall:
Nice job, very atmospheric. =)
I recently made a tiny trifill function (just 87 tokens), and I was curious so I plugged a version of it into the second demo. Down to 972 bytes, and lower CPU usage, too.
@JadeLombax thanks for the code! I'm always amazed at how the community can keep crunching code down.
@dw817 there's only two faces (4 polys), mostly because back face culling isn't coded. I could've over-drawn the polys in a different order but with the swing of the camera, I didn't feel made it too obvious.
I guess as long as you don't close the camera in on the buildings you cannot tell, but yes, when you rotate the camera to see the buildings, you can see that there is no back to them.
Nonetheless it is an incredible effect. You really did quite master it.
Don't want to spam upload carts but here's the last edit I'll make. It includes the smaller tri fill from @JadeLombax, fixed drawing order (draw all the light sides first then all the dark ones), doubled the building count and slightly lowered the camera sway
[Please log in to post a comment]