invent 8bit

SAM PD Snow demo

SAM PD advert, written in SAM C

This small demo was written in SAM C as an advert for the SAM PD / F9 Software library from Derek Morgan -- where I released all my games.

The demo has a Christmas theme with a snowman & trees with falling snow. The snow lands and rolls off the tops of things in the scene, collecting in neat little piles in the gaps. If you leave it running eventually the screen will fill up (aside from the unreachable areas under the words).

The music is a Jingle Bells rendition by Rik Moore.

A fine dusting The starting screen

A fine dusting A fine dusting

Starting to fill up, the gaps in the top of the letters fill up Starting to fill up, the gaps in the top of the letters fill up

The end stage, entire screen filled The end stage, entire screen filled

Implementation

The way this is written is a little strange. Rather than detect directly the filled pixels on the screen, it uses an internal bitmap with 1 for filled pixels and 0 for empty, which must be generated an loaded in as a separate data file. This is 4x smaller than a normal SCREEN$ file (4bpp=16 colors) but still a bit of a waste of space.

This was needed though as for some reason reading the pixel value of the screen was causing crashes and I couldn't find a solution. The bit map was generated in BASIC.

Thinking back I'm a bit surprised I didn't modify this into a FRED menu at some point.

Tiny games for your BBC micro:bit.

To support developers in [[ countryRegion ]] I give a [[ localizedDiscount[couponCode] ]]% discount on all books and courses.

[[ activeDiscount.description ]] I'm giving a [[ activeDiscount.discount ]]% discount on all books and courses.