Differences

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


wmebook:ch3 2007/12/06 12:31 wmebook:ch3 2008/07/21 07:49 current
Line 1: Line 1:
====== 3. First tour into the real WME realm ====== ====== 3. First tour into the real WME realm ======
-So we now about the tools and we learned the basics of scripting and it’s the time to see how this knowledge applies to the game development. Before we start this tour let’s first make a brief overview of the file types you’ll be using in wme (and I strongly recommend using this naming convention):+We've found out about the tools and we've learned the basics of scripting and it’s the time to see how this knowledge applies to the game development. Before we start this tour, let’s first make a brief overview of the file types you’ll be using in WME (and I strongly recommend using this naming convention):
***.script** – are the files which contains the actual program ***.script** – are the files which contains the actual program
Line 58: Line 58:
Now this may look to you as an overkill script for something as similar as checking if we were in some scene or not but trust me, there’s more to it than meets the eye. This is actually very clever script which counts with many different possibilities. It counts with the game which was newly started, it counts with a scene revisiting, it counts with the fact that you can have on enter special events. Remember those cinematic moments when you played an adventure, walked in some room only to see the bridge collapsing? You wouldn’t want to see it collapse every time you visit that scene. Once is enough for sure. Now this may look to you as an overkill script for something as similar as checking if we were in some scene or not but trust me, there’s more to it than meets the eye. This is actually very clever script which counts with many different possibilities. It counts with the game which was newly started, it counts with a scene revisiting, it counts with the fact that you can have on enter special events. Remember those cinematic moments when you played an adventure, walked in some room only to see the bridge collapsing? You wouldn’t want to see it collapse every time you visit that scene. Once is enough for sure.
-So now when we uncovered what’s going on in this script, it’s actually very simple. As there are thousands of different methods, I’ve decided to choose the non violent way how to present them when needed.+So now when we uncovered what’s going on in this script, it’s actually very simple. As there are thousands of different methods, I’ve decided to choose the non violent way how to present them when needed, although Max was very unhappy with me last time, I've consulted nonviolent approaches.
Let’s look at one example from the beginning of the script. Let’s look at one example from the beginning of the script.
Line 161: Line 161:
</code> </code>
-As we see we’ve scratched surface of two objects so far. Actor object and Region Entity object, which we referenced by keyword **this** and hid it through setting its attribute Active to false.+We’ve scratched surface of two objects so far. Actor object and Region Entity object, which we referenced by keyword **this** and hid it through setting its attribute **Active** to false.
Let me return back to the image we’ve seen at the beginning and look at this very image from a developers point of view. Let me return back to the image we’ve seen at the beginning and look at this very image from a developers point of view.
Line 278: Line 278:
</code> </code>
-This, although meaningless, daemon is correct, because it hands over the control from the script. One millisecond is here only pro forma. The important fact is that you DO hand over the control.+This daemon is correct (remember our previous chapter), because it hands over the control from the script. One millisecond is here only formally. The important fact is that you DO hand over the control.
So enough theory and let’s make some daemon fun with the commands, we’ve just learned. Oh wait. We’d need one more command: So enough theory and let’s make some daemon fun with the commands, we’ve just learned. Oh wait. We’d need one more command:
Line 401: Line 401:
Game.Interactive = false; Game.Interactive = false;
global doorClicked; global doorClicked;
- if (doorClicked)+ if (!doorClicked)
{ {
actor.Talk("I don't want to return to my flat before I am sure I can't enter the warehouse!"); actor.Talk("I don't want to return to my flat before I am sure I can't enter the warehouse!");
Line 416: Line 416:
We’ve seen in this chapter some neat tricks with the way how we can handle the game logic. We’ve also learned some of the important concepts for the tying scene to the code and we are able to use a couple of very basic commands and object methods. But for now we all the time used a lot of prebuilt demo code. Next chapter is all about starting the project from scratch. We’ll build upon this blank project until we create a little feature packed game. So stay tuned, we’re getting into it. We’ve seen in this chapter some neat tricks with the way how we can handle the game logic. We’ve also learned some of the important concepts for the tying scene to the code and we are able to use a couple of very basic commands and object methods. But for now we all the time used a lot of prebuilt demo code. Next chapter is all about starting the project from scratch. We’ll build upon this blank project until we create a little feature packed game. So stay tuned, we’re getting into it.
- 
- 
- 
- 
- 
- 
 
wmebook/ch3.1196940662.txt.gz · Last modified: 2007/12/06 12:31 by metamorphium
Recent changes RSS feed Creative Commons License Driven by DokuWiki