Menu

SpriteSheet Utility

2019-01-02
2019-01-03
  • Valter Buccina

    Valter Buccina - 2019-01-02

    Hi everyone,
    to become familiar with Castle Engine on Lazarus I started working with images, sprites and spritesheet.
    At the end a pretty nice program came out.
    It may be useful for beginners like me to study the first steps of an engine so extensive.
    At present it is possible to do this:
    Load the necessary images and create the spritesheet directly from within Lazarus without using the command line. It use ShellExecute.
    Flip and resize individual images (with or without constraints of proportions). It might be useful for creating spritesheets in the opposite directions). It use TCastleImage and TGLImage in TCastleControl.
    For resizing it is possible to set the interpolation mode in those proposed in TResizeInterpolation.
    Finally you can load a spritesheet and see the animation. Frame sizes are automatically calculated based on the number of frames and columns. It is possible to change frames per second during the animation. It use TSprite.
    It is not anything special but you can find useful ideas to start understanding CGE.
    I posted application and sources on GitHub, https://github.com/valterb/spritesheet-utility
    If you try it let me know of any bugs.

     
  • Valter Buccina

    Valter Buccina - 2019-01-03

    Thanks for the suggestions, Michalis. Done. I thought it was not right to use your code directly in my program. Now the program no longer uses ShellExecute and also automatically inserts the correct value for Padding so it will be necessary to enter only the number of columns desired.
    The changes have already been posted on GitHub.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB