hello
How I want to be drawing a lesson
I want graphics like this http://www.java-gaming.org/topics/iconified/31245/view.html and http://www.java-gaming.org/topics/iconified/31422/view.html
but how !
thx
Looks to me like you just go into gimp or wut ever and instead of drawing rlly small images draw big ones, i would use photo shop because with their paint brush tool (i tihnk thts wut its called) has some nice dithering. And if pixels don’t work go head for vectors.
Oh… :-\ well then i have no idea
Just draw the background image and scroll it slower than the foreground.
To add onto what Longarmx said,
The Farther things are away, the slower they move.
The Closet things are away, the faster they move.
Texture layer1;
Texture layer2;
Texture layer3;
int layer1X; //X (Side to Side coordinate for lowest most background)
int layer2X; //X (Side to Side coordinate for middle most background)
int layer3X; //X (Side to Side coordinate for closest most background)
//Tutorial on timing can be found here: http://ninjacave.com/lwjglbasics4
//Its were you get the delta
public void updateBackground(int delta /*Milliseconds between frames*/){
if(movingForward){
layer3X += playerSpeed * delta; //Fastest Moving Background
layer2X += (playerSpeed - 1.5) * delta; //Middle Moving Background
layer1X += (playerSpeed - 2.0) * delta; //Slowest Moving Background
}
if(movingBackward){
layer3X -= playerSpeed * delta; //Fastest Moving Background
layer2X -= (playerSpeed - 1.5) * delta; //Middle Moving Background
layer1X -= (playerSpeed - 2.0) * delta; //Slowest Moving Background
}
}
//Now add it to your program after your render.
public void init(){
// Setup & load the textures here.
while(!Display.isCloseRequested()){
render();
updateBackground();
update();
}
}
End desired result:
(Source: Wikipedia)