Jump to content
IGNORED

Session 25? Let's start with missles perhaps...


MayDay

Recommended Posts

Andrew Davie:  I barely have enough time to keep the tutorials going, yet alone make corrections to them. Adding another process (keeping the summaries correct) is beyond my capability. That's why I'm a bit dubious about the summaries. Ultimately I'm just going to write what I can, and whatever other people add or do is pretty much up to them.

 

Since it has been a year and a half since the last lesson, I'm guessing Andrew has found more important things to do other than babysit us newbs. :) Andrew's tutorials are without a doubt the best written and most imformative of the tutorials for a complete beginner. The amount of time and information he gave us are unmatched on the internet. He gave us the information to have working kernals and ability to play and expiriment with them. For his hard work he is to be commended and he has my thanks for his efforts.

 

Since he taught us what to eventually expect in our games (along the lines of game elements) I thought it would be a good idea to once again take up his creative spirit and try to continue the tutorials. That is, unless Andrew has plans to come back to this at some point, and I would gladly be patient enough to wait for such time. :)

 

I figure if myself or someone else posts a new topic every week or two, beginners and experienced programmers alike can give their thoughts and tips on each subject. Since Andrew covered playfields and began on sprites, I figure missles are as good of a spot to start as any. The other reason for starting with missles is that we already have a resource to reference, that being Kirk Israel's tutorials located here: http://alienbill.com/2600/101/ Simply go through his lessons and you will see code for changing the size of the missile and setting it in motion, as well as reading the collision detection with a sprite. Very useful stuff.

 

Anyway, I hope this idea catches on and thought I would see what you all think.

 

-Jason

Edited by MayDay
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Well, since this topic has gotten no response so far, I thought I would try to start things off by sharing what I know about missiles (which is not all that much). First there are two missiles (three if you count the ball) and each missile is associated with with one of the players. The player 0 missile will share a color with the player 0 sprite, as will missile 1 with player 1. The missiles start out at one pixel wide but can be expanded into 2 pixels, 4 pixels, or 8 pixels. The width of the missile can be changed on each scanline. The missile’s height can be a single pixel, or can run the entire screen (192 pixels).

 

From Alien Bill’s tutorial:

“the Atari can tell if any 2 of its 6 items (players (P), missiles (M), ball (BL), and playfield (PF)) have collided. There are 15 1-bit latches. (Do the math...the playfield could've hit any of the other 5 object, the ball could've hit any of the other 4 objects (we've already counted the playfield/ball collision) etc.... 5+4+3+2+1 = 15.)

 

[table inserted here with values]

 

What this says is if, say, Missile 1 has hit Player 0, then D7 of CXM1P will be 1. If the two missiles collide, then D6 of CXPPMM will be 1. There's one final trick which seems confusing at first but is secretly useful: when two things collide, that latch stays set with a 1 even if they then move apart. Latches stay set until you hit the register CXCLR, which resets all the latches to zero. So that way, you don't have to check for collisions every time if you don't want to. In practice, most games will read all the collisions they care about and then hit CXCLR every time screen frame, but it's nice to have the option.”

 

If you are a beginner and have not already done so, please check out the following code, which as I said in the first post can be found at Kirk Israel’s website.

 

missile.ZIP

 

And if you aren't a beginner, please correct all the mistakes I made and add to this! :)

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...