Differences

This shows you the differences between the selected revision and the current
version of the page.


wmebook:ch1_3 2008/01/10 11:22 wmebook:ch1_3 2008/01/10 11:27 current
Line 162: Line 162:
You can see 4 waypoints (red crosses) around the crates. It’s enough for actor to find her way around the whole scene. Just save and try it for yourself. You can see 4 waypoints (red crosses) around the crates. It’s enough for actor to find her way around the whole scene. Just save and try it for yourself.
-But there is still something rotten. It seems that the actor is sometimes not correctly covered with crates. Why’s that? Remember our hot spot discussion in the Sprite editor chapter? Well, that’s the cause! So let’s fix it. In the project manager add new sprite to the warehouse folder.+But there is still something rotten. It seems that the actor is sometimes not correctly covered with crates. Why’s that? Remember our hot spot discussion in the Sprite editor chapter? Well, that’s the cause! We're going to fix it right now.
-Insert one frame (crates.png) and move the hotspot to the bottom of the crates. This hotspot falls in some region (our block region) and we can easily set the scene sorting order. +In the project manager add new sprite to the warehouse folder. Insert one frame (crates.png) and move the hotspot to the bottom of the crates. This hotspot falls in some region (our block region) and we can easily set the scene sorting order.
{{wmebook:s16.jpg|}} {{wmebook:s16.jpg|}}
Line 170: Line 170:
Save your sprite and then in Scene Edit change the sprite entity from png file to sprite file. Save and test the scene. Finally it works. That was quite some work, wasn’t it? Save your sprite and then in Scene Edit change the sprite entity from png file to sprite file. Save and test the scene. Finally it works. That was quite some work, wasn’t it?
-But I promised to show you a shortcut, didn’t I? The shortcut is called a free entity and it’s useful for smaller scene objects, so the crates are serious contender for that.+But I promised to show you a shortcut, didn’t I? The shortcut is called a free entity and it’s useful for smaller scene objects, so the crates are serious contenders for that.
-But what are the **free entities**? They are entities which (in the similar way to your actor) are being drawn depending on where in the scene they are placed (in other words, in which region is positioned their hotspot). +But what are the **free entities**? They are entities which (in the similar way to your actor) are being drawn in respect to their position in the scene (in other words, in which region is positioned their hotspot).
Let’s try it. First select the “Behind” region and delete it (red X), then delete “Crates” sprite entity (red X). Resize the floor region so it covers the whole ground. Now switch to the layer called **“Free entities”** and create a sprite entity in the way you’re already used to. Name it crates and use the sprite file we’ve created earlier. Position it to the correct place, save your scene and test the game. See? It works in exactly the same way as before. Let’s try it. First select the “Behind” region and delete it (red X), then delete “Crates” sprite entity (red X). Resize the floor region so it covers the whole ground. Now switch to the layer called **“Free entities”** and create a sprite entity in the way you’re already used to. Name it crates and use the sprite file we’ve created earlier. Position it to the correct place, save your scene and test the game. See? It works in exactly the same way as before.
Line 198: Line 198:
On the layer bar you can also see two green lines. One is horizontal and one vertical. **The horizontal green line is for defining scale**. Your scene already contains two of those scale lines. In the real world you see something which is called perspective which is the reason why people far away appears to be smaller than they really are. In WME when using 2d actors we have to simulate how much gets the actor smaller when she walks to the camera or away from the camera. Setting scale lines is pretty simple. Either right click on existing scale line to adjust its properties or remove it altogether or simply drag is around to adjust y position. Let’s try some down-the-rabbit-hole effect. Select the scale line which reads 70%, set its properties and set the scale to 20. Then drag this scale line so it goes through the middle of the crates. Create a new scale line which goes through the light above the warehouse door. Set its value to 5. Now save your game and test it. Neat, eh? On the layer bar you can also see two green lines. One is horizontal and one vertical. **The horizontal green line is for defining scale**. Your scene already contains two of those scale lines. In the real world you see something which is called perspective which is the reason why people far away appears to be smaller than they really are. In WME when using 2d actors we have to simulate how much gets the actor smaller when she walks to the camera or away from the camera. Setting scale lines is pretty simple. Either right click on existing scale line to adjust its properties or remove it altogether or simply drag is around to adjust y position. Let’s try some down-the-rabbit-hole effect. Select the scale line which reads 70%, set its properties and set the scale to 20. Then drag this scale line so it goes through the middle of the crates. Create a new scale line which goes through the light above the warehouse door. Set its value to 5. Now save your game and test it. Neat, eh?
-The **vertical green line** is for defining rotation. This may be useful for someone as it can emulate the infamous fish eye camera effect but I don’t think I’d ever use it and it’s up to your experiments to play with it. Only note, that if you’re going to use this feature, you have to set the “Rotatable” attribute for your actor. We’ll get to it later.+The **vertical green line** is for defining rotation. This may be useful for someone as it can emulate the infamous fish eye camera effect but I don’t think I’d ever use it and it’s up to your experiments to play with it. Only note, that if you’re going to use this feature, you have to set the “Rotatable” attribute for your actor. We’ll get to it in the actor's chapter.
The last issue covered in this chapter is **“Properties”** tab located on the layer. The last issue covered in this chapter is **“Properties”** tab located on the layer.
Line 204: Line 204:
{{wmebook:s20.jpg|}} {{wmebook:s20.jpg|}}
-Here you can look at the scripts which are attached to the scene (by the default template you’ll find there always scene_init.script and scene.script. You can set some custom attributes for the scene, you can set if the Scene in the game remembers changes to the nodes (typically you want for example to hide some sprite entity and if you reenter the scene you want that it’s still hidden). You can pick colors for depicting scene elements in the editor, set the margins and finally set up what elements should be visible in the editor.+Here you can look at the scripts which are attached to the scene (by the default template you’ll find there always scene_init.script and scene.script). You can set some custom attributes for the scene, you can set if the Scene in the game remembers changes to the nodes (typically you want for example to hide some sprite entity and if you reenter the scene you want it still hidden). You can pick colors for depicting scene elements in the editor, set the margins and finally set up what elements should be visible in the editor.
On closing of the scene editor chapter I want to stress that I on purpose didn’t touch the 3D options. We’ll get to them much later when you’ll have the basics of the wme game covered. I know that some of you may be impatient to start your great 2 1/2 D games, but trust me, everything will be much faster if you went through the basics without skipping to much more complicated tasks. On closing of the scene editor chapter I want to stress that I on purpose didn’t touch the 3D options. We’ll get to them much later when you’ll have the basics of the wme game covered. I know that some of you may be impatient to start your great 2 1/2 D games, but trust me, everything will be much faster if you went through the basics without skipping to much more complicated tasks.
 
wmebook/ch1_3.1199960520.txt.gz · Last modified: 2008/01/10 11:22 by metamorphium
Recent changes RSS feed Creative Commons License Driven by DokuWiki