CmdFX
A lightweight game engine for your terminal.
cmdfx is a lightweight game engine for your terminal. It is designed to be simple and easy to use, while still providing a powerful set of features.
It is written in C and is available cross-platform. It is licensed under the MIT license.
🍎 Features
- Cross-platform: cmdfx is available on Windows, macOS, and Linux.
- Lightweight: cmdfx is designed to be lightweight and fast.
- Easy to use: cmdfx is simple to use and easy to learn.
- Powerful: cmdfx provides a powerful set of features for creating terminal-based games.
📋 Full List
- Events API
- Handle window events such as key presses and window resizing.
- Get the current state of the keyboard.
- Canvas API
- Draw characters and shapes on the terminal.
- Set foreground and background colors.
- Clear the screen.
- Get the size of the terminal.
- Sprites API
- Load and draw sprites on the terminal.
- Set the color of a sprite.
- Cross-Platform Exposure
- Expose platform-specific features and utilities such as setting the title of the terminal.
📦 Installation
You can download the latest release of cmdfx from the releases page.
🚀 Example
#include <cmdfx.h>
int main() {
}
void Canvas_setChar(int x, int y, char c)
Sets a character at a specific position.
void Canvas_hLine(int x, int y, int width, char c)
Draws a horizontal line.
void Canvas_setForeground(int rgb)
Sets the foreground color at the current cursor position.
void Canvas_fillCircle(int x, int y, int radius, char c)
Fills a circle with a character.
📝 Contributing
If you would like to contribute to cmdfx, please see the contributing guidelines. All contributions are welcome!