Thanks so much, @ITman496. I'll cross-post it somewhere in the new forum -- unless you would like to list it there in the Gallery as a project to inspire others working on similar things.
https://discourse.processing.org/c/gallery
...I had actuall…
translate() moves the canvas origin to 300, 300. It is reset when draw exits. Now image(p, -300, -300) aligns the image to the top corner of the canvas.
p.translate(300, 300) moves the drawing origin of the PGraphics or PImage. No matter where you …
If you want to treat each key as a switch, you might also be interested in this boolean toggle keyboard that uses a HashMap:
https://forum.processing.org/two/discussion/comment/122623/#Comment_122623
First -- there is a new forum, I suggest re-posting this there:
https://discourse.processing.org/
Second -- I would suggest a very different approach. Instead of accumulating a big stack of DelayImg (in your example, 50), just have a single image.…
One way to approach this problem is to:
begin by creating your own square. can you solve that problem first? now you have 4 out of 8 points and 4 of 12 edges.
now create a second square which is a side-length above the first square. can you draw t…
A agree -- it would be excellent if this was available as a pull request on github. Or even just as a fork, just so that people could see how your changes were done. I would be interested in making it work for mac as well, if the linked processing-p…
Glad you worked out a solution!
I ended up just copying the first 1078 bytes(54 for header, 1024 for palette) from one of the sprites and pasting that at the beginning of every file my code outputs, with needed changes like file size and width/h…
This code from PImage in saveImageIO might be related to your issue?:
https://github.com/processing/processing/blob/e83ae2054a3d3c52b1663385673fdfb26abcc96b/core/src/processing/core/PImage.java#L3221
// JPEG and BMP images that have an alpha cha…
I would never loop over the arraylist of a class Block INSIDE that class. Because that defies the logic of a class. A class takes care of ONE block and nothing outside of it. The for loop should be in a function updateBlocks() OUTSIDE the class …
Fair enough -- I suppose the whole point of doing it in a single loop, or with no parens, or in as few chars as possible is "can this work?" -- and not trying to find the most readable or maintainable solution.
I think that % twist is the whole point.
If you are expected to put А В Б in order, it doesn't matter that you learned A B in grade school. If you don't know one of them, you don't know the order.
I'm not against people learning, of course. I'm ju…
Hmm. For most people -- especially in a community with beginners in one or more languages -- I think it is better that they be really clear and not assume they have internalized Java operator precedence. Especially in a community with Java, JavaScri…
@LoCamillo -- glad you found a solution that works for you!
As a general solution to this kind of problem, look at the "framerate independent movement" approach. There is an example sketch here:
https://forum.processing.org/two/discussion/comment/…