Skip to content
This repository was archived by the owner on Jan 14, 2026. It is now read-only.

takeiteasy/cccp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cccp

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.

Preview

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.

How to use

 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
  1. Create a new C file for your scene, e.g. myscene.c, and put it in the scenes/ directory. You can use scenes/example.c as a template.
  2. Build the project using make all.
  3. Run the program with your scene: ./build/cccp build/myscene.dylib (on macOS, .so on Linux, .dll on Windows)
  4. Edit your scene code and recompile it with make scenes while the program is running to see your changes live!
  5. ???
  6. Profit!

Building

git clone https://github.com/takeiteasy/cccp.git
cd cccp
mkdir build
make all

TODO

  • 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)

Dependencies

License

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/>.

Releases

No releases published

Packages

No packages published