The C Creative Coding Project (CCCP) is a simple, cross-platform framework for making creative coding projects in C. It provides hot-reloading of scenes, window + input handling, multithreaded software shaders, audio playback, image loading, and text rendering.
This project is inspired by skeeto's interactive C demo. For a full list of 3rd party dependencies, see the Dependencies section below. See TODO for planned features. Supported target platforms are macOS (Cocoa), Linux (X11), and Windows (WinAPI) with clang or gcc. Web builds (Emscripten) are planned.
usage: cccp [path to dylib] [options]
cccp Copyright (C) 2024 George Watson
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Options:
-w/--width Window width [default: 640]
-h/--height Window height [default: 480]
-t/--title Window title [default: "CCCP"]
-r/--resizable Enable resizable window
-a/--top Enable window always on top
-u/--usage Display this message
- Create a new C file for your scene, e.g.
myscene.c, and put it in thescenes/directory. You can usescenes/example.cas a template. - Build the project using
make all. - Run the program with your scene:
./build/cccp build/myscene.dylib(on macOS, .so on Linux, .dll on Windows) - Edit your scene code and recompile it with
make sceneswhile the program is running to see your changes live! - ???
- Profit!
git clone https://github.com/takeiteasy/cccp.git
cd cccp
mkdir build
make all
-
Reimplement dylib reloading -
Image loading from file (and exporting)(stb_image + qoi)- GIF/Video recording/exporting?
- Export surface to image file (stb_image_write + qoi)
-
Shaders (multithreaded software renderer) -
Generate noise, gradient surfaces, etc. -
Text rendering(font8x8 + stb_truetype) -
Target FPS control -
Audio management(raudio) - Dynamic rebuilding of scenes (dmon)
- Packaging for different platforms?
- 3D API? (using software rasterizer + software shaders)
- Test on Linux and Windows (only tested on macOS)
- Export web builds (emscripten) (no dynamic loading of scenes)
- nothings/stb [Public Domain]
- stb_vorbis.c, stb_truetype.h, stb_image.h, stb_image_write.h
- phoboslab/qoi [MIT]
- phoboslab/qoa [MIT]
- dhepper/font8x8 [Public Domain]
- skandhurkat/Getopt-for-Visual-Studio [GNU GPLv3]
- dlfcn-win32/dlfcn-win32 [MIT]
- raysan5/raudio [zlib/libpng]
- mackron/miniaudio [Public Domain]
- mackron/dr_libs [Public Domain]
- dr_wav.h, dr_flac.h, dr_mp3.h
- jar_xm.h by Romain "Artefact2" Dalmaso [WTFPL]
- jar_mod.h by Romain "Artefact2" Dalmaso [Public Domain]
The C Creative Coding Project (CCCP)
Copyright (C) 2024 George Watson
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
