I need your help! (challenging game remake)

I recently tried out a game called One More Line. You can try the game free in your browser here: http://www.newgrounds.com/portal/view/649197 (don't worry it's a very quick simple game, so you'll get the drift quickly)

It's really cool and it inspired me to try making something with very similar mechanics in Processing. I'm finding it to be more difficult than I expected.

I guess I'm just wondering if anyone can help me out with this.

Tagged:

Answers

  • I hate this game, sorry, I'm not in

  • Answer ✓

    Yeah, that game is pretty terrible...

    Anyway, without knowing what you already have working, it's sort of hard to help. Basically, post what code you already have, and be sure to read the pinned threads about how to format it for the forums.

  • I haven't been able to get very far at all, but I'll share my code (below). All I have is a ball that's moving up.

    Some more specific questions are: 1. How do I get the "camera" to follow the ball as it moves up? 2. How can I get the ball to turn along a circle (when I hold in a certain key) and then continue in a straight line, in the direction it is facing at the moment that I release the key?

    My code so far:

    int ballX = 400;
    int ballY = 600;
    int speed = 5;
    
    void setup(){
      size(800, 600);
      frameRate(30);
      background(231, 76, 60);
    }
    
    void draw(){
      noStroke();
    
      // draw ball itself
      fill(26, 188, 156);
      ellipse(ballX, ballY, 50, 50);
    
      // make ball move up
      ballY = ballY - speed;
    }
    
  • Answer ✓

    hello,

    the game looks fun and it's great that it does inspire you.

    The camera doesn't move, it's rather so, that the obstacles / street / enemies move down and new stuff is spawn at the upper side. But for the time being just move the ball and when he leaves the screen let him come out at the lower border again.

    To move the ball sideways just add a speed to it when you hold down the key. Just as you do with ballY = ballY - speed;

    int ballX = 400;
    int ballY = 600;
    int speed = 5;
    
    void setup() {
      size(800, 600);
      frameRate(30);
      background(231, 76, 60);
    }
    
    void draw() {
      background(231, 76, 60);
      noStroke();
    
      // draw ball itself
      fill(26, 188, 156);
      ellipse(ballX, ballY, 50, 50);
    
      // make ball move up
      ballY = ballY - speed;
    
      if (ballY<0)
        ballY = height+20;
    }
    
    void keyPressed() {
      if (keyCode==RIGHT) 
        ballX = ballX + 3;
      if (keyCode==LEFT)
        ballX = ballX - 3;
    }
    

    Best, Chrisir ;-)

Sign In or Register to comment.