Apple ][ Graphic Adventure Part IV
Previously I discussed the overall structure of my soon-to-be hit adventure game. Well, last night was a milestone. I managed to write an Applesoft program so epic that it overwrote the high-resolution graphics page. Compared to other programs I have seen, mine isn’t that huge. Around 250 lines isn’t that huge, right? Transylvania clocks in at 464 lines.
I think the issue is the number of arrays that I am defining. For now I think I have a fix. I have set LOMEM: 24576
at the top of my program. Supposedly, this will force the interpreter to define variables in a memory location after the hi-res pages. We shall see.
In any event, the game is back and running again. And the text screen now has some text formatting enhancements:
One of the cooler things I have implemented is this text screen. If at any prompt you hit RETURN you turn off the hi-res graphics and can see this text screen. Here will be some valuable game info included the location’s name, exits and any TAKE-able objects. The code for this is rather simple:
58 IF GM = 1 THEN GM = 0 : TEXT : RETURN
59 GM = 1 : CALL -3100 : RETURN
GM is a flag which tracks where you are in graphics mode (1) or text mode (0). CALL -3100
triggers the hi-res graphics screen without erasing its contents. So exciting, right!?!