marlowe221 Posted January 29, 2015 Share Posted January 29, 2015 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! Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted January 29, 2015 Share Posted January 29, 2015 (edited) Check my presentation. It covers the features of the players (sprites), missiles, ball and playfield. Specifically these slides: 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 January 29, 2015 by SpiceWare 3 Quote Link to comment Share on other sites More sharing options...
marlowe221 Posted January 30, 2015 Author Share Posted January 30, 2015 Thank you very much! I will definitely read through your presentation very carefully. Quote Link to comment Share on other sites More sharing options...
zilog_z80a Posted December 20, 2017 Share Posted December 20, 2017 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. Quote Link to comment Share on other sites More sharing options...
DirtyHairy Posted December 20, 2017 Share Posted December 20, 2017 (edited) 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 December 20, 2017 by DirtyHairy 3 Quote Link to comment Share on other sites More sharing options...
zilog_z80a Posted December 20, 2017 Share Posted December 20, 2017 (edited) 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 December 20, 2017 by zilog_z80a Quote Link to comment Share on other sites More sharing options...
Jinroh Posted December 20, 2017 Share Posted December 20, 2017 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. ^^ 2 Quote Link to comment Share on other sites More sharing options...
zilog_z80a Posted December 20, 2017 Share Posted December 20, 2017 (edited) 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. ^^ JinnyGameBankswitch986d_4_WalkingBG_3_2.png thank you very much Jinroh!! Edited December 20, 2017 by zilog_z80a 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.