Facet - A Card Framework That Draws Its Own Faces
A downloadable tool
Every card framework on sale hands you a shuffle and a hand — and then you still owe an artist fifty-two drawings. That is the part that actually stops a card game getting made. The deck logic is a weekend; the deck is a commission. So the prototype gets built with coloured rectangles, the rectangles never get replaced, and the project quietly stops.
Facet is the other half, and the logic comes with it. Deck, hand, draw, discard and pile are all here — and so is the art. Every card face is drawn at run time from that card's own data, in pure GML. There is no sprites/ directory in this package, because there is nothing to put in one.
A face is a pure function of the card
face(card) = FRAME × SIGIL × RANKFORM × TREATMENT × CORNER
Same card in, same face out — every frame, on every machine. Nothing is random at draw time; the only randomness is a seeded hash of the card's own identity, so two cards that differ in any property look different and the same card never flickers between looks. Change one string and the whole deck redraws.
76 authored components, in six axes
| 8 | frames — plain, beveled, arched, gothic, filigree, riveted, torn, bordered-void |
| 12 | suit sigils — blade, chalice, coin, baton, skull, moon, thorn, eye, gear, bolt, wave, star |
| 10 | pip layouts — the traditional arrangements, authored, not stamped out by a grid loop |
| 6 | court figures — jack, knight, queen, king, joker, vizier |
| 6 | rarity treatments — from a plain common to an engraved mythic medallion |
| 12 | card backs — lattice, scale, guilloche, diaper, rosette, weave, starfield, meander, herringbone, moire, vine, void |
Plus 16 rank glyphs drawn as strokes and 6 corner-index styles. Multiplied out: 1,536 distinct faces before colour, 9,216 with the rarity treatments, and a card back that is seeded per deck so your game's back is yours.
The self-test asserts every one of those numbers on every run, derived from the id arrays rather than typed — so this page cannot drift away from the product.
Colour is computed, not picked
Palettes are built in Oklch, a perceptual colour space, with a chroma ceiling per lightness — so a suit hue rotation stays legible instead of turning muddy at the dark end and neon at the light one. One hue_origin field rotates the entire deck. Rarity moves lightness and chroma together, which is why a mythic reads as expensive rather than merely dark.
Six suits are traditional, six are not
Blade, chalice, coin and baton are the classical four. Skull, moon, thorn, eye, gear, bolt, wave and star are there because most people building a card game are not building a poker game — and the sixth court, the Vizier, exists for the same reason. Pass any four, or all twelve.
Built to be read, and to be fast
- Pure GML. No native extension, no DLL, no dependency — nothing to break on a runtime update.
- One file talks to the GPU.
fct_renderturns geometry into draw calls and knows nothing about suits or ranks; everything above it produces geometry and makes no engine calls at all. The half that can be wrong is the half you can read. - Faces are cached per card, so a full hand on screen costs draw calls, not allocations.
- Bake to PNG when you want to.
fct_export_cardwrites one face;fct_bake_deck_pngswrites the whole deck. Pre-render to sprites for a low-end target, print proxies, or hand a reference sheet to an artist. - Namespaced
fct_/FCT_throughout, because GML's global namespace is flat and a collision in your project is a support ticket nobody can debug remotely. - No absolute paths, no hardcoded room or layer indices, and a documented header block on every public script.
218 assertions, run inside the engine
GML cannot be unit-tested outside GameMaker, so the suite lives inside the product. Press F1 in the demo room, or run the built executable with -selftest. It checks the corpus counts, that no two motifs collapse into the same drawing, that every part stays inside the card, that a face is byte-identical across repeated calls, and the palette invariants. It found three real defects in this product before release, including one that was invisible in a preview renderer.
Compatibility
GameMaker 2024.14 and later. Built and package-verified against runtime 2024.14.4.268. Pure GML with no extensions, so it is not tied to a platform — it draws with the same primitives everywhere GameMaker draws. It adds no objects to your game except the optional demo, touches no global state outside its own FCT_ namespace, and imports as a standard local package alongside anything else you already have.
Install, in two minutes
- Tools → Import Local Package, choose
Facet.yymps, Add All. - Open
rm_facet_demoand press Run.
// Create
card = fct_card("blade", 0, "A", "legendary", "gothic", "cartouche");
// Draw - x, y, CARD WIDTH in pixels
fct_draw_card(card, 100, 100, 220);
Height follows from the width, at a real playing card's 63:88 ratio. There is nothing to configure, no texture group to set up and no sprite to import.
Every image on this page was rendered by the product itself, headless, from the shipped GML — not by a preview tool and not by hand.
Raw, readable source. Full licence to use in commercial games. Built by Core Systems Asset Factory.
More GameMaker tools that draw their own art
Everything below shares this pack’s approach: the visuals are generated from your data at run time, so there is no art to commission and nothing to keep in sync.
- Loom — pay what you want, including nothing. The cheapest way to see whether this approach suits how you work.
- Meridian — constellation skill trees: 60 authored motifs across 8 palettes, 480 generated node marks, no PNG anywhere.
- Grimoire — spellbooks whose pages compose themselves from each spell’s own properties.
- Menagerie — creatures drawn from their own stat blocks.
- Panoply — equipment that renders from what it actually is.
The full catalogue is at csaf.itch.io.
| Published | 1 day ago |
| Status | Released |
| Category | Tool |
| Author | CSAF — Core Systems Asset Factory |
| Genre | Card Game |
| Tags | 2D, Deck Building, GameMaker, Generator, Procedural Generation, sourcecode, Tarot, Project template, Vector |
| AI Disclosure | AI Assisted, Code, Graphics |
Purchase
In order to download this tool you must purchase it at or above the minimum price of $14.99 USD. You will get access to the following files:








Leave a comment
Log in with itch.io to leave a comment.