We're having some trouble figuring out how to get the background image to scroll vertically. Do we need to use a for loop to constantly move the image down? How did you guys go about doing this?
Our group did it by creating a new variable road_move that was put into a painter method this allowed the graphics of the window to be painted again using "repaint".
Im not sure where the painter method is in javafx, and what type is your variable?
Our group put two images in the background and move it simultaneously making it look like it was in a loop.
You mean two images on top of each other? And how did you move both simultaneously?
One image was off the screen, while the other was on. So, when the first image is slowly moving down, the one that was off the screen will now start appearing at the top. At certain point we reset it so that it keeps looping.
are you changing the coordinates of the picture in order to move it?
Yes, we are changing the coordinates of the image when the player is driving.
We also had two pictures and we were able to move them simultaneously, with the only bad thing being the different bottom and top.
You can try redrawing the image at the top when it goes off the window at the bottom.