Author Topic: FF Tiles and sprites  (Read 3105 times)

guillaumeD

  • Newbie
  • *
  • Posts: 3
    • View Profile
FF Tiles and sprites
« on: August 15, 2015, 04:48:00 pm »
Tried to experiment Solarus and sprites.

I made a hero sprite of Terra from Final Fantasy 3 (US/snes).


And here the walking definition.
animation{
  name = "walking",
  src_image = "hero/walking.tunic.png",
  frame_delay = 200,
  frame_to_loop_on = 0,
  directions = {
    { x = 0, y = 30, frame_width = 16, frame_height = 24, origin_x = 8, origin_y = 21, num_frames = 4 },
    { x = 0, y = 90, frame_width = 16, frame_height = 24, origin_x = 8, origin_y = 21, num_frames = 4 },
    { x = 0, y = 60, frame_width = 16, frame_height = 24, origin_x = 8, origin_y = 21, num_frames = 4 },
    { x = 0, y = 0, frame_width = 16, frame_height = 24, origin_x = 8, origin_y = 21, num_frames = 4 },
  },
}



I'd like to prepare a resource pack for solarus with tiles and sprites of Final Fantasy.
I made a tool that load a screenshot and detect unique sprite (8x8) on it.
So I can play with a snes emulator, make so screenshot and create sprites quite easily ...

Solarus is really cool, even if a lot of things seems to be coded from zelda gameplay such as sprites names and animations (tunics, grabing, swimming ...)

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1144
    • View Profile
Re: FF Tiles and sprites
« Reply #1 on: August 15, 2015, 07:02:55 pm »
Nice!
Is your animation capture tool available somewhere?

guillaumeD

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: FF Tiles and sprites
« Reply #2 on: August 20, 2015, 10:43:49 am »

For the moment it is just some java source files configured for my needs.
I Use it to extract tiles, not animation right now.
On a screenshot, it take a piece of 8x8 pixel, store them as a tile and continue on the next one ... If a tile already exists it is skipped.

I Use the "disable layer X" on zsnes to improve some tile overlay when needed (tiles with transparency). So that screenshot got black background. I notice that black color (0x000000) is not used on tiles. Maybe used as a transparency marker ?

For animations, sources can be modified easily to detect main character tile changes between two or more screenshot
Actualy, Character or any other tile animation. As far as the tiles are on the same position.

I will do more configurable options and try to publish sources on github if it can help others.


Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1144
    • View Profile
Re: FF Tiles and sprites
« Reply #3 on: August 20, 2015, 11:08:45 am »
Yes I'm sure it can help :)
In Solarus there is no special color for transparency, we directly use the transparency channel of PNG images. I don't understand why other software replace a special color by transparent pixels.

guillaumeD

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: FF Tiles and sprites
« Reply #4 on: August 23, 2015, 04:45:00 pm »

I suppose that color palette is used to limit amount of memory used and be able to speed up layers drawing on screens.
a dedicated alpha channel for transparency means 25% more data and more computation time also.
A dedicated color to do so was an easy way to skip pixel drawing, and also an easy way to edit sprites.

Ok, nowadays those arguments do not count anymore. We got Terabyte storage, Gigabyte of memory and Ghz of cpu clock ...
Moreover, we got dedicated hardware (graphic cards) optimized for this computation :)


Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1144
    • View Profile
Re: FF Tiles and sprites
« Reply #5 on: August 23, 2015, 09:29:17 pm »
PNG images with palettes are also supported, so there is no overhead if you use them.