Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: adding sound effects in Phys2d

  1. #1
    Junior Member
    Join Date
    Feb 2013
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy adding sound effects in Phys2d

    Hi,

    I'm new to game programming. Currently I'm working on Phys2d to make some physics related simulations. i.e. two Balls colliding, object moving on surface with certain friction etc etc.

    Now I want to add some sound effects in it. it plays collision sound when two balls collide with eachother.
    I don't know how to do that. Could anyone pls guide me to accomplish this.

    Thanks in advance.


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,455
    My Mood
    Hungover
    Thanks
    144
    Thanked 638 Times in 546 Posts

    Default Re: adding sound effects in Phys2d

    Step one is to figure out how to set up events when two bodies collide. Step two is to figure out how to play sounds. Get the first part working, then worry about the second part.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Replies: 0
    Last Post: January 12th, 2012, 02:54 PM
  2. Adding sound to program.
    By Archibold9 in forum What's Wrong With My Code?
    Replies: 32
    Last Post: December 21st, 2011, 01:28 PM
  3. Adding sound to a game application
    By Shaybay92 in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: September 13th, 2011, 07:56 AM