Jump to content
Sign in to follow this  

Recommended Posts

Could anyone link me to tutorials/books on how to shoot a missle, i know it has something to do with the ENABLM0 command, nut i'm having a hard time finding where to start.

Share this post


Link to post
Share on other sites
35 minutes ago, sparkplug.0128 said:

Could anyone link me to tutorials/books on how to shoot a missle, i know it has something to do with the ENABLM0 command, nut i'm having a hard time finding where to start.

The registers ENAM0, ENAM1 and ENABL turn display of their associated objects (Missile 0, Missile 1, Ball) on or off, depending on if you write 0 or 1 into bit 1 (value=2). When enabled, then the object is displayed every single scanline. When disabled, then not shown at all. So to have a missile travelling up the screen, for example, your code needs to turn the missile on/off at the appropriate scanlines.  You'll have to keep a track of the scanline being displayed, compare with a missile vertical position, and then set/clear the appropriate enable bit (on/off).  No easy way out, I'm afraid.

 

Share this post


Link to post
Share on other sites
9 hours ago, sparkplug.0128 said:

Could anyone link me to tutorials/books on how to shoot a missle, i know it has something to do with the ENABLM0 command, nut i'm having a hard time finding where to start.

 

My Collect Tutorial covers writing a 2K game from scratch.  Missiles and ball are covered in steps 11 and 12.

  • Like 1

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.
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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...