Hi,
I like your game however, as you say, there's lots of flicker. Is this because the screen is animating too fast?
Well sort of, the game screen rolls and everything has to move including the space ship. How fast the Sprite Driver is may improve that, though any rolling game screen suffers with it I guess unless it's updated on a 2nd screen or not moved at all, which involves moving all relevant bits. My game suffers a bit like Harrier Attack, which the aircraft you fly is repeably updated as is flies through the scenary.
Apart from the HW scroll for the background, what technique did you use to plot the sprites?
It's an Assembly equivalent of what I been doing in BASIC as found here:
https://www.cpcwiki.eu/forum/programming/multicoloured-graphics-in-basic-discuss/which involves redefining the character set, assigning colours and then using Transparent Mode to overlap the graphic, they aren't true sprites in the sense because sprites are made up as a series of bytes, a 4x8 mode 0 sprite will produce 8x8 image, to one of my images which requires 8,16,24 and so on, the more colours needed the more bytes are used and if a line has none of the relevant colours 0 is used, a typical sprite would be drawn quicker.
I already have a block of code that prints direct to the screen and it's ok. I'm now working on converting the same code but this time using the Stack to do the printing. I've got it working but just need to fix the vertical screen wrapping logic so it wraps around when any sprite exceeds top or bottom of the screen.
I'm unsure what to suggest, the game I made last year had a Sprite Driver I wrote, which had to include checks where the graphics were and a few times data ended up corrupting or crashing the computer, I wasn't using the stack for that, but writing everything to screen, even though it looked like a text coordinated game.
Also I'm very much intrigued on the HW scrolling you adopted. I can't find any real documentation on how the &BC4D call is used. I have put a small program together in which I scroll up/down 10 lines but of course that just prints garbage to the screen as I don't know where to build the background. I was trying to follow your code but couldn't work out how you created a screens full of boulders and then continously scrolled them. I'd like to use the HW scroll for a scrolling star background. Could you give me any pointers on how to setup the background?
Thanks
It's all in the Amstrad CPC Firmware Guide, it's on the CPC-Wiki in the
BIOS Functions section under
BIOS Screen Functions under Further Stuff.
SCR HW ROLL uses 'a' register for a Paper Colour, which needs to be set to 0 and 'b' register for the direction. If b=0 the roll is down and if b equals any other value, the roll is up.
I also converted an old BASIC 10-Liner into Assembly as well as Pascal & Small-C, which used SCR HW ROLL along with a Star Field. The interesting thing about that is a routine to generate 16bit numbers between 0 and the 640 range, but I haven't been able to find it in here.