CRM64Pro Tutorials

Learn the CRM64Pro GDK from the first window to complete Scene examples.

This learning path uses small C++ examples to introduce the engine step by step: setup, resources, rendering, input, audio, UI, data, media, networking and scenes.

  • CRM64Pro GDK
  • C++
  • Step by step
  • 16 tutorials

Overview

The CRM64Pro tutorials are the main teaching path for the GDK. They begin with a minimal application window, then progressively add resources, rendering callbacks, CDC archives, debug tools and the engine managers used by real projects.

The best way to follow the series is to keep the matching source file open while reading the page. Each tutorial page explains the code flow and points to the complete source file instead of duplicating large code blocks that can become outdated.

Requirements

  • Install the CRM64Pro GDK and a supported compiler with C++17 support.
  • Download the tutorial package and extract the complete ZIP into a writable working folder. It includes the source code, projects and required assets.
  • Keep the extracted source/, projects/ and bin/Base/ folders together with their original structure.
  • On Windows, open projects/windows/C64 Tutorials.sln in Visual Studio. On Linux or macOS, use the Makefile under projects/linux/ or projects/macOS/.
  • EditorC64 is optional, but useful when inspecting tutorial resources.

How to follow the series

  • Start with Tutorial 01 and follow the core tutorials in order. Each introduces concepts used by the next examples.
  • Read each page alongside its matching C++ source to follow the setup, main loop and cleanup.
  • Explore the listed controls, then change one value or behavior at a time and observe the result.
  • Use the output log to understand initialization, resource loading and any errors.
  • Return to later tutorials as references when adding a specific engine system to your own project.

Learning path

Core: Tutorials 01-05

Start here to learn the application loop, system services, configuration, cursor resources and font rendering.

Tutorial 01: Basic

Open a 960×540 window, load two PNG images, move a ship with the keyboard and save a screenshot.

  • Use Main, Log, Timer and Screen.
  • Load external images with ImageMgr.
  • Read SDL keyboard and mouse events through Main::update().
  • Update movement at a fixed logic rate.
  • Render images directly from the main loop.

Read tutorial | Source: Tutorial_01_Basic.cpp

Tutorial 02: System

Extend the first example with a render callback, named CDC resources, a debug window and the built-in console.

  • Use a Screen render callback.
  • Save and load named image resources through a CDC file.
  • Create a DebugWindow and watched variables.
  • Use the built-in Console.
  • Keep the fixed-rate logic loop from Tutorial 01.

Read tutorial | Source: Tutorial_02_System.cpp

Tutorial 03: Configuration

Use the built-in configuration screen, then save and reload the selected settings from the shared CDC archive.

  • Open the ConfigMgr setup screen.
  • Store config.xml in Tutorial.cdc.
  • Save and load the active configuration.
  • Restore screen state after loading.

Read tutorial | Source: Tutorial_03_Config.cpp

Tutorial 04: Cursor

Add a custom cursor resource to the CDC archive and use it in the running application.

  • Create a cursor from an image.
  • Save cursor resources to Tutorial.cdc.
  • Load image and cursor resources from the CDC.
  • Select and show a custom cursor.

Read tutorial | Source: Tutorial_04_Cursor.cpp

Tutorial 05: Font

Add bitmap fonts and compare the embedded font variants available through the engine.

  • Add a bitmap font resource to the CDC.
  • Use FontMgr::getBuiltin().
  • Render positioned, scaled and colored text.
  • Compare embedded Arial and Courier New variants.

Read tutorial | Source: Tutorial_05_Font.cpp

Graphics and resources: Tutorials 06-09

Move from basic image rendering to drawing primitives, tilesets, sprites and audio resources.

Tutorial 06: GFX

Draw primitives, apply image filters and mix immediate GFX drawing with image rendering.

  • Use Main::gfx().
  • Draw lines, rectangles, circles, ellipses and polygons.
  • Apply image filters to duplicate images.
  • Draw additive glow helpers.

Read tutorial | Source: Tutorial_06_GFX.cpp

Tutorial 07: Tileset

Create a tileset resource, render a small map and move the ship from tile to tile.

  • Create a tile resource from an image.
  • Split a tileset image into 48×48 tiles.
  • Render map tile IDs.
  • Restrict movement through walkable tiles.

Read tutorial | Source: Tutorial_07_Tileset.cpp

Tutorial 08: Sprite

Create sprites from a sprite sheet, define animation states and move animated sprites.

  • Split a sprite sheet into animations and frames.
  • Assign animation states to rows.
  • Move a sprite with the keyboard.
  • Toggle interpolated positioning.

Read tutorial | Source: Tutorial_08_Sprite.cpp

Tutorial 09: Audio

Load audio tracks, save them to CDC and mix looping music with sound effects.

  • Initialize the audio device.
  • Load AudioTrack resources from files.
  • Save and load audio tracks through CDC.
  • Play music, SFX and voice-style sounds.

Read tutorial | Source: Tutorial_09_Audio.cpp

Effects: Tutorials 10-11

Add particles and a 2D lightmap pass to the rendering workflow.

Tutorial 10: Particles

Create an emitter that follows the mouse and spawn one-shot effects on click.

  • Create emitters with ParticleMgr.
  • Apply built-in particle presets.
  • Update particles at the fixed logic rate.
  • Render particles from the screen callback.

Read tutorial | Source: Tutorial_10_Particles.cpp

Tutorial 11: Lightmap

Render a scene, accumulate lights and occluders, then apply the final lightmap.

  • Use GFX::beginLighting() and GFX::endLighting().
  • Add rectangle, circle and segment occluders.
  • Draw point lights and spot lights.
  • Keep HUD rendering outside the lighting pass.

Read tutorial | Source: Tutorial_11_Lightmap.cpp

UI, data, media and network: Tutorials 12-15

Use higher-level systems for widgets, XML data, video playback and TCP networking.

Tutorial 12: GUI

Create a small GUI with panels, labels, buttons, text input, checkbox, slider and progress widgets.

  • Create modeless and modal panels.
  • Add common GUI widgets.
  • Assign normal and title fonts.
  • Handle widget events from Main::update().

Read tutorial | Source: Tutorial_12_GUI.cpp

Tutorial 13: XML

Load XML configuration data, read typed values and render them over the background.

  • Load XML with XMLMgr::loadFromFile().
  • Select nested nodes.
  • Read string, integer and float attributes.
  • Read node text.

Read tutorial | Source: Tutorial_13_XML.cpp

Tutorial 14: Video

Load a video file, assign a viewport and control playback with audio.

  • Initialize audio for video streams.
  • Load video with VideoMgr::loadFromFile().
  • Read video metadata.
  • Control playback and viewport rendering.

Read tutorial | Source: Tutorial_14_Video.cpp

Tutorial 15: Network

Build a small TCP command-line chat with one server and multiple clients.

  • Initialize NetTCP.
  • Create a threaded server.
  • Connect clients and send user data.
  • Receive queued network messages.

Read tutorial | Source: Tutorial_15_Network.cpp

Scene examples: Tutorial 16

The final group combines maps, objects, layers, cameras and gameplay logic into complete Scene examples.

Tutorial 16: Scene examples

Use TMX maps, object factories, pathfinding, camera logic, platform movement, shooter objects, strategy-map fog of war, lighting, and particle effects.

  • Adventure: point-and-click map interactions.
  • Island Game v2: weighted A* pathfinding and follow/free camera modes, with v1 as the simpler reference.
  • Platform: acceleration, gravity, jumping and tile collision.
  • Shooter: projectiles, scrolling and object collisions.
  • War Game: terrain costs, pathfinding and fog of war.
  • Lighting: animated lights, occluder shadows, and Scene particles.

Sources: Tutorial_16_Scene_*.cpp