I have a tile object which contains the sprite number and other properties. I want to update different properties at different times, instead of passing all properties all the time.
First I tried this approach:
function update_tile(values) tile = values end |
but of course that unsets anything that you don't pass in values
Then I settled on the following approach:
function update_tile(values) for k,v in pairs(values) do tile[k] = v end end |
Am I correct that this is the right way to do it, or is there a better (code readability or less tokens) way to do this?
EDIT: I just realized run
already takes an argument to serve as the breadcrumb from another cart. So this isn't an option. Never mind, nothing to see here.
Presently, to load+run you literally have to load blahblah.p8 and then run.
Would it be a bother to run the "run" code through the same line parsing that handles "load", and then auto-run it afterward?
I ask because I was running a bunch of local carts from the command line and it was a tiny bother to have to do two steps each time.
...YES, I realize this is a very minor thing, but hey, why not mention it? The worst that happens is that it doesn't get implemented, right? XD
... uh... r—right...?
Multi Marshmallow
Marshmallow Infinity with split-screen multiplayer.
=-=-=
New Version
The full version is now on the Marshmallow Infinity thread.
=-=-=
Press Z/O on up to 5 controllers to play with that many people. (4-5 might be a bit slow)
Collect coins to increase your score. The marshmallow with the most coins after everyone is burnt wins.
Blue coins will give you a coin or a life-up randomly.
Controls:
- Use the left and right arrow keys to move and Z to charge a jump.
- Release Z when the marshmallow stops flashing to jump high.
- Release Z while it is still flashing to do a small jump.
With circfill(), it's easily possible to draw circles everywhere, and even draw a circle with another circle cut out of it. But how would you draw the intersection of two circles, like the middle section on a venn diagram? I can't think of an easy way to do it. What I'm really looking for here is a way to shade arbitrary segments on an arbitrary venn diagram. Can anybody help?
If we type "x = -6", the "-6" part requires two tokens, which I assume is because the version of Lua you use was still internally treating negative literals as positive literals with a unary-minus operation applied to them, e.g. "x = unm(6)".
However, using a negative literal in PICO-8 appears to have the same cycle cost as using a positive literal, as far as I can tell with my benchmarks. For instance, "x = y / -6" costs the same as "x = y / 6".
So basically we're being charged a token for an operation that doesn't actually seem to occur, and really shouldn't need to occur anyway.
Would it be possible to delete the token cost for unary-minus if it's being applied to a literal?
The alternative is that people in dire token straits will write "x = y / 0xfffa", which is just gross. :P
Temporarily without a mouse, I notice that pico-8 ignores certain inputs from windows's mouse keys thing, where you can use the numpad to control the cursor. The default click button is NUM5, which doesn't get through. the system also uses NUM0 and NUM. for hold and release, to simulate click'n'drag, and those work fine, so you can still (clumsily!) draw pixels/stages.
Just thought I'd mention it; I understand this isnt exactly a priority thing to fix :)) but could I request a keyboard shortcut to add a code tab? I can't seem to find one and it's really the only reason I'd want to click anything in the code view. thanks!
Graph Plotter
Been working on this for a while! Hope you enjoy!
This is my first pico-8 project so I'm open to critical feedback!
Version 1.1:
-Removed polynomial setting to make way for big update ;)
-Added ability to "stamp" current graph and then calculate the intersection of the two graphs (i.e. solve the simultaneous equations)
-Bug fixes
Hello!
I'll be doing some visual effects coding and streaming it tomorrow on Twitch. That's Tuesday, March 24, 18:00 EET. This will actually be the first time I'm doing a show on Twitch, so hopefully everything goes well :)
Here's the link. See you there!