1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

GML Where can I find an Air Hockey Tut?

Discussion in 'Programming' started by BBTP, Sep 12, 2019.

  1. BBTP

    BBTP Member

    Joined:
    Sep 5, 2019
    Posts:
    5
    Hello!

    I am interested in learning how to code an Air Hockey game that is not DnD, where can I find a good tutorial for one?
     
  2. spoonsinbunnies

    spoonsinbunnies Member

    Joined:
    Aug 24, 2018
    Posts:
    115
    I mean if you want to make an air hockey game I would look into pool tutorials, when you want to make something breaking it into smaller things you know or can figure out helps, air hockeys main mechanics would be

    *something that you can move with WASD or the mouse, this can be learned with any tutorial

    *making a puck that bounces off anything(bouncing is really the hard part of what your asking at least for me, pool games handle bouncing off of round objects fine though so any tutorial for that should help you there)

    *and finally having the puck speed up if the paddle that it bounces off of is moving in any direction past parrallel to the puck, then slow down to its original speed, this is essentially just friction with a clamp on speed.

    that's everything you need to make air hockey, I doubt you'll find a game specific turtorial for it because outside of touchscreen it doesn't apply well too mouse or keyboard controls in general, however if you can figure out these principles, you can make an air hockey game quite easily. this also seems like a game that would benefit greatly from the physics engine if one can turn the built in friction off for the puck.
     
  3. BBTP

    BBTP Member

    Joined:
    Sep 5, 2019
    Posts:
    5
    Ok, thanks I'll look into it
     
  4. TheouAegis

    TheouAegis Member

    Joined:
    Jul 3, 2016
    Posts:
    7,143
    Air hockey is just Pong for drunk people...
     
    Amon and Binsk like this.
  5. Binsk

    Binsk Member

    Joined:
    Jun 22, 2016
    Posts:
    630
    I was gonna say, he should just learn to make "pong". It is essentially the exact same concepts just with a 1D paddle movement instead of 2D.
     
  6. spoonsinbunnies

    spoonsinbunnies Member

    Joined:
    Aug 24, 2018
    Posts:
    115
    well and the paddle in air hockey can give momentum to the puck, isn't the ball speed in classic pongs speed constant?
     
  7. Binsk

    Binsk Member

    Joined:
    Jun 22, 2016
    Posts:
    630
    You can't run before you can walk. Design a pong game since that gets all the base elements out of the way. Once you have this add on to it one element at a time to make air hockey.

    That is how most programming goes, anyway.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice