[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Montezuma's revenge programming technique
On Mon, 30 Dec 2002, Nicola wrote:
> Date: Mon, 30 Dec 2002 12:54:04 GMT
> From: Nicola <anaddress@from.somewhere>
> Newsgroups: comp.sys.apple2, comp.sys.apple2.programmer
> Subject: Montezuma's revenge programming technique
>
> Just a curiosity, if some of you can help...
> Years ago, I used to play with Montezuma's revenge. I was surprised
> how fast it was when loading and even more about the fact that it didn't
> use the disk any longer after startup (or, maybe, only when passing to
> next level, I don't remember). My astonishment was sharpened by the huge
> amount of rooms you had to explore (I never reached the end of the game,
> if any!) and by the unique complexity of each room.
>
> In short, does anybody know about the programming techniques used by
> that game? (I know that it didn't load DOS 3.3 or ProDOS, of course, but
> nothing beyond that).
>
> Thank you in advance.
> Nicola
>
Hello,
first of all, no, I do not know how "Montezuma's revenge" works. I'd just like
to point out a common method of generating huge data by using random seed
generators. You have proprobably heard of the game "Elite". Here, the
programmers used that technique to create lots of galaxies together with
stars and their specific data without storing the actual data, but
generating it in realtime (when asked for it) by using random numbers. The
difficulty then lies in the way how to do it, because for example dead ends
or unreachable locations within a randomly created landscape have to be
avoided.
BTW.: In case you've got an emulator and know about the 6502, you may also
want to take a look into the (running) object code. Reengineering algorithms
is not that difficult anymore as it used to be. ;-)
Another BTW.: The fastest disk loading algorithm that can be found with
computers like the AppleII is a combination of the ProDOS loader (decode
read bytes while loading) and the
"read-sector-and-see-whether-it's-part-of-the-file-then-just-load-it"
technique as found with e.g. "Sherwood Forest".
Kind regards
Holger
P.S.: For pseudo random numbers see
"http://www.frontier.co.uk/games/elite/faq.html" under topic 13:
"13. How come there are eight galaxies with thousands of planets in only 22K
of memory?"
P.P.S.: I have just taken a look at my version of "Montezuma's Revenge". It
has a file size of only 131 sectors, which is not really that much and can
be loaded quickly even with plain DOS 3.3. Just for comparison: Repton: 145,
Hard Hat MacK: 166. The loader, however, uses a modified DOS 3.3 version
with a patch in the normally unused area of $b6b3 - $b6fc and probably
somewhere else. This speeds up the loading process by bypassing the standard
loading routine which copies one byte after the other to the target memory
instead of loading the requested sector directly into it.