Releases: JujuAdams/Scribble
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!
Bug Fixes!
This is a smaller release to fix a number of minor bugs.
This update address the following issues:
#98 - Subtle change to the word of instructions for importing .yy files to reduce confusion in GMS2.3.0
#99 - Adds the [jitter]
effect
#100 - Fonts added by GM at runtime will now be skipped when scribble_init()
does its autoscanning
#102 - SCRIBBLE_FIX_ESCAPED_NEWLINES
has been added and can be set to true
to replace instances of \\n
with a proper newline. This is useful for cleaning up text without having to run string_replace_all()
(which can be slow for large strings)
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!
Extra Formatting
This release adds the oft-requested [cycle]
tag!
The cycle tag can be thought of like a customised [rainbow]
colour scroller, allowing you to define up to 4 hues for Scribble to cycle through. These colours are defined as hue values from 0 to 255 inclusive (e.g. [cycle,90,110,130]Text![/cycle]
). The saturation
and value
parameters are set for the entire text element with scribble_set_animation()
using the SCRIBBLE_ANIM.CYCLE_SATURATION
and SCRIBBLE_ANIM.CYCLE_VALUE
fields. The hue values used for [cycle]
tags can be customised per tag.
Issues addressed:
#84 - Adds [r] [b] [i] [bi]
tags to quickly switch between regular/bold/italic variants of a typeface. This can only be used on normal (non-spritefont) fonts, and regular/bold/italic variants of a font must be explicitly created and added to Scribble like any other font. To swap between regular/bold/italic versions of a font, the fonts must have the same typeface and the exact same font size
#85 - Adds [cycle]
to rotate the colour of text through up to 4 different hues in HSV space. See above
#86 / #88 - Adds scribble_combine_fonts()
which allows for two or more fonts to be combined together to make a single font
#89 - Added __scribble_config()
as a deprecated script to prevent old macros from persisting after upgrading from v5.x to v6.x
#90 - _events_char_array
is now initialised properly when retrieving a non-default occurrence
#91 - Changes prefixed unary operators to suffixed to fix import issues into GMS2.3.0
#92 - scribble_set_blend()
and scribble_set_starting_format()
now accept strings that correspond to names created with scribble_add_color()
#95 - Fixed fade out animation
Additionally:
[/]
should now be used to clear formatting.[]
has been deprecated and will be removed in v7.x- The
[pin_*]
text justification tags will now use the maximum width set byscribble_set_wrap()
as a reference point for positioning scribble_autotype_get()
will return1.0
for totally empty pages- Animated sprites can now be coloured using the standard in-line formatting tags (including
[rainbow]
and[cycle]
) - Vertex buffer writing has been restructed to pack data more efficiently. Scribble glyphs are now limited to 200x200 pixels
- Scribble vertex buffers will now render mostly correctly without any shader being set. This behaviour is experimental, but this should allow for custom shaders in the future
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!
Non-Breaking Spaces
Small release again to quickly fix some small issues:
#82 - Using scribble_autotype_get()
on an empty page will now return 1.0
#83 - Adds [nbsp]
as a command tag. This instructs Scribble to emulate a non-breaking space when building the text element. This doesn't modify your input string itself, and standard non-breaking spaces will still work with Scribble; this feature is purely for convenience
This release also fixes a crash in scribble_autotype_skip()
and a vertical text spacing bug when creating new lines with down-scaled text. Additionally, [/]
can now be used to clear formatting instead of []
if you prefer.
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!
Tightening The Bolts
Small release with some lil' tweaks:
#75 - Font .yy files made in GMS2.3.0 will now work with Scribble
#79 - scribble_get_width()
and scribble_get_height()
can now target specific pages. scribble_set_box_align()
has a new argument ([usePageSize]
) to cause scribble_get_bbox()
and scribble_draw()
to use the size of the page rather than the size of the text element
#80 - Fixes events not firing when skipping text, or replaying previously seen text
Additionally, the cache now handles large quantities of text more elegantly, leading to safer memory management.
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!
Version 6
This is a massive new version which changes core features of the library.
You can read about the changes on the wiki. There are lots of things in here that will break compatibility with version 5, which is why I've waited for a major version before publishing these improvements.
Here's a short selection of the biggest new features and improvements:
-
Horizontal alignment has been totally reworked so it's closer to the way GameMaker works natively. Old Scribble behaviour can be achieved with
[pin_left]
,[pin_right]
, and[pin_center]
-
Many functions now allow you to use either text elements or strings
-
scribble_bake_outline()
has been added to make outlining fonts easy -
Spritefonts can now be monospaced or proportional
-
Autoscan now works cross-platform
-
Macros have been simplified with many being relocated to
scribble_reset()
-
scribble_cache()
has been added to make caching strings much, much easier. Cache groups have been simplified andscribble_flush()
is much less complicated -
Loads of bug fixes!
Tons of new features and functionality have been added as well thanks to feature requests from users:
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!
Pause For Thought
Scribble now natively supports in-line [pause] and [delay] commands!
-
Adds the native command tag
[pause]
. This will pause the autotyper indefinitely at the tag's position in the string. Callscribble_autotype_is_paused()
to return the paused state, callscribble_autotype_set_paused()
to set the paused state. Setting the paused state tofalse
will allow the autotyper to continue showing text. -
Adds the native command tag
[delay]
. This will pause the autotype for a fixed amount of time at the tag's position in the string. The duration of[delay]
defaults toSCRIBBLE_DEFAULT_DELAY_DURATION
, but by specifying an argument (e.g.[delay,500]
) the length of the duration can be controlled. The delay duration is measured in milliseconds of real time.
Issues resolved:
- #39 - See above!
- #48 -
__SCRIBBLE.CHARACTERS
now includes spaces - #53 - Removed
SCRIBBLE_Z
- #54 - Added
SCRIBBLE_BBOX.W
andSCRIBBLE_BBOX.H
to allow for access to the specific width and height of a text element. In general, the LTRB values should be used instead - #55 - Setting
SCRIBBLE_CREATE_GLYPH_LTRB_ARRAY
totrue
will get Scribble to output an array of glyph metadata. It is recommend that this functionality is avoided as much as possible as it carries a significant performance penalty - #58 -
[wheel]
has been added as an animated text effect to emulate Pet the Pup at the Party, specifically the FIND THAT PUP rainbow text motion
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!
Monospaced Spritefonts
Spritefonts can now be used as monospace fonts!
Scribble attempts to emulate GameMaker's native font behaviour as closely as possible, including when handling spritefonts. Scribble's spritefonts have long been limited to proportional-only, but today that changes!
Spritefonts in Scribble will still default to proportional, but a new optional argument has been added to scribble_add_spritefont()
to control this. By setting [proportional]
to false
, Scribble will treat the sprite as monospaced and will copy GameMaker's behaviour. [spaceWidth]
will still affect the size of spaces so when using monospace spritefonts you will likely want to set [spaceWidth]
to undefined
to allow Scribble to automatically determine the size of a space character.
SCRIBBLE_SPRITEFONT_ALIGN_GLYPHS_LEFT
has been added to further control how spritefonts are processed. Scribble allows spritefont characters to be placed anywhere relative to the line of text which is useful if you want to do interesting things with your fonts. However, this isn't the way GameMaker works natively. By setting SCRIBBLE_SPRITEFONT_ALIGN_GLYPHS_LEFT
to true
(it defaults to false
) you can exactly replicate GameMaker's spritefont behaviour.
Additionally, the following bugs are fixed:
- Various sound playback glitches e.g. moving the window after text has faded in
- Corrects a warning message when not setting a space width
- Line heights now correct when changing a font at the start of a line
Further Bug Fixes
This is a smaller release to fix some bugs.
Fixes:
- #46 - Fixes spritefonts being affected by their origin in strange ways; fixes off-by-one in spritefonts
- #49 - Vertex buffer winding is now clockwise to make working in 3D easier
- #50 -
scribble_init()
now returns whether the library was initialized successfully. Additionally,SCRIBBLE_WARNING_REINITIALIZE
has been added as a macro to control whether a pop-up error message is shown when reinitializing - #51 -
scribble_draw_set_wrap()
now checks for an invalid value being used for the[maxLineHeight]
argument - #52 - Sprite images that are scaled and don't fill the sprite canvas are now positioned correctly