An open API service indexing awesome lists of open source software.

https://github.com/setghm/cmdpaint

Tool for create images or sprites for windows console games.
https://github.com/setghm/cmdpaint

cmd console-games cpp paint-application windows-cmd windows-console-game

Last synced: about 2 months ago
JSON representation

Tool for create images or sprites for windows console games.

Awesome Lists containing this project

README

        

# 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](https://github.com/user-attachments/assets/2b6b9c33-dc1b-4754-9b7f-a136b340b3c3)