Thread: 2-d side scroller using allegro

  1. #1
    Registered User
    Join Date
    Feb 2012
    Posts
    3

    2-d side scroller using allegro

    Hello everyone,

    I am kind of a newbie to game programming, i am looking to code a 2-d side scroller which could do such things :
    • As the game begins, the ball starts rolling from left to right, and speeds up as the time goes on.
    • In its path, it faces obstacles like Triangles and Squares and combination of the two at random distances.
    • The player needs to jump the ball over the obstacles, suppose he hits the triangle he loses a life and stops if he hits a square and needs to jump over it, roll on the top and go ahead.

    I need to code this very urgently, and i am confused in the proper C++ and ALLEGRO coding for
    1. JUMP
    2. Random Triangles and Squares.

    Waiting for your replies.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    So how much have you read of the copious documentation and tutorials here -> Allegro - A game programming library -
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Feb 2012
    Posts
    3
    Quote Originally Posted by Salem View Post
    So how much have you read of the copious documentation and tutorials here -> Allegro - A game programming library -
    I have, not everything, but i definately tried, getting pretty confused in the random structures and the the jump scenario!

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Mmm, Allegro/STL Tutorial: chapter 6
    Study examples with gravity.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Registered User
    Join Date
    Feb 2012
    Posts
    3
    It'll be of great help, if you could simplify things for me, i am not able to find a simple logic for JUMP to implement, while the RANDOMIZATION of the Triangles and Squares is still a myth for me, i havent used STL as yet, can things be done without it? I suppose yes! Would love to see you direct me sir.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 26
    Last Post: 03-08-2011, 05:23 PM
  2. side scroller graivty
    By rocketman03 in forum Game Programming
    Replies: 5
    Last Post: 03-04-2009, 02:53 PM
  3. Side-scroller Level Design
    By jmd15 in forum Game Programming
    Replies: 5
    Last Post: 04-25-2007, 02:48 PM
  4. 2-D Side Scroller or 2-D top down
    By Stan100 in forum Game Programming
    Replies: 1
    Last Post: 11-24-2003, 07:41 PM
  5. Side scroller help
    By VirtualAce in forum Game Programming
    Replies: 2
    Last Post: 09-26-2003, 10:59 AM