CRM64Pro GDK  v0.97
A free cross-platform game development kit built on top of SDL 2.0
CRM64Pro GDK v0.96 Reference Guide

Table of Contents

1. What's CRM64Pro GDK?

CRM64Pro is a free and open source cross-platform game development kit written in C++ and built on top of SDL 2.0.
It is distributed under zlib license.

Description of all modules? Tile Engine test

1.1. Supported platforms

icon-windows.png
Microsoft Windows 7 or newer, x86 and x64 versions.
 
icon-linux.png
Linux distribution based on kernel 2.6.x or newer, x64 version only.
 
icon-android.png
Android 5.x or newer.
 
icon-mac.png
MacOS X 10.10 or newer.

Render and audio drivers availables for each platform?

1.2 High-level architecture

CRM64Pro_Architecture.png


1.3 Game development

icon-engine.png
On this section you can find information about game development using CRM64Pro.


1.4. Changelog

icon-changelog.png
31 June 2017 - 0.97 - Config Manager and setup (last stable version)
-------------------------------------------------------------------
- Config Manager:
. added save() and load() methods for storing/loading the audio/screen configuration
. ToDO added setup() method for opening a screen with configuration settings, there is a default one but can be customized
- Cursor Manager:
. fix an issue with mouse coordinates on screen with different logical size than the screen size
- All projects are migrated to Visual Studio 2017.
30 April 2017 - 0.965 - Memory Manager
--------------------------------------
- Memory Manager:
. improved stats system, output memory usage evolution and histogram to CSV files
. use ltalloc as a low-level allocator
. some general improvements
. documentation and how to use
29 March 2017 - 0.96 - General improvements
-------------------------------------------
- Memory Manager:
. added a C64 Memory Manager(CMem) to all interfaces
. hook the CMem to all external libs
. STL containers under CRM64Pro namespace are also using CMem
. simple stats system
. using default memory allocator, to be improved on next revision
- New unified Position Helpers for Cursors, Sprites, Fonts and GUI Widgets.
- Timer:
. new getHiResTime() method
. new microbenchmark methods
- Config Manager:
. new getSnapshot() method for saving the snapshot to an external PNG file
. setRenderCallback() method now accepts a second parameter, a pointer to the relevant object
- Network Manager:
. setCoreServerCallback() method now accepts a third parameter, a pointer to the relevant object
. ClientInfo struct now belongs to NetTCP class
- Using TinyXML-2 4.0.1 (migrated from TinyXML).
- Using xxHash 0.6.2 library.
- Using libpng 1.6.29RC library.
- Using SDL_mixer 2.0.1 (10-Jan-2017) library.
- Using MikMod 3.3.10 (31-Aug-2016) library. Enable SSE2 instruction set usage.
28 February 2017 - 0.95 - TileEngine
------------------------------------
- ABI changed on all objects: for simplicity, Obj suffixes have been removed.
- TileEngine
. migrated and improved from MSTE
. totally integrated inside C64
- GUI:
. new widget feature flag for disabling the background rendering
. fix an issue when loading WT_TEXTBOX and WT_LISTBOX
- Sprite Manager:
. status() now return C64_STATUS_END when the one-shoot animation has finished
- Config Manager:
. fixed a bug in getClipRect() method
- Tile Manager:
. fixed a bug in render() method
- Tool:
. new decodeBase64() and decompressZlib() methods
30 December 2016 - 0.946 - Maintenance
--------------------------------------
- Using libpng 1.6.27 library.
- Using SDL 2.0.5 b10726 (28-December-2016) library.
...
Full changelog


1.5. License

icon-zlib.png
CRM64Pro GDK
Copyright (C) 2013-2017 Roberto Prieto <contact@megastormsystems.com>
  
This software is provided 'as-is', without any express or implied
warranty.  In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
  
1. The origin of this software must not be misrepresented; you must not
   claim that you wrote the original software. If you use this software
   in a product, an acknowledgment in the product documentation would be
   appreciated but is not required. 
2. Altered source versions must be plainly marked as such, and must not be
   misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.


2. GDK installation

Runtime libraries usually are shipped together with the application that uses CRM64Pro GDK but in case you want to change the version, you can download the development libraries (see below) and extract from that package the runtime libraries.


2.1. Windows with Visual Studio

Requirements

  • Microsoft Windows 7 and 10. 32bits and 64bits versions.

  • Microsoft Visual Studio 2015 or newer.

Library installation

  • Unpack "CRM32Pro-win32-vs-X.YZ.rar" on a destination path (CRM32PRO_INST_DIR)

  • CRM32PRO_INST_DIR path must be in the system search path, the best way to do that is adding a new entry to the PATH environment variable:

    • right click on "My Computer"
    • click on Properties/Advanced/Environment Variables
    • under System variables, look for PATH entry, edit it adding CRM32PRO_INST_DIR value.

  • From now on "CRM32Pro.dll" is available for any application that uses it: SpacePong...

Compiling your own applications

  • To develop applications or compile the examples using Visual Studio, we have to add the CRM32PRO_INST_DIR to the include and library paths.
    Usually, Visual Studio manages these directories using Tools/Options/Directories accesible from the main IDE window

  • Include "CRM32Pro.h" at the beginning of your code

  • Link against the main library:

    • "CRM32Pro.lib" to use the dynamic library version(CRM32Pro.dll)
      or
    • "CRM32Pro.static.lib" to use the static library version

  • Link against the SDLmain library:

    • "sdlmain.lib" for console and windows applications without SDL log errors output
      or
    • "sdlmainIO.lib" for console and windows applications with SDL log errors output
      or
    • For MFC applications, this is not required

  • It is very important that runtime libraries on C/C++ code generation of Visual Studio will be set to "DLL multithreaded" (/MD switch) when you compile Release code or set to "DLL Debug multithreaded"(/MDd switch) when you compile Debug code.


2.2. Windows 7+ x86/x64 with GNU GCC/G++ 4.x

Click here for detailed instructions (ToDO)

2.3. Linux 2.6+ x64 with GNU GCC/G++ 4.x

Click here for detailed instructions (ToDO)

2.4. MacOS X 10.9+ x64 with GNU GCC/G++ 4.x

Click here for detailed instructions (ToDO)