WinGlulxe textgrids - they're not monospaced?

I’ve figure out why it prints wrongly on the first turn. Nothing to do with the interpreters, it’s the interaction between the automap and your code. In “To textmapitup”, at one point, you have

reserve automap memory of 29 rows by 31 columns;

This sets the size of the automap grid, but it does it too late. You’ve got to think about the order in which things happen. Each turn, the automap updates its internal state, then your code gets to run. So the very first turn, the automap runs before any of your code, so it generates its data based on its default size, which your code then reads. Your code always sets the automap grid size, but does nothing to make the automap rerun.

To very crudely fix it, I just changed the “play begins” rule in the game code to set the automap grid size:

When play begins: reserve automap memory of 29 rows by 31 columns; now current zoom is map zoomed in.
Really you could do with cleaning the logic of all that code up, but that’s up to you :slight_smile:

Thanks. It’s not all as bad as that, is it?? I don’t think I ever fully understood how the main automap code worked (as I say, I never understood how the reservation part worked) and probably stopped looking once I got over the hurdle with one redraw. But by now I’ve been staring at some of these things too long. I needed new eyes. I’ll go look at it with what you said in mind.

And now to make my next problem topic :slight_smile:

-Wade

If it works, that’s probably good enough :slight_smile: