# CRM64Pro GDK  
**The ultimate SDL3 companion for 2D games and tools.**  

Copyright (C) 2013–2026 
Developed by Roberto Prieto – MegaStorm Systems  
https://www.megastormsystems.com

**CRM64Pro** is a modern, free, cross-platform C++17 Game Development Kit built on **SDL3**, with rendering, particle effects, 2D lighting, audio, video, Scene tooling, CDC archives and the EditorC64 asset workflow.
It is designed to help developers create high-performance 2D games, tools and interactive applications through a clean, modular and hardware-accelerated framework.

CRM64Pro is distributed under the zlib license.

---

## 🚀 Key features

### **Modern core**
- Written in **C++17** and built on **SDL3**
- Fixed virtual logic frame rate with high-resolution timing, delta time and render interpolation helpers
- Modular manager-based API exposed through `Main::instance()`
- Multi-threaded runtime services for audio, networking and timers
- **CDCv2** asset archive system with compression, >4GB file support, validation, non-authenticated AES-256-CTR encrypted storage for indexes and selected blocks, streaming raw block reads/writes and defragmentation
- Custom memory manager with allocator-backed CRM64Pro STL aliases
- High-performance logging, configuration, XML, timer, RNG and utility modules

### **EditorC64**
- Integrated **EditorC64 resource editor** for managing engine resources and CDC archives, including particle-effect authoring and live preview, Universal VTT map import, and animated GIF and H.264 video import into Tiled-compatible animated tilesets

### **Graphics and media**
- Screen, image, cursor, tile, sprite, font and GFX primitive modules
- Sprite animation, sub-pixel positioning, scaling, rotation and render target support
- Particle effects with presets, image, Sprite and soft visuals, lifetime keys, timed bursts, sub-emitters, collision and CDC persistence
- GFX 2D lighting with ambient light, point and spot lights, glow helpers and occluders
- Unified audio playback for music, sound effects, voice and ambient audio
- H.264 video playback with seeking, metadata, audio integration and streamed CDC storage support
- Supported media formats include XML, images, audio, video, maps and CDC archives

### **Scene system**
- Advanced 2D Scene and world management system with native **[Tiled](https://www.mapeditor.org/)** TMX/TSX support
- Tile, image and object layers with custom object factories
- Camera modes, parallax, smooth scrolling, triggers and debug overlays
- Runtime loading from disk or CDC archives
- Planned Scene integration for lights, occluders and particle effects

### **GUI system**
- GUI system with panels, typed widgets, themes, callbacks and flow layouts
- Built-in widgets include labels, images, frames, buttons, check boxes, progress bars, sliders, text edits, number edits, lists and combo boxes

### **Networking**
- `NetTCP` client/server networking with asynchronous queues, diagnostics, backpressure controls, challenge-response login and optional AES-CTR session encryption

### **Hardware-accelerated graphics**
Supported GPU backends (platform dependent):
- Direct3D 9 / 11 / 12  
- Vulkan  
- Metal (macOS)
- GPU
- OpenGL / OpenGL ES  

---

## 🖥️ Supported platforms

| Platform | Requirements | Render drivers | Audio drivers |
|---------|--------------|----------------|---------------|
| **Windows** | Windows 7, 10 and 11 (64-bit only) | Direct3D 9/11/12, Vulkan, GPU, OpenGL, Software | WASAPI, DirectSound |
| **Linux** | Kernel 4.18+ (64-bit only) | Vulkan, GPU, OpenGL, X11, Wayland, Software | PulseAudio, ALSA |
| **macOS** | 10.13+ for x86_64; 11+ for arm64 | Metal, Vulkan, GPU, OpenGL, Software | CoreAudio |
| **Android** | Not available yet: Android 5.0+ (API 21+) | OpenGL ES, Vulkan | AAudio, OpenSL ES |

---

## 📦 Installation

### **Windows (Visual Studio 2022+)**

CRM64Pro for Windows is distributed as a standard executable installer (created with **Inno Setup**):

**CRM64Pro-X.Y.Z-win-x64.exe**

The installer also includes **[EditorC64](https://www.megastormsystems.com/gdks/crm64pro-gdk/editorc64)**, the official resource editor for CRM64Pro.


1. Run the installer and choose an installation directory  
   (for example: `C:\Libs\CRM64Pro`).
2. Add the `include/` and `lib/` directories to your Visual Studio project.
3. Link against one of the following libraries:
   - `CRM64Pro.lib` — Dynamic linking  
   - `CRM64Pro.static.lib` — Static linking (Release)  
   - `CRM64Pro.static-debug.lib` — Static linking with debug information
4. If using dynamic linking, ensure `CRM64Pro.dll` is located next to your executable or accessible through the system `PATH`.

---

### **Linux (GCC 13+)**

CRM64Pro is provided as a self-extracting Bash installer:

```bash
chmod +x CRM64Pro-X.Y.Z-linux-x64.sh
sudo ./CRM64Pro-X.Y.Z-linux-x64.sh
```

This installs headers and libraries into standard system locations such as `/usr/local/include` and `/usr/local/lib`.

Compile and link using:
```bash
g++ main.cpp -o mygame -lCRM64Pro
```

---

### **macOS (Clang 12+)**

CRM64Pro is distributed as a DMG package containing a universal library supporting both x86_64 and arm64 (Apple Silicon).

1. Open the DMG and run the installer.

2. Headers and libraries are installed into standard locations such as `/usr/local` or `/Library`.

Compile from the terminal or configure Xcode normally:

```bash
clang++ main.cpp -o mygame -lCRM64Pro
```	

---

## 🔌 Third-party libraries

CRM64Pro integrates selected open-source libraries for platform access, media loading, archive support, audio playback, video handling and tooling. Some libraries include minor CRM64Pro-specific modifications; updated source code is included in the downloads.

### Platform and SDL modules

| Library | Version | Purpose |
|--------|---------|---------|
| [SDL3](https://libsdl.org) | 3.5.0 | Core cross-platform framework |
| [SDL3_net](https://github.com/libsdl-org/SDL_net) | 3.0.0 | Networking support |
| [SDL3_image](https://github.com/libsdl-org/SDL_image) | 3.5.0 | Image loading support |
| [SDL3_mixer](https://github.com/libsdl-org/SDL_mixer) | 3.2.0 | Audio mixing support |

### Data, archives and utilities

| Library | Version | Purpose |
|--------|---------|---------|
| [libpng](http://www.libpng.org/pub/png/libpng.html) | 1.6.58 | PNG image support |
| [zlib-ng](https://github.com/zlib-ng/zlib-ng) | 2.3.2 | Compression engine |
| [TinyXML2](https://github.com/leethomason/tinyxml2) | 11.0.0 | XML parsing |
| [yyjson](https://github.com/ibireme/yyjson) | 0.12.0 | JSON parsing |
| [AES](https://github.com/BrianGladman/AES) | Sept-2020 | AES routines |
| [xxHash](https://github.com/Cyan4973/xxHash) | 0.8.3 | High-speed hashing |
| [ltalloc](https://github.com/r-lyeh-archived/ltalloc) | 2.0.2 | Lightweight memory allocator |

### Audio formats

| Library | Version | Purpose |
|--------|---------|---------|
| [libxmp](https://github.com/libxmp/libxmp) | 4.7.0 | Module audio playback |
| [stb_vorbis](http://nothings.org/stb_vorbis/) | 1.22 | Ogg Vorbis decoding |
| [dr_flac](https://github.com/mackron/dr_libs) | 0.13.6 | FLAC audio decoding |
| [dr_mp3](https://github.com/mackron/dr_libs) | 0.7.3 | MP3 audio decoding |

### Video

| Library | Version | Purpose |
|--------|---------|---------|
| [FFmpeg](https://ffmpeg.org/) | 8.1.1 | Video and audio demuxing/decoding |

All third-party licenses are included in the `/licenses` directory of the distribution.

---

## 📚 Documentation

CRM64Pro includes a complete **Doxygen-based API Reference**, providing detailed coverage of all engine modules, including:

- Engine architecture and subsystem overview  
- Fixed-timestep game loop, delta timing and interpolation
- Graphics, sprites, fonts, drawing primitives and render targets
- Particle effects and GFX 2D lighting
- Scene system, TMX workflows, camera control, object layers and triggers
- EditorC64 asset workflows, including Universal VTT map import
- GUI panels, themes, widgets, callbacks and layouts
- Audio playback, H.264 video playback and resource handling
- CDCv2 archives, XML, images, audio, video and asset workflows
- NetTCP networking and diagnostics
- Practical code examples and recommended best practices  

The full documentation is bundled with every release under the `/docs` directory, and is also available online:

https://www.megastormsystems.com/repository/CRM64Pro/docs/index.html

---

## 📝 License

CRM64Pro is distributed under the **zlib license**, allowing use in commercial and open-source projects with minimal restrictions.

Please ensure that **all third-party library licenses** included in `/licenses` are preserved in your distributions.
