Results 1 to 3 of 3

Thread: Andorra 2d , adding very very basic gravity (sorta)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    My tutorial was based on this article: http://www.gamedev.net/page/resource...avity-faq-r694
    It's quite easy to follow.
    NB: The part after 'The REAL Equations' is not mandatory to get it to work and can be skipped it you want.

  2. #2
    Maybe simply like this?

    Code:
    procedure TBlurp.DoMove(TimeGap: Double);
    begin
      inherited;
      if not isfalling then begin
        X:=X+X_direction;
        if X <= 0 then X:=0;
        if X > 640-Image.Width then X:=640-Image.Width;
        if Y < 0 then Y:=0;
        if Y > 480-Image.Height then Y:=480-Image.Height;
      end;
      Collision;
    end;
    but now that I think about it , this problem might go away if I finish up the part where I can't enter a platform from any angle
    That may be true.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •