Releases: blueburncz/BBMOD
3.4.0
This release of BBMOD mainly brings features useful for level editors. There is a new Gizmo module and the renderer now supports mouse-picking of instances and gizmos, as well as highlight of selected instances. Models and animation files now also have a minor version - this allows us to include additional data into the files, without requiring you to reconvert all your assets. Additionally, the camera now supports 360° vertical rotation and roll from side to side. All shader code was cleaned up utilizing the latest features of Xpanda.
Changelog:
GML API:
General:
- Further fixes of variable and argument types in docs.
- Removed all API previously marked as deprecated or obsolete!
Core module:
- Added new macros
BBMOD_VERSION_MAJOR
andBBMOD_VERSION_MINOR
. - Macro
BBMOD_VERSION
is now obsolete. - Added new properties
VersionMajor
andVersionMinor
to structsBBMOD_Model
andBBMOD_Animation
. - Property
Version
of structsBBMOD_Model
andBBMOD_Animation
is now obsolete. - Added new property
Model
toBBMOD_Mesh
. - Added new optional
_model
parameter toBBMOD_Mesh
's constructor. - Added new properties
BboxMin
andBboxMax
toBBMOD_Mesh
, which are the minimum and maximum coordinates of the mesh's bounding box. This is supported ony for model version 3.1! - Added new function
bbmod_set_instance_id
. - Added optional argument
_instances
to methodsubmit
ofBBMOD_RenderQueue
, using which you can submit only meshes with given instance IDs. - Added new property
ShadowmapBias
toBBMOD_DefaultMaterial
, using which you can control a range over which a material smoothly transitions into a full shadow. This is useful for example for volumetric objects. - Added new property
BaseOpacityMultiplier
toBBMOD_BaseMaterial
, which is a color multiplier ofBaseOpacity
. - Fixed method
Mul
ofBBMOD_Matrix
. - Method
destroy
ofBBMOD_Class
now returnsundefined
.
Camera module:
- Added new property
Roll
toBBMOD_Camera
, using which you can control camera's rotation from side to side. - Added new properties
DirectionUpMin
andDirectionUpMax
toBBMOD_Camera
, using which you can control the minimum and maximum values ofDirection
. These are set to -89 and 89 respectively, same as was the hard limit before. To remove the limit, use set these toundefined
. - Property
Up
ofBBMOD_Camera
is now obsolete, please use theget_up
method instead to retrieve a camera's up vector.
Gizmo module:
- Added new module - Gizmo.
- Added new struct
BBMOD_Gizmo
. - Added new macros
BBMOD_SHADER_INSTANCE_ID
andBBMOD_SHADER_INSTANCE_ID_ANIMATED
, which are shaders used when rendering instance IDs. - Added new enum
BBMOD_EEditAxis
, which is an enumeration of edit axes. - Added new enum
BBMOD_EEditType
, which is an enumeration of edit types.
Rendering module:
Renderer submodule:
- Added an optional argument
_clearQueues
toBBMOD_Renderer.render
, using which you can disable clearing render queues at the end of the method. - Added new property
RenderInstanceIDs
toBBMOD_Renderer
. When set totrue
, then the renderer renders instance IDs into an off-screen surface. - Added new method
get_instance_id
toBBMOD_Renderer
, using which you can pick an instance ID at given position on the screen. - Added new property
InstanceHighlightColor
, which is the outline color of selected instances. - Added new property
Gizmo
toBBMOD_Renderer
, using which you can add a gizmo to a renderer. This enables its automatic rendering and highlight of its selected instances. - Added new method
select_gizmo
toBBMOD_Renderer
, using which you can pick a gizmo at given position on the screen.
3.3.0
This release mainly adds two new modules - 2D, with which you can use BBMOD materials on regular GameMaker sprites, and Raycasting, using which you can cast rays against the most basic 3D shapes.
Changelog:
GML API:
2D module:
- Added new module - 2D - using which you can use BBMOD materials on regular GameMaker sprites.
- Added new struct
BBMOD_DefaultSpriteShader
, which is a variant of the default shader, usable with sprites. - Added new macro
BBMOD_VFORMAT_SPRITE
, which is the vertex format of GameMaker sprites. - Added new macro
BBMOD_SHADER_SPRITE
, which is an instance ofBBMOD_DefaultSpriteShader
. - Added new macro
BBMOD_MATERIAL_SPRITE
, which is a variant of the default material, usable with sprites. You canclone()
this to make your own sprite materials.
Raycasting module:
- Added new module - Raycasting - which contains raycasting of basic shapes.
- Added new struct
BBMOD_Collider
, which is a base struct for colliders. - Added new struct
BBMOD_AABBCollider
, which is an axis-aligned bounding box collider. - Added new struct
BBMOD_PlaneCollider
, which is a plane collider. - Added new struct
BBMOD_SphereCollider
, which is a sphere collider. - Added new struct
BBMOD_Ray
, using which you can cast rays against colliders. - Added new struct
BBMOD_RaycastResult
, which is a container for additional raycast hit data.
3.2.0
This release brings a massive overhaul to render queues & render commands system, as well as a new Terrain module, using which you can create heightmap based terrains with five layers of materials controlled using a splatmap.
Changelog:
GML API:
General:
- Updated documented types to GameMaker 2022.3 style.
- Removed all API that was previously marked as deprecated or obsolete! Please make sure you are not using any of it before upgrading your project to this version.
Core module:
- Fog in the default shaders is now affected by the color of ambient and directional lights.
- Added new enum
BBMOD_ERenderCommand
, which contains all possible render commands. - Added new struct
BBMOD_RenderQueue
, which is a container for render commands. - Struct
BBMOD_RenderCommand
is now obsolete. Please use methods ofBBMOD_RenderQueue
to create render commands. - Added new property
BBMOD_BaseMaterial.RenderQueue
, which is the render queue used by the material. - Added new function
bbmod_render_queue_get_default
, which returns the default render queue. - Property
RenderCommands
and methodshas_commands
,submit_queue
andclear_queue
ofBBMOD_BaseMaterial
are now obsolete. Please use itsRenderQueue
property instead. - Added new struct
BBMOD_Material
, which is now the base struct for all materials. - Moved basic properties and methods from
BBMOD_BaseMaterial
toBBMOD_Material
. - Struct
BBMOD_BaseMaterial
now inherits fromBBMOD_Material
. - Added new property
BBMOD_Material.AlphaBlend
, using which you can enable/disable alpha blending. This is by default disabled. - Added new function
bbmod_gpu_get_default_state
, using which you can retrieve the default GPU state. - Added new functions
bbmod_shader_clear_globals
,bbmod_shader_get_global
,bbmod_shader_set_global_f
,bbmod_shader_set_global_f_array
,bbmod_shader_set_global_f2
,bbmod_shader_set_global_f3
,bbmod_shader_set_global_f4
,bbmod_shader_set_global_i
,bbmod_shader_set_global_i_array
,bbmod_shader_set_global_i2
,bbmod_shader_set_global_i3
,bbmod_shader_set_global_i4
,bbmod_shader_set_global_matrix
,bbmod_shader_set_global_matrix_array
,bbmod_shader_set_global_sampler
,bbmod_shader_set_global_sampler_filter
,bbmod_shader_set_global_sampler_max_aniso
,bbmod_shader_set_global_sampler_max_mip
,bbmod_shader_set_global_sampler_min_mip
,bbmod_shader_set_global_sampler_mip_bias
,bbmod_shader_set_global_sampler_mip_enable
,bbmod_shader_set_global_sampler_mip_filter
,bbmod_shader_set_global_sampler_repeat
andbbmod_shader_unset_global
, using which you can get, set and unset global shader uniforms. - Properties
BBMOD_BaseShader.set_zfar
andBBMOD_DefaultShader.set_shadowmap
are now obsolete. They were replaced by global shader uniforms. - Fixed method
BBMOD_Vertex.to_vertex_buffer
when using vertex colors.
Camera module:
- Fixed mouselook in Firefox.
Terrain module:
- Added new module - Terrain.
- Added new struct
BBMOD_Terrain
. - Added new macro
BBMOD_SHADER_TERRAIN
, which is a shader for terrain materials. - Added new macro
BBMOD_MATERIAL_TERRAIN
, which is a base terrain material.
3.1.11
This tiny release mainly adds support for orthographic camera projection, as requested by one of our Patrons.
Changelog:
GML API:
Core module:
- Added new methods
ApplyWorld
,ApplyView
andApplyProjection
toBBMOD_Matrix
, using which you can set it as the current world/view/projection matrix respectively. - Added new method
BBMOD_Matrix.Transform
, using which you can transform aBBMOD_Vec4
with the matrix.
Camera module:
- Added new property
BBMOD_Camera.Orthographic
, using which you can enable orthographic projection. - Added new property
BBMOD_Camera.Width
, using which you can configure the width of orthographic projection. Height is computed fromBBMOD_Camera.AspectRation
. - Added new method
BBMOD_Camera.world_to_screen
, using which you can get screen-space position of a point in world-space.
3.1.10
This release mainly updates Assimp (used in BBMOD CLI and DLL) to 5.2.0, which is at this moment the latest stable release. This should fix many issues with model conversion, e.g. vertex colors not converting properly for glTF
, support for .blend
files etc.
Changelog:
CLI:
- Updated Assimp to 5.2.0.
BBMOD.exe
is now x64 only!
GML API:
Core module:
- Struct
BBMOD_Exception
now inherits fromBBMOD_Class
. This can be useful for checking exception types. - Added new struct
BBMOD_OutOfRangeException
, which is an exception thrown when you try to read a value from a data structure at an index which is out of its range. - Added new method
Get
toBBMOD_Vec2
,BBMOD_Vec3
andBBMOD_Vec4
, using which you can retrieve a vector component at given index (0 for X, 1 for Y, etc.). - Added new method
Clamp
toBBMOD_Vec2
,BBMOD_Vec3
andBBMOD_Vec4
, using which you can clamp the vector's components between other two min and max vectors. - Added new struct
BBMOD_Matrix
, which is a wrapper for regular GameMaker matrices, allowing you to do various matrix operations which are not included in GML. - Fixed visual glitches (abrupt changes in animation frames) in animation playback that could have happened when you have increased
TransitionIn
orTransitionOut
ofBBMOD_Animation
.
DLL module:
- The DLL module now requires a 64bit runtime! This can be enabled by checking the "Use x64 Windows Runtime" option in
Game Options
>Windows
>General
.
3.1.9
This release fixes how optional arguments were handled in the library, which caused unexpected errors on YYC targets. Issues with post-processing effects when "Generate mipmaps for separate texture pages" is enabled in Game Options
> Main
(which allows you to use anisotropic filtering in HTML5) were also fixed.
Changelog:
GML API:
Rendering module:
Renderer submodule:
BBMOD_Renderer
now checks ifapplication_surface
exists before using it (whenUseAppSurface
is enabled).
3.1.8
This is a small hotfix release that patches the camera module, which caused errors on YYC and HTML5 platforms.
Changelog:
GML API:
Camera module
- Fixed a bug where Windows YYC (and possibly other YYC targets) did not work if
_positionHandler
argument was not passed toBBMOD_Camera.update
. - Fixed method
BBMOD_Camera.get_proj_mat
, which did not work in HTML5.
3.1.7
This release mainly focuses on HTML5 support. It adds means for asynchronnous loading of BBMOD model and animations, as well as regular buffers and sprites, which is required for HTML5. Mouselook was also fixed using a JavaScript extension. Additionally there is now a new resource manager module, which greatly simplifies loading or resources, retrieval of already loaded resources and freeing of all loaded resources from memory. The demo project was also reworked into a minigame to show off these new features.
Changelog:
GML API:
Core module:
- Added new function
bbmod_buffer_load_async
, using which you can asynchronnously load buffer from a file. - Added new function
bbmod_async_save_load_update
, which must be executed in the "Async - Save/Load" event if you use asynchronnous loading of buffers. - Added new function
bbmod_sprite_add_async
, using which you can asynchronnously load sprite from a file. - Added new function
bbmod_async_image_loaded_update
, which must be executed in the "Async - Image Loaded" event if you use asynchronnous loading of sprites. - Added new function
bbmod_empty_callback
, which is an empty callback for asynchronnous functions. - Added new struct
BBMOD_Resource
, which is now the base struct for all BBMOD resources. This struct contains methodsfrom_file
andfrom_file_async
, using which you can load resources from file synchronnously or asynchronnously. When using asynchronnous loading, propertyIsLoaded
isfalse
until the resource is loaded. Asynchronnous loading of files is required for example on the HTML5 platform. - Added new struct
BBMOD_Sprite
, which is a sprite resource. - Structs
BBMOD_Model
andBBMOD_Animation
now inherit fromBBMOD_Resource
. - Struct
BBMOD_BaseMaterial
now inherits fromBBOMD_Resource
too, though it does not yet support loading from files/buffers. - Arguments of the
BBMOD_Model
constructor are now optional. - Fixed method
BBMOD_VertexFormat.get_byte_size
, which returned incorrect values when the vertex format included vertex colors or bones. - Fixed creating dynamic and static batches with models that have vertex colors.
- Animation transitions do no longer trigger event
BBMOD_EV_ANIMATION_END
. This caused unexpected behavior of animation playback, animation state machines etc.
Camera module:
- Fixed mouselook on HTML5.
- Fixed audio listener orientation.
Resource manager module:
- Added new module - Resource manager.
- Added new struct
BBMOD_ResourceManager
, using which you can load any BBMOD resource. These are automatically destroyed when the resource manager is destroyed.
Rendering module:
Renderer submodule:
- Added new property
VignetteColor
toBBMOD_Renderer
, which is the color of the vignette effect. - When a renderer with enabled
UseAppSurface
is destroyed, it again enables automatic rendering of the application surface.
3.1.6
This is a small hotfix release that patches rendering of dynamic shadows on OpenGL platforms. No changes were made to the GML APL, only to the shaders.
3.1.5
This release adds color grading, chromatic aberration, grayscale and vignette post-processing effects and fast approximate anti-aliasing (FXAA) to renderer. Additionally animation player now supports frame skipping, using which you can for example increase performance when rendering animated characters in the distance by skipping over few frames.
Changelog:
GML API:
Core module:
- Added new property
Frameskip
toBBMOD_AnimationPlayer
using which you can configure number of frames to skip during animation playback.
Rendering module:
- Added new submodule - FXAA - containing fast approximate anti-aliasing shader.
- Added new submodule - Post-processing - containing post-processing shaders.
Renderer submodule:
- Added new enum
BBMOD_EAntialiasing
, containing all possible anti-aliasing types. - Added new property
Antialiasing
toBBMOD_Renderer
, using which you can configure which anti-aliasing type to use. Enabling AA will also require appropriate submodule. - Added new property
EnablePostProcessing
toBBMOD_Renderer
, using which you can enable post-processing effects. Enabling this will require the post-processing submodule. - Added new property
ColorGradingLUT
toBBMOD_Renderer
, using which you can configure lookup table texture for color grading. - Added new property
ChromaticAberration
toBBMOD_Renderer
, using which you can configure strength of chromatic aberration effect. - Added new property
Grayscale
toBBMOD_Renderer
, using which you can configure strength of grayscale effect. - Added new property
Vignette
toBBMOD_Renderer
, using which you can configure strength of vignette effect. - Overridden method
destroy
ofBBMOD_Renderer
to fix shadowmap memory leaks. Do not forget to call this method before a renderer instance goes out of scope.