Log In  
Follow
finalpatch
[ :: Read More :: ]

No more compromises and workarounds like Ben's article (https://medium.com/@Powersaurus/3d-floor-rendering-in-pico-8-a01f241db98d). The new tline() function simply lets us draw one row at a time instead of one pixel.

P#74817 2020-04-16 11:11

[ :: Read More :: ]

So I find that organizing my code with data structures and functions adds a lot to the runtime cost in PICO-8.

For example, doing vector math with objects like {x=1,y=2}, and functions like

function vadd(v1,v2)
  return {x=v1.x+v2.x,y=v1.y+v2.y}
end

greatly increases the readability of my code, but at the cost of significant performance hit.

Coming from a C++ background, this really upsets me. Modern C++ compilers are extremely good at optimising, and it's often possible to write very expressive code with almost zero overhead. While in PICO-8, if I want my code to go fast, I have to write it in a rather repetitive and messy way.

I like how PICO-8 is deliberately restrictive, but is there a way to write clean code without hurting performance too much? What are your thoughts?

P#73940 2020-03-15 06:28

Follow Lexaloffle:          
Generated 2024-03-29 07:59:17 | 0.064s | Q:6