Skip to content

Releases: JujuAdams/Scribble

Bug Fixes!

22 Jul 20:57
ee6aff5
Compare
Choose a tag to compare

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

11 Jul 17:29
Compare
Choose a tag to compare

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 by scribble_set_wrap() as a reference point for positioning
  • scribble_autotype_get() will return 1.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

26 Jun 21:06
Compare
Choose a tag to compare

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

21 Jun 16:50
d9aeaae
Compare
Choose a tag to compare

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

07 Jun 15:38
Compare
Choose a tag to compare

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:

  1. 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]

  2. Many functions now allow you to use either text elements or strings

  3. scribble_bake_outline() has been added to make outlining fonts easy

  4. Spritefonts can now be monospaced or proportional

  5. Autoscan now works cross-platform

  6. Macros have been simplified with many being relocated to scribble_reset()

  7. scribble_cache() has been added to make caching strings much, much easier. Cache groups have been simplified and scribble_flush() is much less complicated

  8. Loads of bug fixes!

 

Tons of new features and functionality have been added as well thanks to feature requests from users:

  1. scribble_get_width() and scribble_get_height()

  2. scribble_add_autotype_character_delay()

  3. scribble_whitelist_sprite()

  4. scribble_set_line_height()

  5. scribble_autotype_set_sound_per_char()

  6. scribble_autotype_function()

 

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

05 May 12:08
Compare
Choose a tag to compare

Scribble now natively supports in-line [pause] and [delay] commands!

  1. Adds the native command tag [pause]. This will pause the autotyper indefinitely at the tag's position in the string. Call scribble_autotype_is_paused() to return the paused state, call scribble_autotype_set_paused() to set the paused state. Setting the paused state to false will allow the autotyper to continue showing text.

  2. 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 to SCRIBBLE_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:

  1. #39 - See above!
  2. #48 - __SCRIBBLE.CHARACTERS now includes spaces
  3. #53 - Removed SCRIBBLE_Z
  4. #54 - Added SCRIBBLE_BBOX.W and SCRIBBLE_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
  5. #55 - Setting SCRIBBLE_CREATE_GLYPH_LTRB_ARRAY to true 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
  6. #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

24 Apr 09:51
Compare
Choose a tag to compare

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:

  1. Various sound playback glitches e.g. moving the window after text has faded in
  2. Corrects a warning message when not setting a space width
  3. Line heights now correct when changing a font at the start of a line

Further Bug Fixes

16 Apr 09:02
Compare
Choose a tag to compare

This is a smaller release to fix some bugs.

Fixes:

  1. #46 - Fixes spritefonts being affected by their origin in strange ways; fixes off-by-one in spritefonts
  2. #49 - Vertex buffer winding is now clockwise to make working in 3D easier
  3. #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
  4. #51 - scribble_draw_set_wrap() now checks for an invalid value being used for the [maxLineHeight] argument
  5. #52 - Sprite images that are scaled and don't fill the sprite canvas are now positioned correctly

Bug Squashing

22 Mar 16:15
42cc9a6
Compare
Choose a tag to compare

This is a smaller release to fix some bugs.

Fixes:

  1. #38 - Now throwing an (informative!) error when a spritefont's source sprite is set to Separate Texture Page
  2. #42 - Removes call to irandom() when using sound effects with autotype
  3. #43 - Words that exceed the width of the textbox are now wrapped properly
  4. #45 - Fixes issues with text element timers being incorrectly set in a few places

Pages And Pages Of Text

08 Mar 16:38
Compare
Choose a tag to compare

Scribble now supports pages within text elements!

This release also fixes some bugs and adds some small features that the Scribble community have recently raised:

  • Vertical alignment for text is now more logical
  • Horizontal alignment is more reliable
  • Formatting tags can be escaped by doubling the first open bracket e.g. [[tag],
  • The UK spelling for colour is now accepted as a macro rather than a native Scribble function
  • scribble_autotype_get() returns 1 when no fade type is set
  • Fixed a bunch of bugs with manual cache flushing
  • Fixes autotype sound effects and events not firing if autotype had been reset

 

New major feature! Pages!

A lot of the time when dealing with text-heavy games you end up spending your time doing things that the game should be doing for you. Scribble has always supported text wrapping to avoid having to manually insert line breaks, but this new update introduces automatic page breaks as well.

Automatic page breaks are useful for lots of situations - when dealing with localised text where you don't know how many extra words will be needed, textboxes that might not always be the same size due to different device sizes, simplifying your writing process to totally remove needing to check where to split up text to fit into textboxes.

Scribble offers a few new functions to display pages. Firstly, you can set the current page for your text element with scribble_page_set() and you can get the current page with scribble_page_get(). You can get the total number of pages for a text element using scribble_page_count(). Additionally, scribble_page_on_last() has been added to make it easier to detect when you're on the last page.

Pages can be created two ways. Most people will want to let Scribble handle page breaks automatically: scribble_draw_set_wrap() now has a maxLineHeight optional argument. This is used to specify the maximum height of the textbox. Any text that would be drawn outside the textbox is instead pushed onto a new page. For those looking for a little more control, the text formatting command [/page] can be used to manually create a new page. Manual page breaks with [/page] are useful when localising to help language feel more natural.

If you're not interested in page breaks, that's fine! All the current features will work the same way with no extra changes required. The only exception is for people using the characterWrap feature for scribble_draw_set_wrap() - you'll need to allow for the inclusion of the new maximum height argument. A change such as scribble_draw_set_wrap(-1, 300, true) ---> scribble_draw_set_wrap(-1, 300, -1, true) will fix any wrapping issues you might have.

 

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!