Log In  


Cart #bunny_envmap-0 | 2020-04-21 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
67

This is a demo using tline to perform 3d environment/material mapping in pico8.

Both the object and the texture are stored in sprite memory.

67


Nicely done!

I'm curious why you have sine/cosine that take degree-based angles and convert to pico-8's turn-based angles. It's at a level where the conversion and wrapper overhead has little impact on performance, so I wouldn't call it a problem, but I'm still curious why you'd do it.


@Felice - just for convenience really, that and sin() in the pico-8 library is inverted from standard convention. you could easily change this and it wouldn't make much difference.


@jimmi

Fair enough. I do wish zep hadn't flipped sin() for the sake of making it match screen coordinates better, so I can totally understand a wrapper for that sake. I constantly have to remember flip the math in non-screen uses. With all of the carts out there, it's too late to change it, I guess. Might be nice if we could set a flag or something to say we want normal sin() behavior rather than screen sin() behavior.


1

as a novice this totally blows my mind!
It looks so good and runs stable in browser- whoa


2

This looks surprisingly good. I wouldn't have expected env mapping to come out so well on a 16 colour, 128x128 device, but wow. Well done.


The new palette looks great on this, @jimmi ! Well done. Gold star cart.



[Please log in to post a comment]