Jump to content
Sign in to follow this  
esplonky

Sound

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

  • Like 1

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...