-
Notifications
You must be signed in to change notification settings - Fork 82
Description
CMaps (short for collision maps) are files that contain info about what collision is where. You can access a specific position using a function and it can return what kind of collision is there. I already made a converter and handler for them by the way.
The advantage of using CMaps instead of itterating through every tile and testing if you overlap with them is that it's way more efficient.
Here you can see a documentation about CMaps in a library that is written in and made for C/C++ (my own handler and converter are made in and made for use with python): https://docs.google.com/document/d/1v7F8-fR8fXS6QZhQZPVwDxD1IccbRJx8oDDK5hJLlFs/edit?usp=sharing. It works almost exactly the same as my own Python implementation. The only differences are:
The input file for my converter can be a bunch of different filetypes
There is no need for the 8x8px grid layout in the input file
You can choose a factor by which the CMap will be scaled in the code
I attached an example code that shows how the CMaps are used, the converter (usage: ">convertCMap.py <filename of the CMap>"), the handler and an example CMap template.