OTHER CONTRIBUTIONS: FLARE ANIMATION

This example is most like creating a video player, inserting pictures into REU memory. To make this demo, we take a YouTube video, 8 frames per second for a total of 56 frames. The frames is resized to 128x128 pixels, composed in a strip and reproduced, one frame at a time, with the illusion of an animation. The demo can be stored on two floppy disks or in a single 512KB REU image.

Click here for more informations.

source compile sandbox issues? back to examples

SOURCE CODE ()

BITMAP ENABLE(16)

PROCEDURE example ON C64REU

	strip0 := LOAD IMAGES( "flare-0.png" ) FRAME SIZE (128,128) BANKED
	strip1 := LOAD IMAGES( "flare-1.png" ) FRAME SIZE (128,128) BANKED
	strip2 := LOAD IMAGES( "flare-2.png" ) FRAME SIZE (128,128) BANKED
	strip3 := LOAD IMAGES( "flare-3.png" ) FRAME SIZE (128,128) BANKED
	strip4 := LOAD IMAGES( "flare-4.png" ) FRAME SIZE (128,128) BANKED
	strip5 := LOAD IMAGES( "flare-5.png" ) FRAME SIZE (128,128) BANKED
	strip6 := LOAD IMAGES( "flare-6.png" ) FRAME SIZE (128,128) BANKED
	strip7 := LOAD IMAGES( "flare-7.png" ) FRAME SIZE (128,128) BANKED

	COLOR BORDER BLACK
	CLS BLACK

	DIM strip AS BYTE, frame AS BYTE

	LOCATE 0,ROWS / 2
	INK WHITE

	strip = 0

	DO

		SELECT CASE strip
			CASE 0
				PUT IMAGE strip0 FRAME frame AT 16, 36
			CASE 1
				PUT IMAGE strip1 FRAME frame AT 16, 36
			CASE 2
				PUT IMAGE strip2 FRAME frame AT 16, 36
			CASE 3
				PUT IMAGE strip3 FRAME frame AT 16, 36
			CASE 4
				PUT IMAGE strip4 FRAME frame AT 16, 36
			CASE 5
				PUT IMAGE strip5 FRAME frame AT 16, 36
			CASE 6
				PUT IMAGE strip6 FRAME frame AT 16, 36
		ENDSELECT
		
		INC frame
		
		IF frame = FRAMES(strip0) THEN
			frame = 0
			INC strip
			IF strip = 7 THEN
				strip = 4
			ENDIF
		ENDIF

	LOOP

END PROCEDURE

example[] ON C64REU



How to compile and run the example

The instructions here refer to compiling the example from the command line. For Microsoft Windows users we suggest using UGBASIC-IDE, which allows you to download and compile each single example with just one click.



Are instructions for your specific home computer / console missing? First of all, check if your computer is supported by clicking here. If so, since ugBASIC is a language which does not provide abstractions, it is possible that this example will not work on your target. If you think this is an issue, please click here.

Commodore 64 + REU

In order to compile the example, type this command on the command line:

Linux

ugbc.c64reu -O d64 -o contrib_flare.d64 contrib_flare.bas

Windows

ugbc.c64reu.exe -O d64 -o contrib_flare.d64 contrib_flare.bas

For Microsoft Windows users we suggest using UGBASIC-IDE, which allows you to download and compile this example with just one click.

Any problem?

If you have found a problem trying to run this example, if you think there is a bug or, more simply, you would like it to be improved, open an issue for this example on GitHub.
Thank you!

open an issue BACK TO EXAMPLES