Have a look a this (now classic) cart:
https://www.lexaloffle.com/bbs/?tid=2688
That said, don't get your hope too high (and certainly not @60fps)!
Ya @freds72 it uses a simmilar technique. Anyway, I'm looking for some 30fps or 20fps, but it's a bit hard to get this result as plotting to the screen is pretty slow.
Had a second look at your code - there is a lot that can be optimized!
I don't know what is your intent, but make sure you have the fastest polygon rasterizer before going into texture mapping, like:
- efficient clipping based on face winding
- efficient vertex representation (vertex sharing between faces for one)
- optimized transform loop (e.g. use matrix to express multiple transforms, not multiple function calls)
- use lua syntax as much as possible. Ex:
x,y=y,x |
is valid and doesn't require an additional variable
This post will get you started on trifill:
https://www.lexaloffle.com/bbs/?pid=34326
(good luck!)
[Please log in to post a comment]