Settings
#
Customizing SettingsThe easiest way to customize your engine is by modifying the settings in the settings sprite. All settings are denoted by an @
symbol before the variable name. You can adjust these values to change the behaviour and characteristics of the engine. All the settings are set within the settings
sprite, and grouped by functionality, making it easy to change the engine settings.
Direct Engine Modifications: While the engine settings should cover a lot of ground for customization, you might find yourself in a situation where these are just not enough. The real beauty of ChromeEngine being coded entirely in Scratch is the ability to dive in and directly modify how the engine works. We've provided detailed System Documentation covering some of the more complex parts of the engine to help you with this process.
#
General Settingsset [@shadows? v] to (1)
@shadows?
: This variable toggles shadow effects. Set it to 1
to enable shadows and 0
to disable them.
set [@show_tris? v] to (0)
@show_tris?
: This variable toggles the display of triangles in your 3D models. 1
shows the triangles, and 0
hides them.
set [@res v] to (2)
@res
: Controls the resolution of the engine. Higher values increase the resolution.
set [@fast_shading v] to (1)
@fast_shading
: This setting toggles fast shading. Set to 1
for fast shading, and 0
for more precise shading.
set [@edit_mode? v] to (1)
@edit_mode?
: This setting toggles the edit mode of the engine. Setting it to 1
turns the edit mode on while 0
turns it off.
set [@show_prims/dynamic/objs v] to (0)
@show_prims/dynamic/objs
: This controls the visibility of dynamic primitives and objects. If you set this to 1
, they'll be shown; if set to 0
, they'll be hidden.
set [@fps v] to (30)
@fps
: Controls the frames per second (fps) in your game. A higher value will make the game run smoother, but may also require more processing power.
set [@glide/walk v] to (1)
@glide/walk
: This setting toggles between gliding and walking in the game. If you set it to 1
, the characters will glide; if set to 0
, they will walk.
#
Camera Settingsset [@C_roll v] to (0)
@C_roll
: This setting controls the camera roll. Adjust this to change the rotation of the camera around the front-to-back axis.
set [@C_pitch v] to (0)
@C_pitch
: This setting controls the pitch of the camera. You can change it to move the camera up and down.
set [@C_yaw v] to (0)
@C_yaw
: Adjust this setting to control the camera's yaw, which will make the camera move left and right.
set [@cam_tilt v] to (20)
@cam_tilt
: This setting controls the tilt of the camera. You can adjust the tilt angle with this setting.
set [@camX v] to (0)
@camX
: This determines the X-coordinate of the camera in your game's 3D space.
set [@camY v] to (1)
@camY
: Similar to the @camX
setting, this sets the Y-coordinate of the camera in your game's 3D space.
set [@camZ v] to (10)
@camZ
: This setting sets the Z-coordinate of the camera in your game's 3D space, affecting the depth of the camera.
set [@z_near v] to (-2)
@z_near
: Defines the closest distance that the camera can render an object. Objects closer than this value will not be displayed.
set [@z_far v] to (100)
@z_far
: Defines the farthest distance that the camera can render an object. Objects farther than this value will not be displayed.
set [@cam_z_offset v] to (1.7)
@cam_z_offset
: Determines the distance between the camera and the position it is looking at along the Z-axis.
set [@z_clip_dist v] to (-0.01)
@z_clip_dist
: Determines the Z-distance at which objects are clipped from the camera view.
#
Light Direction and Strength Settingsset [@lightX v] to ([1] * ([sqrt v] of ([1] / [4])))
@lightX
: Controls the X-direction of the light source in the game. You can change the value for different lighting effects.
set [@lightY v] to ([1] * ([sqrt v] of ([5] / [12])))
@lightY
: This setting is similar to @lightX
but controls the Y-direction of the light source.
set [@lightZ v] to ([1] * ([sqrt v] of ([1] / [3])))
@lightZ
: Similarly, this setting manages the Z-direction of the light source.
set [@ambient_max v] to (0.6)
@ambient_max
: Sets the maximum ambient light level in the game. A higher value will make the overall lighting of the game brighter.
set [@time_of_day v] to (12)
@time_of_day
: Simulates different times of the day. It can take values from 0
(midnight) to 24
(end of day).
#
Physics Engine Settingsset [@player_r v] to (0.2)
@player_r
: This setting represents the player's radius for collision detection purposes. A larger radius means the player is more likely to collide with other objects.
set [@μ v] to (0.1)
@μ
: This sets the coefficient of friction used in the physics engine. Higher values result in more friction between objects.
set [@penetration_thresh v] to (0.0001)
@penetration_thresh
: This is the penetration threshold for collision detection. If the distance between two colliding objects is smaller than this value, they are considered to be penetrating each other.
set [@restitution v] to (0.2)
@restitution
: This controls the restitution (bounciness) of an object after a collision. A higher value results in a greater bounce after a collision.
set [@gravity_x v] to (0)
@gravity_x
: This sets the horizontal component of gravity. A non-zero value will cause objects to move horizontally even when no forces are applied.
set [@gravity v] to (-0.008)
@gravity
: Sets the vertical acceleration due to gravity in the game. You can adjust it to simulate different gravitational fields.
set [@ground_y v] to (0)
@ground_y
: Determines the Y-position of the ground in your game world.
set [@ground_has_collider? v] to (1)
@ground_has_collider?
: If set to 1, the ground is considered in collision detection. If set to 0, the player and other objects can pass through the ground.
set [@collision_sounds? v] to (1)
@collision_sounds?
: If set to 1, sounds are played upon collision. If set to 0, collisions will be silent.
set [@collision_pitch/volume? v] to (1)
@collision_pitch/volume?
: Controls the pitch and volume of the collision sounds. Higher values result in louder and higher pitched sounds.
#
BSP (Binary Space Partitioning) Settingsset [@gen_BSP? v] to (1)
@gen_BSP?
: If set to 1, the engine generates a Binary Space Partitioning tree. This is a data structure used in 3D computer graphics to quickly determine what objects are potentially visible.
set [@coplanar_thresh v] to (0.023)
@coplanar_thresh
: Sets the tolerance for considering two planes as coplanar in the BSP tree. Lower values mean that planes have to be very similar to be considered coplanar.