Find a file
2025-10-27 14:41:08 +01:00
asset-src feat: initialized project 2025-10-26 14:27:30 +01:00
assets feat: initialized project 2025-10-26 14:27:30 +01:00
src chore(style): clarified InitSDL error conditions 2025-10-26 21:17:43 +01:00
vendor chore: updated ceramic submodule 2025-10-26 21:19:06 +01:00
.clang-format feat: cleaned up and created 'ceramic/' 2025-10-26 20:05:00 +01:00
.clangd feat: setup template 2025-09-25 13:12:30 +02:00
.dir-locals.el feat: disabled C mode for all files in the project 2025-10-27 14:41:08 +01:00
.gitignore feat: setup template 2025-09-25 13:12:30 +02:00
.gitmodules feat: added submodule for ceramic 2025-10-26 20:48:01 +01:00
CMakeLists.txt feat: added vendor/ceramic/*.cpp to CMakeLists.txt 2025-10-26 20:44:50 +01:00
justfile feat: initialized project 2025-10-26 14:27:30 +01:00
README.md chore: updated README.md 2025-10-27 14:40:56 +01:00

Dice GUI

A simple dice rolling GUI app using Clay for layout, Ceramic elements and SDL3 rendering.

Compiling

Either git clone --recursive or remember to git submodule update --init --recursive. Then cmake -S. -Bbuild and cmake --build build. Which compiles bin/dice-gui, which you can run.

Code Standards

  • Keep program structure as simple as possible. No class Application or other Java-isms. Prefer namespaces with static lifetime variables.

  • Use STL where possible. Don't reinvent the wheel.

  • K&R brackets. With notable exceptions(1)

  • camelCase for variables, PascalCase for types and functions (that's what SDL and Clay do).

  • In class member functions, always use this-> to access member variables.

  • const applies to the name to it's left, so it goes after the type, not const int x; but int const x.

  • * and & flush with the declaration name. Type const &Function(Type &inRef)

(1) Bracket exceptions:

  • using scoped_lock in arbitrary blocks, prefer tailed lisp brackets
struct Data {
    int x{ 0 }, y{ 0 };
};
void MyFunction(Data const &data) { // K&R here
    DoAsynchronousThings();
    { scoped_lock lock{ myMutex };
        myVariable++;
    } // not quite lisp, lisp with a tail
    DoMoreAsynchronousThings();
}