Graphics Checklist for Missing Text Bugs

FrostyCat

Member
Checklist for Missing Text Bugs

GM Version: ALL
Target Platform: ALL
Download: N/A
Links: N/A

Preface
This checklist details the most common causes of bugs involving missing on-screen text. An answer of "Yes" to any item in the list requires your attention.

Object Setup and Code
  • Is the "Visible" box in the drawing object's properties window unchecked?
  • Is the text drawing call outside a Draw-type event?
  • Has the drawing target been redirected to a surface, and if so, did you forget drawing the surface back onto the screen where it can be seen?
  • Is there anything after the text drawing call that would draw over it?
  • Is there a control structure that may keep the text drawing call from executing?
Existence
  • Did you forget to put an instance of the drawing object in the room?
  • If the instance is generated by another call to instance_create() (GMS 1.x and legacy) or instance_create_layer() / instance_create_depth() (GMS 2.x), is that piece of creating code being skipped?
  • Is there anything in the room that would destroy the instance of the drawing object?
  • Is there anything in the room that would prevent the instance's Draw event, such as deactivation calls or assignments to the instance's visible variable?
Positioning
  • Is the drawing position outside room boundaries?
  • Is the drawing position outside active view boundaries?
  • If views are enabled, are you using inappropriate coordinate references, such as on-screen coordinates in the regular Draw event or in-room/view-relative coordinates in the Draw GUI event?
  • Has the drawing alignment been set elsewhere and not set back?
  • Is the text being drawn behind something else, such as another instance, an effect created above or a foreground?
  • If drawn at a relative position, are you using inappropriate position variables, such as phy_position_x and phy_position_y for a non-physics instance, or x and y for a physics instance?
  • If 3D is enabled, did you forget to set the projection back to orthographic before drawing the text?
  • If 3D transformations have been applied, are the coordinates not geared for the current transformation matrix? In particular, is it assuming an identity transform when the current transformation is not?
Font Setup
  • Did you forget to set a valid font before drawing the text? (This is especially important on HTML5, which does not support using the default font)
  • Does the font resource lack the correct selection/range of characters required to draw the text?
  • If the drawing font is not a sprite font, does the underlying font file lack certain glyphs required to draw the text? (Use the Character Map to find out)
  • If the drawing font was generated using font_add(), are you giving it the inappropriate parameters with respect to the export being used? (font_add() accepts TTF file names for native and font names for HTML5)
  • If the font is added from the IDE, is there a bug in GM's font-to-texture rendering that garbles the glyphs beyond use? (You can check this by going into the fonts directory in your project and looking at the generated font texture)
Colour
  • Is the drawing alpha set to 0 or a small value (usually <0.2) somewhere else and hasn't been set back?
  • Is the colour around where the text is drawn the same as or similar to the text's colour?
  • Are you colour-blind to the colour combination of the text and the area behind the text?
String to Draw
  • Is the string to draw empty or consisting entirely of control/space characters?
  • Does the string contain spaces or line breaks that would push off non-space content where you didn't expect?
  • If the string is read from a file and it contains characters outside the ASCII range (0-127), is the file missing its UTF-8 BOM?
  • Has your string been clipped off by a premature null character?
 
Last edited:
G

Guest

Guest
Regarding font setup, the manual isn't crystal clear that you need to convert your sprite strip into frames to use it with font_sprite_add(). It does say "subimages" which implies that the sprite should be converted into frames, it still might be a good addition for the list.
 
Top