Any sprite-based game requires careful balancing between quality and performance. Let's think about framerate. It's very low in ...

Framerate and file size

2:02 PM slee 3 Comments

RagnaToS - Framerate and file size

Any sprite-based game requires careful balancing between quality and performance.
Let's think about framerate. It's very low in Ragnarok Online, max 8 frames per one movement of character in one direction. What if I'll greatly increase the frames? I want to calculate what will be size of new file.
I have a Ranger's .act and .spr files. It has very small size of 204 kB, because pixel art, low framerate. And contains only 116 sprites for all character's movements.

Idle - 5 sprites
Walking - 40 sprites
Sitting - 5 sprites
Picking Item - 4 sprites
Standby - 12 sprites
Attacking 1 - 8 sprites
Receiving damage - 2 sprites
Dead - 2 sprites
Attacking (knife) - 12 sprites
Attacking (bow) - 16 sprites
Casting spell - 10 sprites

So the size of one sprite is approximately equal 1.75 kB (compressed). My ToS sprites are x3 bigger.
I'll Increase next animation positions like this:

Idle - 5 sprites
Walking - 150 sprites
Sitting - 5 sprites
Picking Item - 20 sprites
Standby - 60 sprites
Attacking 1 - 20 sprites
Receiving damage - 20 sprites
Dead - 2 sprites
Attacking (knife) - 60 sprites
Attacking (bow) - 60 sprites
Casting spell - 40 sprites
Total - 442 sprites

773 kB (normal size) * 3 (ToS size) = approx 2.3 MB of .spr file size.

Result:
Normal RO framerate:
RagnaToS - Framerate and file size RagnaToS - Framerate and file size

With the addition of frames:

RagnaToS - Framerate and file size RagnaToS - Framerate and file size
Looks very smoothly.

But I can't say anything how will this affect to performance. Because I'm not a developer.
Well, testing will tell.

3 comments:

  1. Hi, just want to let you know, that this your kind of hobby for fun really amazing!
    Keep it up and bring something different to our Ragnarok Community

    ReplyDelete
  2. Hello can you share your act and spr files? Just asking

    ReplyDelete