"NANIKA(Temporary)"
Documents - SERIKO(MAYUNA) -


SSTP Protocol Base Structure

The SERIKO specification is an approach to give high performance, and high quality animation features to your shell with low costs. You can animate your shell with various methods or its combinations from blinking eyes to moving the body as you like it, and of course, in exchange for CPU load.

SERIKO/1.2

home
  +-ghost
      +-seriko
          +-surface0.png
          +-surface0a.dat
          +-surface50.png
          +-surface51.png
The animation is generally realized by the configuration file named "surface[id]a.dat" which is descripting the animation patterns. The configuration file must make one-to-one for the base surface file. For example, you wish to make your ghosts to be able to blink eyes on the surface0, you must make the configuration file "surface0a.dat".

The format of the configuration file "surface[id]a.dat" is as follows;
0interval,sometimes
0pattern0,100,5,overlay,0,0
0pattern1,101,5,overlay,0,0
0pattern2,100,5,overlay,0,0
0pattern3,-1,5,overlay,0,0

1interval,always
1pattern0,50,20,overlay,10,0
1pattern1,51,20,overlay,10,0
1pattern2,52,20,overlay,10,0
1pattern3,53,20,overlay,10,0
1pattern4,54,20,overlay,10,0
1pattern5,53,20,overlay,10,0
1pattern6,52,20,overlay,10,0
1pattern7,51,20,overlay,10,0

2interval,runonce
2pattern0,60,20,overlay
2pattern1,61,20,overlay
2pattern2,62,20,overlay
2pattern3,63,20,overlay
2pattern4,64,20,overlay
2pattern5,-1,20,overlay

3interval,always
3pattern0,0,15,move,0,-1
3pattern1,0,15,move,0,-2
3pattern2,0,15,move,0,-3
3pattern3,0,15,move,0,-3
3pattern4,0,15,move,0,-2
3pattern5,0,15,move,0,-1
3pattern6,0,15,move,0,0
3pattern7,0,15,move,0,1
3pattern8,0,15,move,0,2
3pattern9,0,15,move,0,3
3pattern10,0,15,move,0,3
3pattern11,0,15,move,0,2
3pattern12,0,15,move,0,1
3pattern13,0,15,move,0,0
The first number is the group ID of the animation. These animation groups are independent from each others, and generate unsynchronized animations with the different methods. In example above, ID0 is used for blinking eyes. ID1 is used for popping up the pictorial letter. ID2 is used for the animation when the surface change into the another surface. And ID3 is used for pitching of the surface.
  • interval
    The interval entry descripts the intervals of the initiation timings of those animation groups.
    • sometimes - sometimes (in extent of eye blinking)
    • rarely - animate at more long intervals
    • always - always animate whenever displaying those base surface
    • runonce - animate at once when the base surface changes into the another one
    • never - not initiate to animate automatically


  • pattern
    You can configure for your ghost's animation pattern frame by frame in practice, with using the "pattern" entry. The all methods defined by the SERIKO/1.2 specification have the following lists of arguments.
    ?pattern?,[surfaceid],[interval],[method],[offsetx],[offsety]
        
    The argument "surfaceid" is the ID number of surfaces using to display in these animation pattern.
    The argument "interval" is the frame rate of animation. The delay time is the value to multiply 10ms by given value of "interval". An aim of this value is about 5 in blinking eyes.
    The argument "method" is the drawing method of the animation pattern. You can configure the following three methods according to the SERIKO/1.2 spec.

  • overlay
    This method is the cell overlaying. The designated animation surface is overdrawn on the base surface, and as a result, if drawing aria may stick out from visible area, the region for the surface will move. You must be cautious with that the CPU load is affected by the drawing area is sticking out from visible area or not. If the region does not move, the increase of CPU load is ignorable, but the region once moves, the CPU load will increase from several times to 20 or 30 times.
    The color of the upper left origin point uses the transparent color. You must mask the area that you want to transparent, with the same color using at the upper left origin point.
    You can control the axis of the drawing region with "offsetx" and "offsety" parameters. If you omit these parameters, they are set to default value (0,0) for upper compatibility of SERIKO spec. But this manner is NOT recommended.
    You can direct to terminate the animation with "overlay" method to put -1 to the surface ID. If you want to use the loop-free animation, for example, the eye blinking, you must terminate this with using -1 for surface ID.

  • base
    This method is the animation of the whole body. The directed surface for animation redraws its whole body, and if the region is different, the region moves too. For this reason, the CPU load using base method is extremely high, and cannot compare with those using overlay methods. This CPU load is depending on window redrawing speed of another process existing backside of your ghost. This means that it is important what programs exists on backside of your ghost, and the program speed of the SAKURA.exe is irrelevant to these phenomena.
    You can configure only one "base" method to the one base surface.
    The concept of "termination" does not exist in "base" method, because of that base surface changes from itself. If you want to return the first surface, you must place that surface at last of your animation pattern.
    The "offsetx" and "offsety" parameter is ignored.

  • move
    This method is the moving whole body. Only coordinates of region is moved without changing surfaces. This movement can realize using the base method. But you must be cautious with that CPU load of using this method is extremely lower than that of using base method.
    The move method moves coordinates of region accordifng to the value of "offsetx" and "offsety" parameters. The values of these parameters are interpreted to the relative coordinate from the original position. For example above, the surface is swinging up and down slowly.
    In this method, the argument "surfaceid" parameter is ignored.
    The "move" method by-passes the basic motion of SAKURA.exe to keep the position of lower edge of the display field.

  • The limit of patterns
    One base surface can have maximum 32 animation patterns in the present specification. (less than 31 intervals)

return to specifications page

This page is based on phase 61.10 (2001/07/20)
This page was translated by:Hiro with SERIKO
Published by:Yoshiyuki.Sakakibara