Skip to content

Tool for create images or sprites for windows console games.

License

Notifications You must be signed in to change notification settings

setghm/CMDPaint

Repository files navigation

CMDPaint

by setghm

CMDPaint is a Windows console (CMD) application designed to facilitate the creation of color arrays for the creation of color video games that run on the command line.

The application is designed to be very simple, you can load files and open already created files.

The editor has 4 tools: The pencil, the paint bucket, the color picker and the grid.

Examples

You can test the application with these sample files located at /examples folder.

Output files

The output files have the extension .bytecolor which means that they are simple color arrays accepted by the Windows console.

The format is as follows:

  • The first 32 bits are used to store the width of the image (unsigned integer).
  • The next 32 bits are used to store the height of the image (unsigned integer).
  • All other bytes are Windows console colors.

Note

The width and height refer to the size in characters, not in pixels.

Composition of colors

Each byte of the color array is made up of 2 parts:

  • Background color: first 4 bits, the desired color.
  • Foreground color: next 4 bits, visible color (either black or white) over the background color.

This way of color coding is very useful to simply print blank spaces and be able to get the image in the Windows command prompt.

This way we also avoid having to configure the application in unicode or set the page code to print the unicode block character "█" (0x2588) on the command line.

File structure

The file structure is as follows:

ByteColor file format