Log In  
Follow
camp39
the true guide to objects, prototypes and metatables
by
[ :: Read More :: ]
a = {x=10, y=25}

b = a

b.x = 99

print(a.x)

This prints 99 but I assumed it would print 10.
I wrote code with a start table. Then I set a position table equal to the start table. I was hoping to update the position table but reset the position back to the start point at any time I wanted. I tested this out in php to make sure I wasn't crazy and it worked like I expected. I tried it out in strict Lua but it gave the result above. Why does Lua change the a table when I only changed the b? How do I deal with this?

P#147872 2024-05-03 23:49

[ :: Read More :: ]

In pico-8, when I want to reuse a sprite sheet for a new cart, I would just
copy/paste all the gfx and map data at the end of the file. It's not so simple
in Picotron.

How do I start a new cart in Picotron with an existing sprite sheet and map?

P#147524 2024-04-29 02:42

[ :: Read More :: ]

Mate-in-2 Volume 2. 33 more puzzles. White to move.

Cart #matein2vol2-0 | 2024-04-22 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

P#147158 2024-04-22 23:58

[ :: Read More :: ]

Cart #matein2volume1-0 | 2024-03-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

33 mate-in-2 puzzles. White to move. Will release more volumes.

P#144867 2024-03-28 16:50 ( Edited 2024-03-28 17:17)