I keep on studying ZIL. It is being an enlightment process as it requires a totally different approach from my stone-carved table orientation learnt with other engines. And the somewhat unsemantic and cryptic nature of some language specifics (function names and routines, the old school programmer lingo…) is adding up to the difficulty. But.
I endure with the design of my little game and I’ve learnt to appreciate how the old programmers exceled in creating incredible games with assembler, machine code and just a handful of bytes in the old retro machines. I’ve reviewed many other and more modern (text adv) engines but it all ends up in coming back to ZIL since can’t find how to implement certain features thet, while simple enough, are beyond their capabilities (or mine, most probably).
In my game, the player does not move but merely gives commands to 7 npcs to move throughout the map. To do so, npcs must be able to know how locations are connected, as the player’s command “goto laboratory” must result in the npc moving from room to room, one movement per turn, as things happen when e.g. two npcs convene in a same room. I’ve considered the option of creating a matrix/grid array of 64x64 (columns and lines are the list of rooms) and storing in each pair of coordinates the list of movements from the room x to room y. This approach is nice on paper but takes 4.096 room pairs and too much memory, I guess.
I’m turning to simple maths instead and considering a different approach, using a numeric attribute “room-index-code”. Lower level rooms have a 1000 based vlue, level 2 a 2000, etc. Now, if an npc must move east, the code simply adds +1 to the room number and describe. To the west, -1. To the nort, +10. To the south, -10. Up, +1000. Down, -1000. With room index codes, npcs need not be intelligent or store info, as the system takes care using maths. An inmense grid array is not necessary anymore and implementation is easier.
Question: can ZIL variables hold values larger than 256? I’ve tested this approach with other 8biters but, for 110 rooms, numeric intervals are very limited and a handful of rooms must be left out of the routine for the lack of remaining intervals.
Thanks in advance, ideas welcome!