esplonky #1 Posted April 5, 2011 How do i add sound to my atari game? i want to add like a descending low tone when i fire missile0 and a low static noise when the missile0 hits player1, btw, when opening the ROM itll show a black screen, simply press fire. default.bas Quote Share this post Link to post Share on other sites
+Random Terrain #2 Posted April 5, 2011 Check out my Fake Gravity Platformer Test code here: http://www.atariage.com/forums/topic/179473-fake-gravity-platformer-test/ That's one way to add sound. Quote Share this post Link to post Share on other sites
esplonky #3 Posted May 3, 2011 i want a tutorial with some basic code that is just sounds Quote Share this post Link to post Share on other sites
yuppicide #4 Posted May 4, 2011 I've tried a few times to add sounds to my game. Nothin doing for me. They never come out how I envision them to sound. They either don't work for me, or just make a quick bleep. Quote Share this post Link to post Share on other sites
+atari2600land #5 Posted May 4, 2011 Have you looked at RT's page about sounds? Quote Share this post Link to post Share on other sites
+Random Terrain #6 Posted May 4, 2011 i want a tutorial with some basic code that is just sounds I have to finish a couple of things first, but after that, I'll make a little example program based on what I posted and see if that helps. 1 Quote Share this post Link to post Share on other sites
yuppicide #7 Posted May 5, 2011 RT's the one who helped me in the past, but unfortunately the only help that helped me was him actually doing the work for me. I was unable to successfully do things on my own. I tried inserting the sound in various spots. Quote Share this post Link to post Share on other sites
esplonky #8 Posted May 23, 2011 just posting here so i can use it at school Quote Share this post Link to post Share on other sites
esplonky #9 Posted May 26, 2011 ok so i have everything i need for my final version of Desando Joe! but i want sound effects. i put a yars revenge sound in the background (weird buzzy wah wah) and i want my missily to fire and make like a electric buzz with the sound deepening like as if a missile was firing and a staticy sound when it hits the enemy. could you please put that into my code Random Terrain, nukey shay rev eng, or seaGtGruff. You guys are the best at batari BASIC in my opinion. so i am coming to you four. rem * i like trains lives = 128 dim lives_centered = 1 dim lives_compact = 1 set romsize 4k titlescreen scorecolor = $CA playfield: <on> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X.....XXXXXXX..............XX..X X..X...XXXXXXXXXXX...XXXXXXXX..X X..XX...XXXXXXXXXX...XXXXXXXX..X X..XXX...XXXXXXXXX...XXXXXXXX..X X..XXXX...XXXXXXXX...XXXXXXXX..X X..XXX...XXXXXXXXX...XXXXXXXX..X X..XX...XXXXX..XX....XXXXXXXXXXX X..X...XXXXXX.......XXXXXXXXX..X X.....XXXXXXXX.....XXXXXXXXXX..X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end COLUPF = $2E COLUBK = $CA const pfres = 12 drawscreen if joy0fire then goto start goto titlescreen start playfield: ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ end COLUBK = $C6 COLUPF = $1E player0x=99:player0y=90 player1x=20:player1y=20 missile0height=8:missile0y=255 NUSIZ0 = $82 scorecolor = $0 sprites player0: %00000000 %01000100 %01000100 %01000100 %01000100 %00111000 %00111000 %00111000 %00111000 %00111000 %00111000 %00111000 %00111000 %11111110 %10111010 %10111010 %10111010 %00111000 %00000000 %00000000 end player1: %00000000 %00100100 %00011000 %00111100 %00011000 %00011000 %00111100 %00000000 end COLUP0 = $84 COLUP1 = $42 if f=20 then f=0 if missile0y>240 then goto skip missile0y = missile0y-2:goto draw_loop skip if joy0fire then missile0y = player0y-12:missile0x =player0x+4 if switchreset then reboot draw_loop drawscreen AUDV0 = 6 AUDC0 = 3 AUDF0 = 13 if player1y < player0y then player1y = player1y+1 if player1y > player0y then player1y = player1y-1 if player1x < player0x then player1x = player1x+1 if player1x > player0x then player1x = player1x-1 player1x = player1x:player1y = player1y if joy0up && player0y > 19 then player0y = player0y-1: goto jump if joy0down && player0y < 89 then player0y = player0y+1: goto jump if joy0left && player0x > 1 then player0x = player0x-1: goto jump if joy0right && player0x < 154 then player0x = player0x+1: goto jump if collision(missile0,player1) then score=score+1:player1x=rand/2:player1y=0:missile0y=255 if collision(player0,player1) then lives=lives-32:player1x=rand/2:player1y=0:missile0y=255 if lives < 32 then reboot jump goto sprites Quote Share this post Link to post Share on other sites
esplonky #10 Posted May 26, 2011 change the AUDV0 = 6 to AUDV0 = 4 because its too loud to me Quote Share this post Link to post Share on other sites
+Random Terrain #11 Posted May 26, 2011 ok so i have everything i need for my final version of Desando Joe! You said that you were doing this for school, so that must mean you have a deadline. If your teacher just wants you to have anything moving on the screen, then I guess you have everything you need. But if you are trying to make a real game, you're not even close to having a final version. There's not much of an actual game there yet. I don't know if you'll be able to use it, but I started working on an example program yesterday (I finally finished the Andrew Davie Sessions and the Robert M Lessons, so now I can get back to bB programming). I'll try to get it finished today if I can. But like I said, there are different ways to do sound, so you may not want to use it. I don't know if anyone will want to insert sound effects for you, but below is your program in downloadable form so nobody has to copy and paste, just in case. Here's the .bin file to use with an emulator: esplonky_2011y_05m_26d_0501t.bin Here's the bB code: esplonky_2011y_05m_26d_0501t.bas Quote Share this post Link to post Share on other sites
esplonky #12 Posted May 26, 2011 it's not for school exactly, my computer teacher is wanting me to do stuff for her, and this is my first attempt at bB so im still learning right now lol. but i wanna make a platformer soon just to try it. Quote Share this post Link to post Share on other sites
+Random Terrain #13 Posted May 27, 2011 OK, here's my first draft of the example program. It uses data and bankswitching since you were asking about that. Move the joystick in 4 directions and press the fire button to hear the sounds. Here's the .bin file to use with an emulator: ex_sound_using_data_2011y_05m_26d_2339t.bin Here's the bB code: ex_sound_using_data_2011y_05m_26d_2339t.bas Quote Share this post Link to post Share on other sites
+Random Terrain #14 Posted May 27, 2011 It's on the bB page now: www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#sound_example Quote Share this post Link to post Share on other sites