Video Game Design and Programming Concepts 124 Copyright Goodheart-Willcox Co., Inc. May not be reproduced or posted to a publicly accessible website. Animation Directions 15. Double-click the Platform 1 object to open it in the image editor. 16. Click the Clear button to start with a blank canvas. 17. Applying what you have learned, change the hotspot to the top-left corner. 18. Select a shade of green in the color palette that is close to the color of grass, and then use the Fill Tool to flood the entire canvas in that color. The sprite should look like a green square. 19. Click the Frames tab at the bottom of the image editor, right-click on Frame 1, and click Copy in the shortcut menu. 20. Locate the slider below the animation direction nodes. The slider controls the number of directions available for the animation set. Drag the slider to the far right to increase the number of direction nodes to 32, as shown in Figure 10-5. 21. Hover the cursor over each of the animation direction nodes to display the direction number for each node. Nodes are numbered starting with 0, which is the right-facing node. Numbers increase as you move from node to node in counterclockwise fashion. 22. Applying what you have learned, show only four animation direction nodes. 23. Click node 8 to select it. The arrow points to that node, and there are currently no sprites in the animation set. Notice that the node numbers are based on position, not how many nodes are displayed. 24. Right-click in the empty space in the Frames tab, and click Paste in the shortcut menu. A copy of the sprite from node 0 is added to the animation set for this direction. 25. Applying what you have learned, paste a copy of the sprite in the animation sets for nodes 16 and 24. Notice that all four nodes are now black. A black-filled node indicates there is content in that direction’s animation set. Editing Animation Frames The game will use the Platform 1 object as platforms on which the player character will walk. A hole needs to be created in each of the platforms for the player to fall through to reach the platform below. The four animation directions will be used to achieve this with a single object. 26. Select animation direction node 0. 27. Click the Rectangle Tool button, and select the Filled option. 28. Click the transparency swatch below the color palette (the checkerboard) to set the foreground to transparent. This will allow the tool to act as an eraser. 29. Move the cursor to (120, 0), click, drag to (255, 32), and release. This draws a transparent rectangle, effectively creating a hole in the object. Use the coordinate indicator to position the cursor. The Y coordinate does not need to be exact so long as you start above the segment and end below it, as shown in Figure 10-6. 30. Select animation direction node 8, and remove the segment from (0, 0) to (155, 32). Clear View Hot Spot Fill Tool Rectangle Tool Node 0 Slider controls the number of nodes displayed Goodheart-Willcox Publisher Figure 10-5. The number of available direction nodes can be changed. Node 0 is to the right, and nodes are numbered in counterclockwise fashion.
Previous Page Next Page