NRV Posted August 31, 2018 Share Posted August 31, 2018 This is an "old" experiment to use char based software sprites, with source included. Plus a nice intro using pcm 4+4 samples, with the screen on (the only reason for this to use a 1MB cartridge). Many thanks to MrFish for improving the original graphics, adding color to the level, and creating that nice car Features: - 10 cars with logic to check collisions and move through the maze, every car with a different speed and acceleration. - char based, pre shifted and pre compiled software sprites (with sizes that changes between 2x3, 3x2 and 2x2 chars). - full copy of the background and proper masking for every sprite. - NTSC, 60 fps, with free time to do 1 or 2 more cars probably (more in PAL). - double buffered screen (40x25, antic4 graphic mode) and font. - some DLI's used through the screen, to add extra color (no interleaved fonts). I did a second version of this, but without using pre compiled sprites. Reading the data from tables I could display 7 cars in more or less the same time (not bad I suppose). But after my experiments with software sprites years ago, I was a little disappointed with the results that I got. I mean, using software sprites in a bitmap mode is a lot simpler and probably faster in some cases, than using the same resolution in a char mode. For example, if you have many small sprites (let's say 4x2 pixels) in char mode, you are going to need to touch (copy) a lot more memory, than using those same sprites in graphic mode (in average). And in general you are going to move more memory in a char mode, for sprites of the same (small - medium) size. The good thing with using chars is that you can get an extra color, or do some visual tricks just plotting chars, or maybe do font animations without touching the screen data. And restoring the screen ("erasing" the sprites), should be faster than in a graphic mode. Probably with bigger sprites, using chars is a win-win. Pre shifted and pre compiled sprites use a lot of memory by definition. In this case the car has 28 frames (4 going right, 4 going left, 4 diagonals, 8 going up, 8 going down), that amounts to something below 12KB. I probably could reduce that number to something below 9KB, by optimizing the size of the 16 frames for the vertical movement, that also include the empty space at the start and end of the car (to pad to the height of 3 chars). I did it like that just because it was faster and easier to implement. The pre-shifted frames are also used to have the tires animation, so they have more reason to exist. rdemo_carts.zip rdemo_source.zip 16 Quote Link to comment Share on other sites More sharing options...
+Philsan Posted August 31, 2018 Share Posted August 31, 2018 Awesome as usual Nelson! It would be nice to adapt this engine for Arcade Game Designer (a tool to make ZX Spectrum and CPC games) or something similar. Thanks to IDE like AGD or Visual batariBasic for Atari 2600 many games are programmed every year. BTW, AGD author would like an A8 version. Quote Link to comment Share on other sites More sharing options...
gorgh Posted August 31, 2018 Share Posted August 31, 2018 impressive, would be even better if the sprites also moved diagonally Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted August 31, 2018 Share Posted August 31, 2018 (edited) deleted Edited August 31, 2018 by _The Doctor__ Quote Link to comment Share on other sites More sharing options...
Jinroh Posted September 13, 2018 Share Posted September 13, 2018 Awesome demo as usual NRV! I have been using Character Sprites for my port of M.U.S.C.L.E. and I agree they are really handy, I love that extra colour. All your movement is smooth as silk! 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.