<snip />--- "Randy W. Sims" <[EMAIL PROTECTED]> wrote:
Amir Karger wrote:
* Games::Zmachine - well, Z-machine isn't technically just for games. I say "technically" because the most "useful" Z-machine program I've seen is a Befunge interpreter. But this module is really doing more munging than gaming.
This is the namespace I'd expect to find it in, but since I'm not clear on the "translating" part, I don't know if that should be the complete name.
Let me explain. No, there's too much. Let me sum up.
This is not an interpreter, where you run "foo zork1.z3" and get to play Zork. Games::Rezrov does that. What my program does is take Z-machine commands like (in a simplified Z assembly language):
1220 add 3 top_of_stack -> local1 1225 jg local1 global1a ?branch 1230 call sub_foo local1 2 .branch 1235 print_paddr 2a3b
and translates them to:
L1220: $local[1] = 3 + pop @stack; L1225: goto L1250 if $local[1] > global_var(26); L1230: z_call(1476, $local[1], 2); # print " You are likely to be eaten by a grue." # (I don't put a literal print in there because the text # at that address can change (within limits)!) L1250: output_text(decode_text(2a3b));
This is why I was not so inclined to make this a Games:: module. As I
mentioned in the original post, there have been some non-games written
in Z-code. But I think a more compelling reason is that this module is
parsing and translating. To me, those are more Language-y than Game-y
things.
On the other hand, I guess you can make the argument that the end result is a playable game. And people aren't really coding in Z-code for anything but fun at this point.
Okay, I think I understand a little better now. This isn't really a Zmachine. This module deals with Zcode, transling it. So, I think I would use Zcode in preference to Zmachine in the name. I'm about 50/50 on the names Games::Zcode vs. Language::Zcode. They both make sense from a certain perspective: I would be more likely to look for it in Games::*, but it seems to fit more with the other modules in Language::*.
Regards, Randy.
