If you are seeing this, that means your browser will not refresh based on whether or not it supports JavaScript.

Are you using a text-browser?...Cool beans :)

img2vdu Python Script



Click to visit TheOuterLinux's 'Support Me' page RSS

img2vdu Python Script

Last updated: 2021/03/06


A "sexy" customized ASCII (VDU23) rendering of a fantasy woman in MODE 6.

Above image is licensed as CC BY-NC-ND.

Using the img2vdu Python script, you can convert an image into BBC Micro or BBC BASIC V friendly format. A preview file and terminal output are created in which you can either copy/paste the text to a project, such as if using 'brandy' or 'b-em'. However, this script is only meant to help with creating small sprites. BBC BASIC will run the created VDU31,SPRX,SPRY:VDU###;###;###;###;... just fine as long as each line is 160 characters or less. BBC BASIC V (such as using 'brandy') will allow 1024 characters per line.

Download img2vdu

Requirements:

Run via 'python /path/to/img2vdu.py' and follow the instructions from there.


An example usage after conversion:

The latest compacted version:

1000DEFPROCBOAT
1001SPRX=1
1002SPRY=1
1003VDU23,224,&FF,&FF,&FF,&FF,&FF,&FF,&FF,&FF
1004VDU23,225,7,22,54,&76,&76,&76,&76,&76
1005VDU31,SPRX,SPRY:VDU32;32;&E1;
1006VDU23,225,0,0,0,0,0,0,&FE,&81
1007VDU23,226,0,0,0,24,28,8,3,&3
1008VDU23,227,&76,54,22,7,7,6,&C6,&46
1009VDU23,228,0,0,0,0,&80,0,&7F,&81
1010SPRY=SPRY+1:VDU31,SPRX,SPRY:VDU&E1;&E2;&E3;&E4;
1011VDU23,225,&FF,64,63,16,&F,2,1,0
1012VDU23,226,&FF,0,&FE,0,&FF,0,&FF,&FF
1013VDU23,227,&FF,&C0,&67,&70,59,24,&CC,&FF
1014VDU23,228,&FF,2,&FE,&E,&F6,71,&87,&87
1015SPRY=SPRY+1:VDU31,SPRX,SPRY:VDU&E1;&E2;&E3;&E4;
1016VDU23,225,0,62,0,0,0,0,0,0
1017VDU23,226,0,&7A,0,0,0,0,0,0
1018VDU23,227,7,&C7,0,29,0,0,0,0
1019VDU23,228,&80,&CD,0,&F0,0,0,0,0
1020SPRY=SPRY+1:VDU31,SPRX,SPRY:VDU&E1;&E2;&E3;&E4;

The older (2020/10/21) version:

1000DEFPROCBOAT
1001SPRX=1
1002SPRY=1
1003VDU23,224,255,255,255,255,255,255,255,255
1004VDU23,225,7,22,54,118,118,118,118,118
1005VDU31,SPRX,SPRY:VDU32;32;225;32;
1006VDU23,225,0,0,0,0,0,0,254,129
1007VDU23,226,0,0,0,24,28,8,3,3
1008VDU23,227,118,54,22,7,7,6,198,70
1009VDU23,228,0,0,0,0,128,0,127,129
1010SPRY=SPRY+1:VDU31,SPRX,SPRY:VDU225;226;227;228;
1011VDU23,225,255,64,63,16,15,2,1,0
1012VDU23,226,255,0,254,0,255,0,255,255
1013VDU23,227,255,192,103,112,59,24,204,255
1014VDU23,228,255,2,254,14,246,71,135,135
1015SPRY=SPRY+1:VDU31,SPRX,SPRY:VDU225;226;227;228;
1016VDU23,225,0,62,0,0,0,0,0,0
1017VDU23,226,0,122,0,0,0,0,0,0
1018VDU23,227,7,199,0,29,0,0,0,0
1019VDU23,228,128,205,0,240,0,0,0,0
1020SPRY=SPRY+1:VDU31,SPRX,SPRY:VDU225;226;227;228;

This project comes with many other sprite examples.

8x8 frog sprite8x16 pet sprite16x16 sword sprite32x24 fighter jet sprite32x32 boss door sprite

So on and so forth...


Disclaimer

QRCode for current page:

[ QRCode ]