c4sp3r89's Forum Posts

  • I noticed. But because my previous project was using this plugin before the official spritefont came out. So if I was to change to the official spritefont, it would be quite alot to change. So was wondering if the WebGL rendering for my spritefont is done correctly.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • This is a spritefont plugin I roughly wrote up for a project my company is working on and now it is working as needed so I would like to share it and if anyone has any comment on the coding that I can improve on could feel free to let me know and I can improve it (Especially the rendering part).

    Here is the sample dropbox.com/s/ki4gz37nl5s7mx3/spritefont.capx.

    Here is the plugin dropbox.com/s/2i7tjhxf5g59a7a/EPICreationZ_Spritefont.zip

    Preparation of image:

    To start, you have to export the fonts with mono spacing as shown in the capx, sprite object "FontSheet".

    Afterwhich, create the spritefont plugin "EPICreationZ_Spritefont".

    In the "EPICreationZ_Spritefont" image editor, import as spritesheet. Find the fontsheet you have exported earlier and load into the editor.

    Delete all the empty frames.

    Go to the 1st frame (Which normally will be alphabet "A") and set the origin imagepoint to the base of the letter (Not the base of the image box).

    Apply the origin imagepoint to all animation frames.

    Crop all animation frame.

    *For spacing, create a new frame and set the width to the spacing width you want.

    **Origin imagepoint X is not taken into account for calculation of placement.

    ***Only the 1st animation will be used. So even if you create another animation, it will not be loaded.

    Plugin properties:

    Text: The text to show.

    Character set: The characters as in the animation frames. (If any of the frames is missing, it will cause error.)

    Scale: The size of the characters.

    Word wrap: Wrapping of words by word or character.

    Line height: The height in pixels of each line. (Normally if the origin imagepoint is set to the base, I would set line height to the height of alphabet "A")

    Vertical Spacing: The amount of space in pixel in between the lines.

    Horizontal Spacing: The amount of space in pixel between the characters.

    Horizontal Alignment: Horizontal align to Left,Center or Right.

    Vertical Alignment: Vertical align to Top or Center.

    *Color: Ignore this properties, leave it as White. (Used as a quick fix for my company project)

    Linear Sampling: Linear or point sampling.

    Hotspot: The origin of the font box.

    Debug: To show a red box if set to true.

  • Link to .capx file (required!):

    dropbox.com/s/te8zxxiogmwnejz/crash.capx

    Steps to reproduce:

    1. Delete 1 (Sprite) action from "on start of layout".

    2. Replace the other (Sprite) action in the same event with another sprite(Sprite2).

    3. Undo until the deleted action is restored.

    Observed result:

    C2 crashes or previous action not undo properly.

    Expected result:

    Actions should be restored

    Browsers affected:

    N.A

    Operating system & service pack:

    Windows 7 Home Edition

    Construct 2 version:

    R.139