So here's my problem I'm doing a basic platformer with tiles drawn as ground. The tiles are basicly a texture with a hitbox drawn in a grid. But I cant draw the same image multiple times. so do I just makes thousends of image variables or is there a better way?
I've tried
public void paint(Grapihcs g){
ground.draw(mapX * tilesize, mapY * tilesize);
ground.draw(mapX * tilesize, mapY * tilesize);
}
I've tried an for loop...
public void paint(Grapihcs g){
for(int i = 0; i < 10; i++){
ground.draw(mapX * tilesize, mapY * tilesize);
}
}
Nothing seems to work... It's like it only draws it the last time.