View Single Post
Old 31 March 2017, 15:27   #49
Master484
Registered User
Master484's Avatar
 
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 286


I finally managed to get AGA dual playfields working in Blitz, and made a new demo version.

The new ADF has been added to the attachments of the first post of this thread.

And as always the source code is included in the disk, you can freely use it in your own Blitz projects.

---

So now the demo is AGA only, and uses a 16+16 color AGA Dual Playfield screen at size 288*256.

Controls remain the same, with one addition: press "L" to fire that player mega laser.

And speed is still great, I counted about 50 bullets at 25 FPS on a standard A1200 with no fast mem. At the bottom of the screen there is a speed and object counter, "VPOS" is the position of the display beam after all drawing and game logic has been done, and the number after the "F" letter tells the frame number. Slowdown starts if frame number reaches 3 or more.

And I have now abandoned the "Xenon 2" technique and switched to "Battle Squadron" mode, so now we have a system like this:

1.
Only the Back Playfield (city background) scrolls (hardware scrolling), and this is done from the VBlank interrupt, so the scrolling stays at 50 FPS all times.

2.
Sprites and music are also still done from the interrupt and are always 50 FPS.

3.
All BOBs update at 25 FPS and are drawn to the Front Playfield, which is totally independent from the Back Playfield, which allows us to use fast QBlits without the need of a third "Unqueue source bitmap".

4.
And also because everything is now basically drawn into a clean background, objects can be drawn in lower bitplane amounts without visual side effects happening on the background graphics. So explosions and bullets are now drawn in 8 color mode, and player shots in 4 color mode. Although you can still see side effects when for example bullets are drawn on top of enemies, but this isnt serious, and even looks cool; for example explosions sometimes look like they have a transparency effect.

5.
There is no new tile creation, except when 3 screens have been scrolled; at this point there is a small pause and a new 3 screen background section is created with some 200+ Block operations, which causes a small pause, but you can hardly notice it. And in the actual game I think 6 screen sections will be used, and levels will be designed so that the new section creation always happens at a "chill out area" and not in the middle of battle.

---

And notice the long player laser ( that you can fire by pressing "L" ), it is actually a very long sprite of size 32*256. Doing a vertical blit like this with a BOB would be mega slow, but when made with a sprite it doesn't affect performance at all.

Also notice how one of the ships disappear when the laser is fired; it uses the same channels as the second player ship, so that's why this happens.

Right now, Players ship uses sprite channels 0 and 1, laser uses channels 2 and 3, and in addition to these one more channel remains free : channel 4, which right now displays a 4 color player sprite.

And the laser could of course be 4 colors instead of 16 colors, this would free one channel. And because this is AGA, sprites could be made 64 pixels wide instead of the current 32 pixels, and this wouldnt affect the available channel amount. 64 pixel wide sprites would of course be great for boss enemies and all sorts of mega effects, so maybe I'll experiment with them.
Master484 is offline  
 
Page generated in 0.06170 seconds with 10 queries