music and pong

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
User avatar
log in
Posts: 72
Joined: Tue Jun 24, 2008 1:06 pm
Location: neverland

music and pong

Post by log in »

again made some progress with pong

http://img517.imageshack.us/img517/4754/as006oo6.jpg

I have a background,paddle's, background and the ball bouches on screen

have some clue now how to make things move.

-first load variable ballright
-load horizontal position+ball speed
-load ball and compaire with wall
-load and sta ball right that becomes ballleft

made this simple exsample

I think you have to change the last part so that the ball doesn't bounch back in circels but adds score.

My questions how do you make the bal bounche of the paddle,with load and compaire to the paddle's sprite positions?

Second question what is the best and most easy program to make sound NERDTRACKER?
im a newbie,lets see how far i can get
User avatar
MottZilla
Posts: 2835
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla »

What you need to do is have a collision rectangle function. You compare two rectangles and see if they overlap. You can do this by checking the 4 corners. It's not hard to figure out the logic. As for the opcodes you use, when you LDA Whatever, CMP #$CompareValue, what happens is A - CompareValue = Flags. So if A was 5, and you CMP it to 5, the result is 0, setting the Zero flag which is why there is the Branch Equal opcode (BEQ). Well when you compare the Carry flag is altered too. So if the value is equal or less than, carry will be clear (Branch Carry Clear BCC) or if it's greater then carry will be set, BCS.

So basically you can use this to perform checks on if a value is greater than or equal or less than.

I hope that's what you were asking about. If you need to understand rectangle collision boxes there are many things about it if you google.

For sound there are alot of options and you just have to figure out what works for you. Just make sure if you use something like NerdTracker that it will play nice with your Sound Effects in the game.
User avatar
No Carrier
Posts: 290
Joined: Tue Dec 13, 2005 4:19 pm
Location: Gainesville, FL - USA
Contact:

Re: music and pong

Post by No Carrier »

log in wrote:Second question what is the best and most easy program to make sound NERDTRACKER?
Are you talking about sound or music? I would recommend Famitracker if you're talking about music.
Post Reply