home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / pascal / rehack / text / walk.txt < prev    next >
Encoding:
Text File  |  1991-11-13  |  4.3 KB  |  83 lines

  1. I have been working on the walking character animations for
  2. Rehack, and have run into some difficulties using the 21x21 tile
  3. size.  As I understand it, the goal is to use three frames for
  4. the animation, each spaced 7 pixels beyond the previous one.
  5. Actually, if you don't count the frames that directly overlay the
  6. beginning or ending tile, there are only two unique frames, and
  7. this creates problems, as illustrated in the accompanying PCX
  8. files.
  9.  
  10. The file HERO.PCX contains a 21x21 icon of a human-size
  11. character, facing north.  I felt it necessary to size the
  12. character small enough to leave a border, so that it would have
  13. room to swing its sword, brandish its shield, carry items, or
  14. even just walk without intruding onto other tiles.  As a result,
  15. it appears that it will have to take two steps to get from one
  16. tile to the next.  This is difficult to animate properly on a
  17. 21x21 tile, as the file WALKING.PCX shows.  (For clarity, the
  18. diagrams in WALKING.PCX have been created at twice the normal
  19. scale, and only the character's feet (in red) and torso (in
  20. green) are shown.  I have also positioned the torsos in a direct
  21. top-down view, rather than perspective, to help illustrate my
  22. points).
  23.  
  24. The upper half of WALKING.PCX shows a 21x21 walking animation
  25. schematically.  Referring to the diagram, Tile 1 is the character
  26. facing south, before moving; Tile 2 is where he wants to end up.
  27. Frame 1 is then his initial position on top of Tile 1, Frame 2
  28. will be located 7 pixels lower than Frame 1, Frame 3 will be
  29. located another 7 pixels lower, and Frame 4 will lie on top of
  30. Tile 2.  Of course, if this were the player character, the
  31. background would be moving, rather than the character frame, but
  32. the animation frames would still look the same.
  33.  
  34. I'm guessing that the foot movement will look jerky unless you
  35. only move one foot at a time, and so I have positioned the feet
  36. according to that rule.  If you were to alter the positions of
  37. both feet simultaneously, I believe it would make the character
  38. look like it is running or jumping.  I'm also guessing that the
  39. body movement will look jerky unless you space the torsos evenly
  40. between frames, and so I have positioned the torsos according to
  41. that rule.  In the case of the player character, if you don't
  42. keep the torso in a constant position in its frame, it will move
  43. relative to the screen, which will be visually confusing.  As you
  44. can see, the torso positions don't match the feet positions.
  45. Some of this may be obscured when the torsos are put in their
  46. proper perspectives, but I still think it's going to look silly.
  47.  
  48. It's true that we could do uneven pixel intervals, like 5, 5, 5,
  49. and 6, but that will create problems when you have the player
  50. character walking in a different direction than a monster or NPC
  51. that is also within the viewing window.  This would also create
  52. problems with any sort of "moving camera" animation, such as a
  53. fireball spell, that is moving in a different direction than an
  54. on screen character.
  55.  
  56. I think a better solution would be to adopt a different tile
  57. size, like 20x20.  The bottom half of WALKING.PCX shows how a
  58. 20x20 animation would look.  There are now a total of five frames
  59. in the sequence (three unique), which splits the motion up into
  60. logical, even intervals, and allows the leg positions to look
  61. natural, with no jumpiness.  It may even be possible to make
  62. frames 1, 3, and 5 identical, although frame 3 really should have
  63. one leg slightly bent and one foot off of the ground.
  64.  
  65. There are other advantages to the 20x20 tile size.  It would give
  66. us more flexibility in animation speed and detail, by giving us
  67. more integral divisors than 21x21.  For example, we could have
  68. walking characters move 5 pixels to a frame charging characters
  69. move 10 pixels to a frame, and sneaking characters move 4 or even
  70. 2 pixels to a frame.  We could also easily zoom out by a factor
  71. of 2, 4, 5 or even 10 for the automap view, simply by skipping
  72. pixels.
  73.  
  74. To summarize, I recommend adopting a 20x20 tile size for Rehack.
  75. It is my impression that there really isn't that much work to
  76. redo, just the basic dungeon tile set really.  The next most
  77. reasonable alternative would be 24x24, but this would force a
  78. radical screen redesign, and is really out of scale compared to
  79. other games.
  80.  
  81. Hal Raymond
  82. November 13, 1991
  83.