Hi everyone, I’ve just started working with Processing and I need your help on my project.
I’m tryna make the classic “Breakout” game and, to start, I’d like to have a “blinking” title.
My goal is to have this red and brown “breakout” text with changes from brown to red and
from red to brown every second, but I really don’t know how to do that! Here’s what I wrote,
with this code my text “blinks” but keeps brown just for a millisecond and I really have 0 ideas
on what to write to make it blink properly. Also, if you have any better solution for a blinking
text, it’d be awesome. Thanks beforehand.
Hi, thanks a lot for you reply. I don’t really understand where to write those codes, so here’s what I wrote (this doesn’t work, it just displays the brown image).
I made a mistake (corrected it now). I forgot to place the “else” here:
if (showImageNumber1)
image(titleR, 90, height/2-130);
else image(titleB, 90, height/2-130);
By the way
you can auto-format your code by hitting ctrl-t in processing IDE prior to posting
in the post: you can highlight your code (without the text) with the mouse and click ctrl-e (or click the </> icon in the small command bar with the mouse). Then the code is formatted as code.
In the small command bar you can find other formatting tools too.
thanks a lot it works now!!! i’ll probably need some more help in the future (also for this code) so if you’ll be able to help me it’d be great! thanks a lot again