Closed
Description
Compare these carts (both created with default sprite and map data):
-- title: game title
-- author: game developer
-- desc: short description
-- script: lua
function TIC()
if btn(4) then mset(0,0,1) end
if btn(5) then sync() end
map()
end
// title: game title
// author: game developer
// desc: short description
// script: wren
class Game is TIC{
construct new(){}
TIC(){
if(TIC.btn(4)){
TIC.mset(0,0,1)
}
if(TIC.btn(5)){
TIC.sync()
}
TIC.map(0,0)
}
}
On Lua (also tested js), press A to change a tile in the tilemap, and press B to restore the tilemap, as intended.
On Wren, press A then B. The tilemap is written to the cart. (by the way, why not provide map()
in addition to map(_,_)
?)