Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Pages: 1 [2] 3  All

Author Topic: WME BOOK is online  (Read 58882 times)

0 Members and 3 Guests are viewing this topic.

Baron

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 37
    • View Profile
    • Portfolio
Re: WME BOOK is online
« Reply #15 on: February 29, 2008, 12:37:29 AM »

Hi Metamorphium,
                     I would like to contribute graphics and proof reading to the Wme programming book effort.
I'm a complete beginner so I would like to ask a few questions the parts that I have found a little hard to understand,
then I could add that information into the manuscript, with your permission of course.
Here is a graphic I made for the "keypad" example in the scripting chapter.
I'm really excited, the book is helping me a lot.
Please Pm me if you are interested.

http://www.flickr.com/photos/12448574@N02/2296383782/sizes/o/

Thanks,
David "Baron" McDermott
« Last Edit: February 29, 2008, 12:40:09 AM by Baron »
Logged

mylesblasonato

  • Developer
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 265
  • "Give up is to fail as sacrifice is to succeed"
    • View Profile
    • Royal Wins
Re: WME BOOK is online
« Reply #16 on: February 29, 2008, 02:37:31 AM »

Thanks Meta your a legend man this is awsome i also can't wait for the 2.5D section. Keep up the good work.

Cheers ::beer
Myles Blasonato
Logged
Lead Game Designer, Royal Wins.
@mylesblasonato
@royalwins
http://au.linkedin.com/pub/myles-blasonato/26/600/a38

mylesblasonato

  • Developer
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 265
  • "Give up is to fail as sacrifice is to succeed"
    • View Profile
    • Royal Wins
Re: WME BOOK is online
« Reply #17 on: February 29, 2008, 02:41:45 AM »

Forgot to ask how i edit a page or add a new one.

Cheers ::beer
Myles Blasonato
Logged
Lead Game Designer, Royal Wins.
@mylesblasonato
@royalwins
http://au.linkedin.com/pub/myles-blasonato/26/600/a38

Maxim

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 13
    • View Profile
    • emotionstyle.com
Re: WME BOOK is online
« Reply #18 on: March 01, 2008, 04:54:31 PM »

Mega respect for the book, Meta!!!
You're doing a great job! We won't forget it.
Logged
Let the Force be with you

alternati

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 1
    • View Profile
Re: WME BOOK is online
« Reply #19 on: July 20, 2008, 10:53:43 PM »

Hi, I'm starting to read the book. I think I found a small error in the last script (exit.script) in Chapter 3.

#include "scripts\base.inc"
 
on "ActorEntry"
{
   var door = Scene.GetNode("Door");
   Game.Interactive = false;
   global doorClicked;
   if (doorClicked)
   {
      actor.Talk("I don't want to return to my flat before I am sure I can't enter the warehouse!");
   }   
   else
   {
      Scene.DetachScript("scenes\warehouse\scr\bomb.script");
      actor.Talk("Phew. That was close");
      Game.ChangeScene("scenes\room\room.scene");
   }
   Game.Interactive = true;
}


Line in red must be: if (!doorClicked)

Am I right? Greetings !!!
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: WME BOOK is online
« Reply #20 on: July 21, 2008, 06:50:05 AM »

You're right. Thanks for the bug catch, it's repaired now.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

dotajames

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 3
    • View Profile
    • Day of the Aliens
Re: WME BOOK is online
« Reply #21 on: July 21, 2008, 05:33:19 PM »

This is excellent!  I was worried that there weren't enough examples/documentation for Wintermute but then I found this :)

Tiny errors I noticed in Chapter 2:

  • Quote
    file test1.script
      global a = 10;
      Game.Msg(a); //prints 10

    file test1.script
       global a = a + 1; 
       Game.Msg(a); //prints 11, because the variable is valid for the whole game.

    I'm pretty sure you meant the second one to say test2.script
  • There are two Syntax Rule no.4's and two no.5's
  • At the end of 2.5 Includes, there is a seemingly unrelated snippet of code

And also I had a couple of questions:

  • Quote
    BUG: Don’t use loops inside of the case branches. They don’t work. If you need, write a function (explained later) which will contain the loop. This workaround works.

    So that's a bug with the Wintermute engine?  What about using }else if{ instead of a switch, wouldn't that be quicker than writing a function?
  • Quote
    Never initialize your variables in the include files. They will get reinitialized with every inclusion of your script.

    Is it a good idea to put your global variables in an include file (e.g. "global myVar;") so that you can get/set the value without having to remembering to write global before it the first time you reference it in each script?

Thanks!
« Last Edit: July 21, 2008, 06:06:26 PM by dotajames »
Logged
Day of the Aliens - http://www.dotagame.com

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: WME BOOK is online
« Reply #22 on: July 21, 2008, 06:54:17 PM »

Thanks, fixed. Funny, nobody mentioned before the unrelated code (was from my original book).

Quote
So that's a bug with the Wintermute engine?  What about using }else if{ instead of a switch, wouldn't that be quicker than writing a function

It's a bug in wme engine. To If/Else imagine having 10 different states:

if (a=="blue")
{
  //do something
}
else
if (a="red")
{
  //do something
}
etc.. etc..

will always look worse than:

switch(a)
{
   case "red":
       // Do something
       break;
   case "blue":
       // Do something
       break;
  // etc...
}


But you can use both and sometimes you have to.

Quote
Is it a good idea to put your global variables in an include file (e.g. "global myVar;") so that you can get/set the value without having to remembering to write global before it the first time you reference it in each script?

I use it for variables I refer often to. For variables which need to be global but I use them only once or twice in the whole game (various game states) I use the normal inscript declaration.

The comment was to warn before having in base.inc for example:

global MyVariable = 0;

This would ALWAYS reset the variable to 0 every inclusion (so no chance to setting something reasonable).

Even worse is to have:

global MyObject = new Object("path to object"); which would create a new memory object everytime any script runs. This will very soon cause the game to eat all RAM and is sometimes a big problem of newcomer's games.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Haste!

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 1
  • Hst!
    • View Profile
Re: WME BOOK is online
« Reply #23 on: August 04, 2008, 02:51:34 PM »

Do anyone took an effort to translate it to russian? Theoreticaly, i can help
Logged
[white n0ize]

Maltese

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 5
    • View Profile
Re: WME BOOK is online
« Reply #24 on: August 28, 2008, 09:43:46 PM »

Just posting here to show my appreciation for the book, I've just started a project o wintermute and it's being a huge help. Keep up the good work ( please do !!!)  ;D


Logged

markpouncey

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 3
    • View Profile
Re: WME BOOK is online
« Reply #25 on: May 09, 2009, 12:22:55 AM »

Howdy,
  Looks like good work and I want to read it through. Is there a link to download this complete ??
                                                                            kind regards, markpouncey
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: WME BOOK is online
« Reply #26 on: May 09, 2009, 06:20:37 PM »

No, as far as I know, there's only the online version. You'd need to use some mass-downloader.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

aRno

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 1
    • View Profile
Re: WME BOOK is online
« Reply #27 on: October 06, 2009, 11:21:50 PM »

Consider yourself loved!
Metaphorically at least...
 ;D
Logged

rens

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 7
    • View Profile
Re: WME BOOK is online
« Reply #28 on: February 15, 2010, 10:35:12 AM »

Hi,

I would like to make a translation of the book in French. I know that it is a bit old, but as far as i know, the next WME's major release, is not for now, so i think it can worth it.

Quote
To translate any page, click the "es" button in the upper-right corner. Then create new page and you can start editing it (perhaps copy the source of the original page as a starting point).
To login, use the same username/password you're using for this forum. Be sure to check the "Remember me" check-box, so that you're not logged out while editing an article.

How can i create a new page ?

Thank you  :)

PS : I reassure you, my French is really better than my English  :D
« Last Edit: February 15, 2010, 10:46:10 AM by rens »
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: WME BOOK is online
« Reply #29 on: February 15, 2010, 10:53:21 AM »

I added French to the list of languages. If you are logged in, there should be a "Create page" button when you arrive to a non-existent page (such as when you click the "fr" link in the top-right corner).

Be sure to edit the new page, not the original english page. The language selector is somewhat buggy, and sometimes it displays your language ("fr" in your case) twice, also instead of the "en" link.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
Pages: 1 [2] 3  All
 

Page created in 0.019 seconds with 20 queries.