Releases: JujuAdams/Scribble
7.1.2
Addresses:
#176 #194 - MSDF fonts should now work properly cross-platform
#192 - .msdf_border()
can now be proportional to the scale of the text if PROPORTIONAL_BORDER_SCALE
constant is set to true
in the fragment shader for __shd_scribble_msdf
#197 - Text no longer flips when characters get too large (including for Bezier curves)
#199 - MSDF fonts no longer perform pre-multiplied alpha blending. N.B. This is a breaking change - if you'd like to turn on pre-multiplied alpha, please set the PREMULTIPLY_ALPHA
to true
in __shd_scribble
and/or __shd_scribble_msdf
#202 - Added scribble_font_has_character()
Additionally:
- Speed tags now work properly when skipping text
- Adds optional
executeOnlyOnChange
argument to.template()
method - Fixes
obj_example_big_textbox
- Fixes typos causing failure to compile on YYC
- Updates project to GMS2.3.2 (stable)
- Fixes a crash in an edge case when calling
.flush()
- Removes forced period call to
gc_collect()
7.1.1
Amongst other changes, this version deprecates SCRIBBLE_SKIP_SPEED_THRESHOLD
. Please use .typewriter_skip()
to skip text.
The following issues have been addressed:
#183 - Fixed strange animation behaviour by finding a workaround for limited floating point accuracy on certain graphics chipsets
#185 - .align()
can now use "pin_left"
"pin_center"
"pin_right"
in addition to the standard GameMaker alignment constants
#186 - .typewriter_skip()
now properly resets skip behaviour when changing page
Additonally:
- Substantial improvement to performance, doubling performance in most situations
- Fixes crash when trying to draw a null model
- Fixes line wrapping when multiple vertex buffers have been generated
7.1.0
One contribution by Faulty:
- Adds
.get_page_width()
and.get_page_height()
methods
The following issues have been addressed:
#171 - Fix for weird offset issues when certain fonts natural wrap to a new line
#177 - .draw()
, .build()
, and .flush()
now return undefined
. This is a breaking change to prevent misuse of these methods.
#178 - Datestamp no longer says 2020 🙂
#179 - Fixes various MSDF issues based on experience with a commercial project. y-alignment of MSDF fonts has been altered slightly and you may need to reposition text.
#180 - Fonts can now be added on boot rather than requiring the game to enter to first room
Additonally:
- Adds
SCRIBBLE_WARNING_REDEFINITION
macro to turn off exceptions when re-adding an already added font - Fixes crash when getting the bounding box of a null text element
- Adds
scribble_font_scale()
.typewriter_sound_per_char()
will no longer play a sound one extra time when a string finishes being typed out.typewriter_in()
will now respect state set by.typewriter_skip()
7.0.3
The following issues have been addressed:
#174 - .get_typewriter_pos()
now has proper documentation
#175 - Added .typewriter_skip()
as an alternative to setting the typewriter speed very high
Additonally:
- The documentation in the package has been cleaned up so it's easier to read.
.align()
now affects vertical alignment properly- Scribble will now throw an error when text is drawn but no fonts have been added
- Fixes a left-hand side spacing issue when text wraps around to a new line
- Fixes a crash when getting the bounding box of an empty string
Scribble 7
Welcome to Scribble 7!
Developing Scribble 7 has been a long road, and I'm proud to finally put it out as a stable library for use in projects big and small, for hobbyists and for gamedev professionals.
This version introduces many new features:
- A struct-based object-orientated API that makes Scribble easier to understand and use
- Custom typewriter animations
- MSDF fonts for resolution-independent UI
- Animation synchronisation across text elements
Scribble 7 is a total rethink of the API that you use to interact with the core technology that drives Scribble and, as a result, the documentation has been revamped to reflect Scribble's new API and featureset. I hope it's easier to navigate and understand.
Due to the scope of the changes, upgrading from v6 to v7 will require a substantial refactor of any existing Scribble code. The behaviour of standard fonts and spritefonts should not have changed so your resources themselves will not need to be adjusted.
Please note that Scribble 7 requires the use of GameMaker Studio 2.3.1.
Thanks again and have fun!
Odds And Ends
This release adds a handful of small feature requests to flesh out Scribble's capabilities.
Issues addressed:
#120 - Added scribble_set_ignore_command_tags()
so you can turn command tag parsing on and off whenever you want
#125 - Audio playback using the autotyper no longer requires the use of a custom function. Simply drop [<audio asset name>]
into a string and Scribble will play that audio asset when the autotyper reaches that point in the string
#128 - In-line surfaces are now supported. Use [surface,<surface ID>]
to draw a surface in-line like you would with a sprite (this'll probably take the form of "[surface," + string(surface_id) + "]"
since surface IDs are volatile)
#129 - Added scribble_set_fog()
to replicate the classic flashing text trick using gpu_set_fog()
(or d3d_set_fog()
if you're ancient like me)
#130 - scribble_get_bbox()
now returns the correct bounding box when using in-line vertical alignment tags
#132 - Some fonts behave weirdly due to how GM parses the source font file. There's not a lot I can do to fix this automatically, but scribble_set_glyph_property()
now supports all
as a keyword (instead of the character) to adjust a glyph property across all glyphs in a font
#140 - Fixes failure to compile shaders on MacOS
Additionally:
- Scribble deltatimes text by default now
- Pagination is more reliable with line widths and fixed line heights behaving appropriately
SCRIBBLE_NEWLINES_TRIM_LEFT_SPACE
has been added to allow you to control how newlines behave. Normally this should be set totrue
but for certain games that use monospaced spritefonts you'll want to set this tofalse
Bézier Curves
This release adds Bézier curve transforms for your text!
scribble_set_bezier()
defines a cubic Bézier curve to shape text to. The four x/y coordinate pairs provide a smooth curve that Scribble uses as a guide to position and rotate glyphs.
The curve is positioned relative to the coordinate specified when calling scribble_draw()
so that the first Bézier coordinate is at the draw coordinate. This enables you to move a curve without re-adjusting the values set in scribble_set_bezier()
(which would regenerate the text element, likely causing performance problems).
If used in conjunction with scribble_set_wrap()
, the total length of the curve is used to wrap text horizontally and overrides the value specified in scribble_set_wrap()
. scribble_set_bezier()
will not work with [fa_right]
or [fa_center]
alignment. Instead, you should use [pin_right]
and [pin_center]
.
Issues addressed:
#115 - [delay]
and [pause]
now stop the text in the correct place for all autotype speed values
#121 - [rainbow]
now respects SCRIBBLE_COLORIZE_SPRITES
when colouring sprites
#123 - Fixed horizontal alignment
How do I import Scribble into my game?
GameMaker Studio 2.3.0 allows you to import assets (including scripts and shaders) directly into your project via the "Local Package" system. From the resources below, download the .yymp file. In the GameMaker IDE, load up your project and click on "Tools" on the main window toolbar. Select "Import Local Package" from the drop-down menu then import all scripts and shaders from the Scribble package. Now you're all set up to use Scribble!
More Bug Fixes!
This is a smaller release to fix some minor issues. Please read the patch notes for the prior release for more information.
Issues addressed:
#116 - Functions can now be used for scribble_add_autotype_event()
and scribble_autotype_function()
#117 - scribble_add_font()
will now show appropriate error messages when using an asset index rather than an asset name
Additionally:
[scaleStack]
is now available as a command tag, allow for scaling to be applied multiplicatively rather than resetting the scaling value- Fixed a crash in
scribble_bake_shader()
GMS2.3.0 Stable Release
With the release of GameMaker Studio 2.3.0 into stable, many developers are porting their game into GMS2.3.0 from GMS2.2.5. Unfortunately, GMS2.3.0 introduces a tiny number of edge case breaking changes that, of course, Scribble falls foul of. Typical!
In order to get everyone up and running as smoothly as possible, this release will tie together the loose ends. This release of Scribble fixes compile errors and corrects strange duplicate character issues for spritefonts (#111 / #114). If you're updating from an earlier version of Scribble 6, then you'll get all the bug fixes since then too.
For people upgrading from Scribble 5 then please be aware that there have been a lot of changes between v5.x.x and v6.0.0. Please note that this change log is from v5.x.x to v6.0.0 and there have been additional changes from v6.0.0 to this release (6.0.11). The changes are detailed in the patch notes for each release - please review them carefully.
The biggest change that catches people out is that the horizontal and vertical alignment now copy GameMaker's behaviour, and they should be done using in-line command tags e.g. [fa_right][fa_bottom]Bottom-right aligned text
. scribble_set_box_align()
should be avoided - whilst it's technically not deprecated (and won't be until Scribble 7), it will be removed later this year.
Please also note that all future versions of Scribble will be released in GMS2.3.0.
All in all, thank you for using Scribble! It's been quite a journey over the last year seeing people make use of this humble little library, and thanks for being patient when issues arise. I'm happy to announce that Scribble is being used in several commercial projects now, including Shovel Knight Pocket Dungeon. Scribble will be supported for as long as people are making good use of it and that shows no sign of slowing down.
I'm excited for the future, and I hope you are too!
More Bug Fixes!
This is a smaller release to fix a number of minor bugs and small feature requests.
This update address the following issues:
#71 - Line heights when a single word wraps to a new line at the very end of a string have now been corrected
#105 - Adds vertical alignment command tags ([fa_top] [fa_middle] [fa_bottom]
). Only one valign command tag may be used per string, and the vertical alignment affects the entire textbox. You'll probably want to avoid using scribble_set_box_align()
if you're using these command tags as the two will interact in strange ways
#106 - Fixed a number of shader issues on specific bits of hardware
In addition:
- Fixed crash in
scribble_bake_shader()
andscribble_bake_outline()
- Removes the check to see if the default font exists in the project as it was unnecessary and confusing when using certain setups
- Stronger datatype checking for font names (including
scribble_set_starting_format()
)
How do I import Scribble into my game?
GameMaker Studio 2.2.3 allows you to import assets (including scripts and shaders) directly into your project via the "Local Package" system. From the resources below, download the .yymp file. In the GameMaker IDE, load up your project and click on "Tools" on the main window toolbar. Select "Import Local Package" from the drop-down menu then import all scripts and shaders from the Scribble package. Now you're all set up to use Scribble!