title: How to make a sprite jump up and return to original position GDXLib
body: <p>I'm very new to programming so bear with me here...</p>
  
  <p>I'm making a basic 2d android game. I am trying to simply make a sprite jump up in the air a bit and then land back to where it originally started. The sprite that I want to jump is "ball2". This is my code so far (Basically just added textures and the sprite in the correct position to start the jump but haven't done anything else).</p>
  
  <p>Any help is appreciated.</p>
  
  <pre><code>public class MyGdxGame extends ApplicationAdapter {
  SpriteBatch batch;
  Texture background;
  Texture ball;
  Texture spike1;
  Texture spike2;
  
  
  @Override
  public void create () {
      batch = new SpriteBatch();
      background = new Texture("gamebackground.png");
  
      ball = new Texture("ball2.png");
      ball.setFilter(Texture.TextureFilter.Nearest, Texture.TextureFilter.Nearest);
  
      spike1 = new Texture("spike1.png");
      spike1.setFilter(Texture.TextureFilter.Nearest, Texture.TextureFilter.Nearest);
      spike2 = new Texture("spike2.png");
  
  }
  
  @Override
  public void render () {
  
      batch.begin();
      float scaleFactor = 2.0f;
      batch.draw(background, 0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
      batch.draw(ball, 80, 145, ball.getWidth() * scaleFactor, ball.getHeight() * scaleFactor);
      batch.end();
  
  }
  </code></pre>