Question: Hello, I made a code using the processing ide and I want you to add one simple thing to the code. A cherry blossom border
Hello, I made a code using the processing ide and I want you to add one simple thing to the code. A cherry blossom border that overlaps the code. It should fit the full screen. I will leave my code here and I showed you a picture of the image so you can get a good idea of how it should look like. The cherry blossom image is called "cherryblossom.png Please make it very simple. Just this cherry blossom border is all I want added to make my sketch look good:
SPACE TO JUMP
import processing.sound.;
ArrayLists that store coordinates of the mountains
ArrayList mountain new ArrayList;
ArrayList mountain new ArrayList;
ArrayList mountain new ArrayList;
Mountain variable properties
float my my my;
float ms ms ms ;
Sprite animation frames
PImage runFrames new PImage;
int frameIndex ;
int frameDelay ; Controls the speed of the frame
int frameCounter ; Frame counter to manage animation timing
File that will run sound
SoundFile runningSound;
Variables that control jumping
float jumpForce ; jump force
float gravity ; Gravity pulling the sprite down
float yVelocity ; Vertical velocity
float characterY; Character's vertical position
boolean isJumping false; Flag to track if the character is currently jumping
void setup
size;
my height;
my height;
my height ;
generatemountain my ms;
generatemountain my ms;
generatemountain my ms;
noStroke;
Load sprite images
for int i ; i runFrames.length; i
runFramesi loadImagerunipng;
Load sound file
runningSound new SoundFilethis "runningmp;
Set character's initial position
characterY height ;
void draw
background;
Move mountains
movemountain my ms;
movemountain my ms;
movemountain my ms;
Show mountains
fill;
showmountain;
fill;
showmountain;
fill;
showmountain;
Animate sprite
if frameCounter frameDelay
frameIndex frameIndex runFrames.length;
imagerunFramesframeIndex width runFramesframeIndexwidth characterY runFramesframeIndexheight;
Apply gravity and update sprites position
if isJumping
yVelocity gravity;
characterY yVelocity;
Checks if the sprite has landed on the ground
if characterY height
characterY height ;
yVelocity ;
isJumping false;
void moveArrayList mountain, float speed, float y float size
for int i ; i mountain.size; i
mountain.getix speed;
if mountaingetx
mountain.remove;
while mountaingetmountainsizex width size
mountain.addnew PVectormountaingetmountainsizex size randomsize size y randomsize, size;
void generateArrayList mountain, float y float size
mountain.addnew PVector y randomsize, size;
while mountaingetmountainsizex width
mountain.addnew PVectormountaingetmountainsizex size randomsize size y randomsize, size;
void showArrayList mountain
beginShape;
vertexwidth height;
vertex height;
for int i ; i mountain.size; i
vertexmountaingetix mountain.getiy;
endShapeCLOSE;
Function to handle key press events
void keyPressed
if key && isJumping
yVelocity jumpForce;
isJumping true;
runningSound.play; Plays this sound when the user jumps
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
