Commodore 128 Alive!

Other Commodore Computers => Plus/4 & C16 => Topic started by: xlar54 on December 31, 2007, 05:25 PM

Title: Plus 4 game question
Post by: xlar54 on December 31, 2007, 05:25 PM
If the plus 4 didnt have sprites, how did they manage to compensate for that?  Looking around I see that the plus4's game scene is actually well established.  Just curious how this was accomplished without sprites.
Title: Plus 4 game question
Post by: Mark Smith on December 31, 2007, 05:54 PM
Lots of CPU based routines.

Draw screen with "sprite" in position A
rub out where "sprite" is
Draw screen again with "sprite" moved to the next location B

:-)
Title: Plus 4 game question
Post by: WonderSlug on January 04, 2008, 03:46 PM
In essence, the programmers created software-based sprite routines in machine language that pretty much did the same things.

Some of the better ones copied the routines from the C64 kernal as much as possible, modifying as necessary to run on the Plus4.
Title: Plus 4 game question
Post by: smf on January 04, 2008, 09:30 PM
Quote from: WonderSlugIn essence, the programmers created software-based sprite routines in machine language that pretty much did the same things.

Some of the better ones copied the routines from the C64 kernal as much as possible, modifying as necessary to run on the Plus4.
There were absolutely no routines in the c64 kernal that were useful for games.

You can either run in bitmap mode, which is going to be slow and probably not going to work too well on the c16.

Or you redefine your character set at run time. Basically you look at what character is on the screen & copy that into a character that is reserved for your sprite. Then overlay the sprite graphics, rotating it as appropriate. Generally you'll have a set of characters, like 4 x 4 for each sprite. Remembering that you lose one character row & column because you need to space to shift it into.

The alternative, which some games used was just to use character graphics and only move them 8 pixels at a time, which is pretty horrendous. Although if you design your game cleverly it can work quite well. A game like space invaders or galaxian you can scroll the screen to move the majority of the graphics & you only need to do something special for bullets and other graphics that aren't supposed to be scrolled ( i.e. you move them in the opposite direction to the scroll and they stay still ).
EhPortal 1.34 © 2025, WebDev