Author Topic: KQI: weird, weird, weird  (Read 6157 times)

0 Members and 1 Guest are viewing this topic.

Offline Jelle

KQI: weird, weird, weird
« on: October 14, 2002, 03:04:27 PM »
They sure did some weird things in King's Quest I...
I mean v88 = 0; and than v10=v88; why did they do that???

King's Quest I:
Code: [Select]
if ((said("fastest") ||
    controller(menu_fastestspeed))) {
  v88 = 0;
  v10 = v88;
}
if ((said("fast") ||
    controller(menu_fastspeed))) {
  v88 = 1;
  v10 = v88;
}
if ((said("normal") ||
    controller(menu_normalspeed))) {
  v88 = 2;
  v10 = v88;
}
if ((said("slow") ||
    controller(menu_slowspeed))) {
  v88 = 4;
  v10 = v88;
}


Seems like they noticed that in KQII. Still I don't get it.

King's Quest ][:
Code: [Select]
if ((said("fastest") ||
    controller(menu_fastestspeed))) {
  v10 = 0;
}
if ((said("fast") ||
    controller(menu_fastspeed))) {
  v10 = 1;
}
if ((said("normal") ||
    controller(menu_normalspeed))) {
  v10 = 2;
}
if ((said("slow") ||
    controller(menu_slowspeed))) {
  v10 = 4;
}


Politics is supposed to be the second-oldest profession. I have come to realize that it bears a very close resemblance to the first.

Offline robingravel

Re:KQI: weird, weird, weird
« Reply #1 on: October 14, 2002, 03:19:54 PM »
They sure did some weird things in King's Quest I...
I mean v88 = 0; and than v10=v88; why did they do that???

King's Quest I:
Code: [Select]
if ((said("fastest") ||
    controller(menu_fastestspeed))) {
  v88 = 0;
  v10 = v88;
}
if ((said("fast") ||
    controller(menu_fastspeed))) {
  v88 = 1;
  v10 = v88;
}
if ((said("normal") ||
    controller(menu_normalspeed))) {
  v88 = 2;
  v10 = v88;
}
if ((said("slow") ||
    controller(menu_slowspeed))) {
  v88 = 4;
  v10 = v88;
}


Seems like they noticed that in KQII. Still I don't get it.

King's Quest ][:
Code: [Select]
if ((said("fastest") ||
    controller(menu_fastestspeed))) {
  v10 = 0;
}
if ((said("fast") ||
    controller(menu_fastspeed))) {
  v10 = 1;
}
if ((said("normal") ||
    controller(menu_normalspeed))) {
  v10 = 2;
}
if ((said("slow") ||
    controller(menu_slowspeed))) {
  v10 = 4;
}

Everything's right in the codes.

v10 is used to set up the speed of the game.

v10 = 0 is set to the fastest the game
v10 = 4 is set to slow the game

You can set v10 to 14 but the game is so slow it may
make the game unplayable.

Don't forget King's Quest 1 is the very first agi game Sierra has made like me with Naturette 1.

Please don't bother with the olders games you'll may
find. it's normal to make mistakes when working an interpreter or a first game.

Robin Gravel

Offline Jelle

Re:KQI: weird, weird, weird
« Reply #2 on: October 14, 2002, 03:44:20 PM »
Quote
Everything's right in the codes.

v10 is used to set up the speed of the game.

v10 = 0 is set to the fastest the game
v10 = 4 is set to slow the game

You can set v10 to 14 but the game is so slow it may
make the game unplayable.

Yes, I know all that. But why first put a number into v88 and than in the next line put v88 into v10. Why not immediately put a number into v10 (like in KQ2 and others). Every programmer would know that, even if it's the first game...
Politics is supposed to be the second-oldest profession. I have come to realize that it bears a very close resemblance to the first.

Offline HWM

Re:KQI: weird, weird, weird
« Reply #3 on: October 14, 2002, 04:01:03 PM »
The first version of King's Quest (not the one you're currently talking about) was made in AGI0... So this version (in AGI2) had to be converted to work with AGI2... So maybe it happend in this process?

Another option is, that they preferred to not directly set the *system*variables... Or maybe it just had to be done that way in AGI0...

BTW: My copy of KQ only has 3 speed options, slow, normal & fast... (fast being the usual 'fastest' setting)... So the whole game is quite unusual in many ways...

Offline Nick Sonneveld

Re:KQI: weird, weird, weird
« Reply #4 on: October 14, 2002, 10:00:50 PM »
Well if I was a programmer and I knew I had to tweak numbers later on, I'd make it so I would have to change the least amount of numbers.

What if you had to set 5 variables to the same number?

v88 = 5;
v10 = v88;
v30 = v88;
v40 = v88;
v60 = v88;

If I decide that I actually wanted 6.. I only have to change one line.  It would be even easier and more obvious with #define's but perhaps they didn't have them.

do you know v88 wasn't used somewhere else in the game?  (perhaps it stood for the original speed.. so if they had to speed up the game for a section, they could move it back)

- Nick
Nick Sonneveld  |  AGI Dev  |  NAGI

Offline Jelle

Re:KQI: weird, weird, weird
« Reply #5 on: October 15, 2002, 03:32:33 AM »
Quote
BTW: My copy of KQ only has 3 speed options, slow, normal & fast... (fast being the usual 'fastest' setting)... So the whole game is quite unusual in many ways...

I forgot, I changed that myself, because normal was too slow, and the "original fast" was too fast! :)

Quote
do you know v88 wasn't used somewhere else in the game?  (perhaps it stood for the original speed.. so if they had to speed up the game for a section, they could move it back)

You're right I guess... As usual  :)
Politics is supposed to be the second-oldest profession. I have come to realize that it bears a very close resemblance to the first.

Offline Nick Sonneveld

Re:KQI: weird, weird, weird
« Reply #6 on: October 15, 2002, 04:26:48 AM »
You're right I guess... As usual  :)

look closer.. I've said my share of dumb things, don't you worry. :)

- Nick

PS.. not that I'm suggesting what you said was dumb.. just that I'm not always right.
Nick Sonneveld  |  AGI Dev  |  NAGI

Offline Jelle

Re:KQI: weird, weird, weird
« Reply #7 on: October 23, 2002, 07:53:34 AM »
Quote
do you know v88 wasn't used somewhere else in the game?  (perhaps it stood for the original speed.. so if they had to speed up the game for a section, they could move it back)

I checked it. v88 is used only in logic 0 and always with v10, like this:
v88 = blabla;
v10 = v88;

I don't get it... ???
Politics is supposed to be the second-oldest profession. I have come to realize that it bears a very close resemblance to the first.

Offline Nick Sonneveld

Re:KQI: weird, weird, weird
« Reply #8 on: October 23, 2002, 08:54:20 AM »
1) they removed the logic later..  or it was for debugging purposes
2) poor compiler.  It probably put the variables in a temporary before assigning.  That's the best I can suggest.

- Nick
Nick Sonneveld  |  AGI Dev  |  NAGI

Offline Jelle

Re:KQI: weird, weird, weird
« Reply #9 on: October 23, 2002, 01:16:25 PM »
I found this piece of code in logic.000 in KQI...

Code: [Select]
Label2:
  *v45 = 0;
  v45++;
  if (v45 < 45) {
    goto(Label2);
  }
  set.string(prompt_char,">");
  set.cursor.char("_");
}

What does the * in *v45 do? Is it some kind of pointer?
Politics is supposed to be the second-oldest profession. I have come to realize that it bears a very close resemblance to the first.

Offline Chris Cromer

Re:KQI: weird, weird, weird
« Reply #10 on: October 23, 2002, 01:31:45 PM »
Hmmm I am quite curious as well, I havn't seen that before.
Chris Cromer

It's all fun and games until someone get's hurt then it's just fun. ;)

Offline Joel

Re:KQI: weird, weird, weird
« Reply #11 on: October 23, 2002, 02:04:33 PM »
Yes, it is sort of a pointer. It's listed in the AGI Studio Help File. Look up lindirectn in the logic help section.

Joey

  • Guest
Re:KQI: weird, weird, weird
« Reply #12 on: October 23, 2002, 02:08:42 PM »
what is AGI0?

Offline HWM

Re:KQI: weird, weird, weird
« Reply #13 on: October 23, 2002, 02:38:22 PM »
what is AGI0?

It's the first version of the AGI interpreter, only game that used it is King's Quest 1... Prolly not the King's Quest 1 you know, but it's pretty much the same (visually) actually, apart from the fact it was a booter (and came in three seperate versions; IBM, PCjr and TANDY)... After that came AGI1, which didn't differ that much from AGI0, one change however was that it worked on all pc-compatibles (atleast, I guess)... Then came AGI2/AGI3, the interpreters most people know... BTW: AGI0 & AGI1 are so called booters, meaning they use their own file system and could only be played when booting from the disk (hence the name)...

But that whole AGI0 story I said in that previous posting was pretty far-fetched... I couldn't make up a more sensible reason, I guess...
« Last Edit: October 23, 2002, 02:41:48 PM by HWM »

Joey

  • Guest
Re:KQI: weird, weird, weird
« Reply #14 on: October 23, 2002, 02:57:06 PM »
oh ok. thanks HMW.


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.026 seconds with 15 queries.