Home Forums Game Frame Game Frame Art Gallery CONFIG.INI Documentation

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #689
    Jeremy Williams
    Keymaster

    As you might know, to show a single image on Game Frame, you just need to drop a 24-bit BMP into a folder and name it 0.bmp. To create an animation, you just add more graphics (1.bmp, 2.bmp, etc.). Optionally, you may include a text file called config.ini that unlocks additional control.

    What follows is a copy and paste from a sample config.ini file. In this example, a sprite is animated at 10fps and moved across the screen from left to right, starting and ending off-screen. When it gets all the way to the right, the animation will end and the system will progress to the next folder. Please let me know what else I can clarify.

    CONFIG.INI

    # All of these settings are optional.
    # If this file doesnโ€™t exist, or if
    # settings donโ€™t appear in this file,
    # Game Frame will use default values.

    [animation]

    # milliseconds to hold each frame
    # (1000 = 1 sec; lower is faster)
    hold = 100

    # should the animation loop? If false,
    # system will progress to next folder
    # after the last frame is displayed.
    loop = true

    [translate]

    # move the animation across the screen
    # this many pixels per frame. Experiment
    # with positive and negative numbers for
    # different directions.
    moveX = 1
    moveY = 0

    # should the movement loop?
    loop = false

    # begin/end scroll off screen?
    panoff = true

    # optionally dictate the next animation
    # EXAMPLE: nextFolder = mspacman
    # nextFolder = defend1

    #697
    fogleman
    Participant

    Instead of “panoff” why not allow specifying an initial position in addition to the offset that is applied each frame (moveX and moveY)? Wouldn’t that be more flexible? I guess it’d look like this:

    startX = -16
    startY = 0

    moveX = 1
    moveY = 0

    Hmm, but then you’d need to specify an ending position too, or a number of frames to run.

    Basically you want to specify start, end, step.

    x = -16, 16, 1 # x ranges from -16 to 16 with a step of 1
    y = 0, 0, 0 # y is fixed at 0

    These could be separated into multiple fields if you don’t want the comma separated values.

    #698
    fogleman
    Participant

    If 0.bmp is an multi-image sequence (16×64 px for example) and 1.bmp is too, do they both animate in sequence?

    #699
    Jeremy Williams
    Keymaster

    Regarding a more flexible alternative to “panoff,” that sounds like a great community firmware mod. I want to start things as simple as possible, thus a binary solution. The implementation works perfectly for throwing old arcade characters on the screen that walk/drive/fly across, and everything eBoy’s wanted to do. It also works for film strips.

    To your other question, if 0.bmp has a MoveX/Y value > 0, and 1.bmp is present (or more graphics), it will offset X/Y pixels each frame AND iterate through the files each frame. This combines multi-file animation with translation. Does that make sense? eBoy has put this to great use in a couple impressive animations.

    If you want to sequence from one animation to another, there are two options. You can use the last entry in CONFIG.INI, or you can nest numerical folders. For instance, if you wanted to create a sequence of animations from Pacman:

    /pacman/0 (includes pacman animation)
    /pacman/1 (includes ghost animation)
    /pacman/2 (includes blue ghost animation)
    /pacman/3 (includes pacman going the other direction)

    This works just as well with filmstrips or multi-file animations. The only difference between the two methods (CONFIG.INI or nested folders) is how the next button works. With nested, it will skip subsequent folders. With CONFIG.INI, it will go to what’s specified.

    #1184
    renaud.bedard
    Participant

    Hi!

    Just got my GameFrame and I’m trying to port over some animated GIFs to it.
    Is there any way to set a delay per frame, if my frames have different delay times to one another?

    If not I’ll just duplicate frames for it to work, but it’s a bit more work.

    Thanks! ๐Ÿ™‚

    #1185
    Jeremy Williams
    Keymaster

    No, I’m afraid you have to duplicate frames. Game Frame runs at a constant rate… just like a movie projector! ๐Ÿ™‚

    As an aside, I just posted a relevant guide here:
    https://www.ledseq.com/faq-category/game-frame/#post-1165

    #1700
    gnolivos
    Participant

    In your nested folder example, it was not clear to me: Should I include a CONFIG.INI file into each of the nested pacman folders? I would like to have specific frame rates for each of the sequences for quite legitimate reasons ๐Ÿ™‚

    /pacman/0 (includes pacman animation)
    /pacman/1 (includes ghost animation)
    /pacman/2 (includes blue ghost animation)
    /pacman/3 (includes pacman going the other direction)

    #1701
    gnolivos
    Participant

    Tested it out, and YES it does support config.ini within subfolders! very nice.

    #1706
    Jeremy Williams
    Keymaster

    Yep! And FYI this is explained in the FAQ.

    Each of the numerical folders looks just like a standard image folder, and can contain its own CONFIG.INI.

    #2346
    ian.hilton
    Participant

    Hi,
    I am trying to use the gfx2gf batch file on the following animated gif. The properties are 8bit depth dimensions 64×64 pixels. Although the image is designed as 16×16 pixel.

    The batch file works but there are a lot of colour artifacts introduced so the edges dont look clean. Is there any way to avoid these artifaces being introduced to retain the sharp edges of the original?

    Attachments:
    You must be logged in to view attached files.
    #2349
    Jeremy Williams
    Keymaster

    Yeah, when I get home tonight I’ll provide a fix. You want to resize using nearest neighbor filtering.

    #2351
    Jeremy Williams
    Keymaster

    @ian.hilton: Grab the latest gfx2gf and see if that works for you:
    https://www.ledseq.com/downloads/gfx2gf.zip

    It now asks you if you want to use nearest neighbor on launch, and you have to answer Y or N. It will also ask if you want to crop if your source is not square.

    NOTE: I had to update my copy of FFMPEG (dated 2013) for nearest neighbor to look correct. There were subtle inaccuracies in my old copy.

    #2352
    ^MuYa^
    Participant

    Are you sure this is the new .bat file? It’s not asking me any questions.

    #2353
    Jeremy Williams
    Keymaster

    Sorry, I can’t explain it — some weird caching issue. If I rename the file on the server I can download it correctly. Try this:

    https://www.ledseq.com/downloads/gfx2gf_1.6.zip

    #2354
    ian.hilton
    Participant

    Awesome, that works a treat. Expect some additions to the art gallery. Ive got a bunch of cool stuff to process and add ๐Ÿ™‚

Viewing 15 posts - 1 through 15 (of 20 total)
  • The forum ‘Game Frame Art Gallery’ is closed to new topics and replies.