Jump to content



0

Sound


13 replies to this topic

#1 esplonky OFFLINE  

esplonky

    Moonsweeper

  • 292 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Mon Apr 4, 2011 8:31 PM

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.

Attached Files



#2 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,918 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Mon Apr 4, 2011 9:47 PM

Check out my Fake Gravity Platformer Test code here:

http://www.atariage....latformer-test/

That's one way to add sound.

#3 esplonky OFFLINE  

esplonky

    Moonsweeper

  • 292 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Tue May 3, 2011 4:08 PM

i want a tutorial with some basic code that is just sounds

#4 yuppicide OFFLINE  

yuppicide

    I am the Black Knight. Give me your money!

  • 6,933 posts
  • Location:New Jersey

Posted Tue May 3, 2011 6:24 PM

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.

#5 atari2600land ONLINE  

atari2600land

    Quadrunner

  • 6,494 posts
  • All hail the zyzzyva!
  • Location:Salem, Oregon

Posted Tue May 3, 2011 6:28 PM

Have you looked at RT's page about sounds?

#6 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,918 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Tue May 3, 2011 9:30 PM

View Postesplonky, on Tue May 3, 2011 4:08 PM, said:

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.

#7 yuppicide OFFLINE  

yuppicide

    I am the Black Knight. Give me your money!

  • 6,933 posts
  • Location:New Jersey

Posted Wed May 4, 2011 9:41 PM

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.

#8 esplonky OFFLINE  

esplonky

    Moonsweeper

  • 292 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Mon May 23, 2011 2:49 PM

just posting here so i can use it at school

#9 esplonky OFFLINE  

esplonky

    Moonsweeper

  • 292 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Wed May 25, 2011 9:15 PM

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


#10 esplonky OFFLINE  

esplonky

    Moonsweeper

  • 292 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Wed May 25, 2011 9:23 PM

change the AUDV0 = 6 to AUDV0 = 4 because its too loud to me

#11 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,918 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Thu May 26, 2011 4:51 AM

View Postesplonky, on Wed May 25, 2011 9:15 PM, said:

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:

Attached File  esplonky_2011y_05m_26d_0501t.bin   4K   20 downloads


Here's the bB code:

Attached File  esplonky_2011y_05m_26d_0501t.bas   2.86K   14 downloads

#12 esplonky OFFLINE  

esplonky

    Moonsweeper

  • 292 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Thu May 26, 2011 8:12 AM

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.

#13 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,918 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Thu May 26, 2011 9:54 PM

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:

Attached File  ex_sound_using_data_2011y_05m_26d_2339t.bin   16K   17 downloads


Here's the bB code:

Attached File  ex_sound_using_data_2011y_05m_26d_2339t.bas   22.56K   22 downloads

#14 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,918 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Fri May 27, 2011 11:02 AM

It's on the bB page now:

www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#sound_example




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users