Discussion GMS 2 messed up my text formatting

Discussion in 'GameMaker Studio 2 Community Tech Support' started by OblivionSkull21, Nov 30, 2018.

  1. OblivionSkull21

    OblivionSkull21 Member

    Joined:
    Sep 26, 2017
    Posts:
    167
    I just migrated from GMS1 to GMS 2, and I just tried to import my old GMS1 project. It imported fine, a compatibility report was made... I had to fix a few things, but the game is running fine now with a few exceptions...

    For some reason, GMS 2 is not drawing text the way GMS 1 did. Dialogue is now super squished and not properly spaced nor is it drawn at the correct coordinates. The font looks choppy, not at all like it did before.

    I also noticed the alarms I use are finishing a lot faster than normal. I had to add an extra few seconds because they were going off too early for some reason.

    So those are two big issues. The text is basically messed up everywhere: the inventory screen, the pause screen, quest menu, dialogue boxes, etc.

    So my question is...

    Is this just something GMS 2 does or is there some settings I need to adjust to fix this issue? Again it's really frustrating because now I have to go adjust all my alarms and reformat the text...
     
    Last edited: Nov 30, 2018
  2. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    3,405
    Check that your application surface is the correct size for the text.

    For everything being faster I’d take a guess that it’s because GMS2 recently changed to defaulting projects to run at 60fps rather than 30fps which is the default in GMS1 - so everything appears to be running twice as fast.
     
  3. OblivionSkull21

    OblivionSkull21 Member

    Joined:
    Sep 26, 2017
    Posts:
    167
    How do I change that? My game is 30fps.
     
  4. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,157
    The text engine was changed for GMS2 (and a coming update is going to change how it works again, and will certainly help in situations like yours). Unfortunately the change meant that legacy GM projects which are imported may have issues such as this... In general, you want to make sure that:
    • Fonts are NOT scaled using draw_text_transformed (although scaling a large font down will give better results than scaling up)
    • Text is drawn at integer x/y positions (so floor/ceil the draw positions)
    • The app surface is 1:1 with the view port or room size
    • The GUI is the correct resolution (if drawing on the GUI layer)
    As for changing the FPS, go into the Main Game Options and you can find the Game Speed, which you can change.
     
  5. True Valhalla

    True Valhalla Full-Time Developer GMC Elder

    Joined:
    Jun 20, 2016
    Posts:
    280
  6. OblivionSkull21

    OblivionSkull21 Member

    Joined:
    Sep 26, 2017
    Posts:
    167
    All my text is drawn using view coordinates (Ex. view_xview + 120). I understand views were replaced in the compatibility report. Could this be causing it?
     
  7. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,157
    Almost certainly that will influence things, yes. You'll want to floor the view coords when drawing, but this has the unfortunate side effect of meaning that the text may "jump" due to sub-pixel view positions. Ideally, you really want to use the Draw GUI event for any text like that. It negates the need for the view offset and resolves a lot of resolution based issues, since you can set the GUI res independently.
     
    OblivionSkull21 likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice