Thanks you.
I use TiledMap For the terrain and a litte Class for the camera :
Code:
public class Camera
{
float x, y; // Coordonnées
public Camera()
{
this.x = 0;
this.y = 0;
}
public Camera(float x, float y)
{
this.x = x;
this.y = y;
}
public float getX()
{
return x;
}
public void setX(float x)
{
this.x = x;
}
public float getY()
{
return y;
}
public void setY(float y)
{
this.y = y;
}
}
In my update() loop, I update the camera wich is centered on the player. And the camera can't show out of the terrain.
It may look smooth but it's just that.
Now the player can :
-use melee weapons
-use range weapons (like bow or gun)
-throws objects (like bomb)
I will add new features like :
-pick up munition and objects (like arrow or bullet)
-drop munition and objects
I also will work on a design for an inventory