Jump to content
IGNORED

Multiple Enemy Sprites in 2600 Games


marlowe221

Recommended Posts

I apologize if this is a very basic question but...

 

I have been doing a LOT of reading on programming for the 2600, both in Assembly and in Batari Basic. I only have a very little programming experience in the form of some Basic programming I did in high school. The idea of programming a 2600 game, even if no one else cares about it but me, is very attractive and I have already started playing around in Batari.

 

I have an idea or two for a game but they all involve too many enemy sprites on screen at once... Or at least they seem to. I know that the 2600 is limited to 2 sprites, 2 missiles, and a ball on screen at any one time. But when I look at games like Defender, Galaxian, Demon Attack, Vanguard, etc. I see more than 2 sprites on screen at once.

 

How is this done?

 

My current explanation is that there are NOT more than 2 sprites on screen at any one time but the 2600 is able to draw images on the screen so fast that it can be made to create the illusion of a screen full of bad guys that are not really there on a frame-by-frame basis, strictly speaking. Perhaps that is why in Defender, for example, one can often detect a little flicker in the enemies when there are multiple enemies on screen. I also think that is why the ship disappears when you shoot the laser - instead of a missile, the laser is actually another sprite that replaces the ship sprite. Of course that begs the question - how do you get a particular enemy sprite to "really" be on screen when the laser gets there when the game does not know which enemy the player will attempt to shoot...? Unless, of course, the enemy sprites are drawn relative to the position of the player's ship (i.e. the "aim" of the gun) and so are present on screen to be vaporized if the player pulls the trigger....

 

My head goes round and round and I honestly don't know.

 

I have no idea if all of my conjecture is correct (or anywhere in the ballpark, for that matter) and my google-fu is failing me on this one.

 

Am I way off base with these ideas about how Defender and similar games with multiple enemies on screen work? Can Batari Basic be used to create similar effects?

 

I appreciate any advice or resources for reading on this topic. Thanks!

Link to comment
Share on other sites

Check my presentation. It covers the features of the players (sprites), missiles, ball and playfield. Specifically these slides:

 

post-3056-0-32701000-1422555265_thumb.png

 

post-3056-0-70453000-1422555268_thumb.png

 

post-3056-0-84780200-1422555273_thumb.png

 

post-3056-0-98326600-1422555278_thumb.png

 

The objects can be reused vertically by repositioning them as the screen is drawn. That's how you get things like rows of Space invaders.

 

If you need to reuse objects horizontally, and the spacing works out for using duplicate and triplicate, you can use that. If not, you'll have to use flicker and draw the elements on different frames.

 

bB will handle flicker for you if you select the Multisprite Kernel or the DPC+ Kernel. If you wish to use a different Kernel you'll have to implement the flicker yourself.

 

The Kernel is the portion of the code that updates TIA scanline by scanline to draw the screen.

 

 

There are more advanced techniques, like the RESP trick used in Galaxian, for getting additional players onscreen - but it'd be better if you left that for later, after you've learn the normal techniques.

Edited by SpiceWare
  • Like 3
Link to comment
Share on other sites

  • 2 years later...

There are more advanced techniques, like the RESP trick used in Galaxian, for getting additional players onscreen - but it'd be better if you left that for later, after you've learn the normal techniques.

Dear SpiceWare, please can you tell me something about the normal techniques?
are normal techniques to use NUSIZx ? or there is more?
thanks in advance.
cheers.
Link to comment
Share on other sites

 

are normal techniques to use NUSIZx ? or there is more?
  • You can use NUSIZ to display up to three copies in a single line. If you get the timing right, you can change GRP between the copies, effectively drawing different sprites. Interleaving both players and using VDELP0/1 gives you additional head room writing GRP0/1. This is how e.g. Space Invaders does its thing, and how displaying 48 pixel bitmaps works.
  • You can alternate between two or more positions on different frames in order to exceed this limit, at the expense of flickering.
  • You can move the sprites between different lines and reuse them in another row with a different configuration (GRP, NUSIZ and color) --- there is no limit on the number of on-screen sprites you can achieve this way. That's how demon attack and many other games work.
Edited by DirtyHairy
  • Like 3
Link to comment
Share on other sites

 

  • You can use NUSIZ to display up to three copies in a single line. If you get the timing right, you can change GRP between the copies, effectively drawing different sprites. Interleaving both players and using VDELP0/1 gives you additional head room writing GRP0/1. This is how e.g. Space Invaders does its thing, and how displaying 48 pixel bitmaps works.
  • You can alternate between two or more positions on different frames in order to exceed this limit, at the expense of flickering.
  • You can move the sprites between different lines and reuse them in another row with a different configuration (GRP, NUSIZ and color) --- there is no limit on the number of on-screen sprites you can achieve this way. That's how demon attack and many other games work.

 

 

Very Nice info!! ty DirtyHairy!!

i'm working on a translation of "Atari 2600 Programming for Newbies" and trying to make my first homebrew, this is a lot of work, but i think in a near future that i must collect all the information (possible) about programming VIDEO HACKS, and, to put all that info together in my page and here in the forum in some place.
ps: is there some video hacks archive? I mean, all together with a table of contents?
cheers and ty again! :)
Edited by zilog_z80a
Link to comment
Share on other sites

Hey Zilog. :3 You can find some great tricks for multiple sprites in the MiniDig (all ASM with good descriptions) http://www.qotile.net/minidig/.

 

I use a combination of flickering and NUSIZx for my ghosts carrots in my Carrot Kingdom game to surround the player. Works quite well. ^^

 

attachicon.gifJinnyGameBankswitch986d_4_WalkingBG_3_2.png

 

 

 

 

thank you very much Jinroh!! :waving:

Edited by zilog_z80a
  • Like 1
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...