I have a simple project. I need to slowly have an image moving across the screen. The problem is, if it goes too slow, it looks really choppy since the move from pixel to pixel seems really large (this will be on a 3646 by 768 pixel projector). Is there anything I could do to make the movement look any smoother? The relevant code is highlighted.
P.S. I'm new to programming so please critique my coding as much as you want. I'm sure I complicated things.
Code:
//Name the image file.
String wallpaperFile = "wallpaper.png";
//Establish the speed/direction the picture will move.
float moveSpeedX = 1;
float moveSpeedY = 0;
//Establish as many RGB colors as desired.
int[][] colorPoints = {
{255,255,102},
{191,255,0}
};
//Establish the transition time to the next color.
float colorTime = 30;
//Establish time to wait for the transition. Set at zero if you want the color to constantly change.
float colorSwitch = 100;
//Make the following true if you want the background color to change. Useful for png's.
boolean backgroundFlag = false;
//Make the following true if you want the tint to change.
boolean tintFlag = true;
PImage wallpaper;
float r;
float g;
float b;
float x;
float y;
int z=0;
int imageCopiesX;
int imageCopiesY;
float[][] colorRates = new float[colorPoints.length][3];