Log In  

For those who missed the Twitter post by Zep, he's published the official 0.1.6 changelog! He said the new version is coming this week.

Pico-8 0.1.6 changelog

P#19653 2016-04-08 19:09 ( Edited 2016-04-17 23:07)

w00t! Last one to write setmetatable and coroutine tutorials is a rotten egg!

P#19655 2016-04-08 20:34 ( Edited 2016-04-09 00:34)

I'm so excited for the cartridge explorer! Also I got in the habit of typing a bit slower because of the duplicate keypress thing, that'll be nice to have fixed.

The coroutine and metatable stuff is nice too. For me, the absence of these was the only thing keeping it from feeling like full Lua.

Thanks @zep!

P#19656 2016-04-08 20:55 ( Edited 2016-04-09 00:55)

Thank god I saw this now - was going to spend the day rewriting my object system again to work around the absence of setmetatable!

P#19658 2016-04-09 05:28 ( Edited 2016-04-09 09:28)

The audio mixer pops fix is a life saver, prior to this I always had to make sure to set all muted notes to the same waveform and effect as the previous one.

The explorer sounds really exciting as well!

P#19662 2016-04-09 12:35 ( Edited 2016-04-09 16:35)

Sounds great, especially raising the memory limit again. Prevents me from the need to add some kind of swapping to Tower of Rhavenna.

P#19663 2016-04-09 14:08 ( Edited 2016-04-09 18:08)

\o/ very excited for setmetatable \o/ and memory limit increase is nice too.

P#19664 2016-04-09 15:49 ( Edited 2016-04-09 19:49)

Agreed! Memory limit increase is so welcomed. And with the metatables, I can actually transpile JS to Lua and a somewhat sane manner. :D

P#19700 2016-04-10 23:43 ( Edited 2016-04-11 03:43)

Those sound fixes will help greatly with mixing sfx with music that needs 4 channels.

And setmetatable is a very welcome thing! In anticipation, I wrote a vector math helper type that I might never use. (and it works fine in regular Lua, just need to provide atan2/sqrt as upvalues to the script)

v2mt={
__add=function(a,b)return v2(a[1]+b[1],a[2]+b[2])end,
__mul=function(a,b)return type(a)=='number'and v2(a*b[1],a*b[2])or v2(a[1]*b,a[2]*b)end,
__div=function(a,b)return a*(1/b)end,
__unm=function(v)return v*-1 end,
__sub=function(a,b)return a+-b end,
__tostring=function(v)return v[1]..' '..v[2]end,
}
function v2(x,y)return setmetatable({x,y},v2mt)end
function v2dot(a,b)return a[1]*b[1]+a[2]*b[2]end
function v2dir(v)return atan2(v[2],v[1])end
function v2mag(v)return sqrt(v[1]^2+v[2]^2)end
function v2norm(v)return v/v2mag(v)end

Just call v2 with an x and y component, and it'll generate a table value with a vector metamethods. Alternatively, call with no arguments and you get the zero vector.

This vector type supports addition (a + b), subtraction (a - b), unary negation (-v), multiplication by scalar (k v, v k), division by scalar (v / k), tostring(v), dot product (vdot), direction (vdir) + magnitude (vmag) (for polar coordinates), and normalization (vnorm). And you can also treat as a table with two elements by indexing, but be careful if you modify the components, as this will modify all references to that value.

If PICO-8 could one day support _G or _ENV (maybe as _g / _env), I'd be very happy. It's easy enough to work around, but with token and character limits, being able to index the globals table like a regular table is occasionally handy. And it means that functions/variables that are accessed by name in this fashion can just be top-level declarations, which cost less tokens than a table literal containing a bunch of junk. (no {}, no comma/semicolon delimiters needed, functions don't need to be written name = function() end)

P#19823 2016-04-16 18:30 ( Edited 2016-04-16 22:32)

0.1.6 came out. Did anyone try to search things in SPLORE? As soon as I make a search I can not reset it anymore an start another one...

P#19846 2016-04-17 18:45 ( Edited 2016-04-17 22:45)

Ah -- that's a bug. Work-around is to quit & reload PICO-8. o_o

P#19848 2016-04-17 19:02 ( Edited 2016-04-17 23:02)

thank you for quick response! :)

P#19850 2016-04-17 19:07 ( Edited 2016-04-17 23:08)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 09:55:30 | 0.010s | Q:28