Dusk allows you to use a number of preferences to customize Dusk's behaviour. This is a list of preferences and their meaning.
spaceAfterEscapedPrefix
(Boolean) : If this is true
, the first character after special prefixes like !dot!
and !nodot!
is ignored, thereby offering better readability: !nodot! ...abc...
rather than !nodot!...abc...
. Make sure, however, that you have it to your desired setting; if you create something like !dot!a.b.c
with it enabled, you will likely get unexpected results.dotImpliesTable
(Boolean) : Specifies whether dot symbols (.
) by default are treated as table separators when provided in property names. If this is true
, dots will be parsed as keys; if false
, dots are interpreted as-is.detectMapPath
(Boolean) : If set to true
, Dusk will search for tileset images starting from the map's directory. You should enable this if you save your tilesets in the same directory or in a subdirectory of your map files.redrawOnTileExistent
(Boolean) : By default, Dusk only draws a tile in a tile layer if one doesn't already exist at the same x,y
location in that layer. If set to true
, this behavior is overridden and existing tiles will be redrawn. This greatly decreases the engine speed, so only enable this if you have a very good reason for it.autoGenerateObjectShapes
(Boolean) : If set to true
, Dusk will automatically generate physics bodies for objects with physics enabled. Ellipse objects will get radii, rectangle objects will get normal rectangle bodies, and polygons and polylines will get their according shapes. This shape only applies to the first physics body of an object; if you have more than one body enabled, only the first will have an automatically generated shape.ellipseRadiusMode
(string) : Defines the way automatically generated physics bodies are created for ellipse objects. A value of min
means the calculated radius will be the smallest length from side to center of the ellipse, a value of max
will calculate the greatest distance, and a value of average
will use the average of them.objTypeRectPointSquare
(Boolean) : Specifies whether point objects (rectangles with w,h = 0,0
) and square objects (rectangles with w = h
) are given the objType
of point
and square
, respectively, or are simply given rectangle
as the objType
.virtualObjectsVisible
(Boolean) : Specifies whether rectangle objects, ellipse objects, polyline objects, and polygon objects within object layers are displayed or hidden.enableCamera
(Boolean) : Set to true
to enable Dusk's camera system for maps. If set to false
, the camera methods don't even exist in the map object.defaultCameraTrackingLevel
(number) : The tracking level the camera system of a map starts out with. The tracking level can be changed after the map is created.scaleCameraBoundsToScreen
(Boolean) : If set to true
, scaling of the map with camera bounds enabled will internally scale the bounds accordingly. This will result in the same amount of viewable content.sylePointBasedObject
(function) : A function called each time a polygon or polyline object is created. The object is sent as an argument. This should not be a custom function for your code; instead, this is meant as a debug function to configure the object's appearance.styleEllipseObject
(function) : A function called each time an ellipse object is created. The object is sent as an argument. This should be used to style the object.styleImageObject
(function) : A function called each time an image object is created. The object is sent as an argument. This should be used to style the object.styleRectObject
(function) : A function called each time a rectangle object is created. The object is sent as an argument. This should be used to style the object.styleObject
(function) : A function called each time any object is created. The object is sent as an argument. This should be used to style the object.