I've done a little work on the project and added another room:
The map is now over 5,000 bytes and the rendering engine is approaching 7,000 bytes. Unfortunately, I think I've nearly run out of available RAM; if I enlarge the buffers slightly I start getting strange rendering glitches. This could be caused by the stack overwriting some of the dynamically-allocated tables (or it could be another issue, I'm not sure) - until I've investigated this bug further I'm afraid I'm not going to release a demo. I could turn this into an application, of course, but quite a lot of the code uses self-modifying tricks to boost performance.
Performance is also extremely poor in this build. I suspect that it's due to the BSP tree being poorly balanced; each room is fairly well partitioned internally, but with each room comes a more lopsided tree. The result is that when you're inside a room and can't see any other room performance is relatively good, but if you can see more than one room at a time performance can slow to a crawl (2FPS in places).
I hope to add debugging features which will allow me to check where the bottlenecks are. In their simplest form these could simply add up the total number of BSP tree nodes, subsectors and walls that are handled each frame.
One feature I have added is better handling of moving sectors. This currently maintains a list of sectors which are currently moving, with a pointer to the variable to update, the velocity of the movement, the minimum value and the maximum value. When the camera moves from one sector to another an event is fired specifying which sector the user has moved from and which they have moved from. The game logic then uses this information to tell doors to open or shut and a platform to raise or lower. This feature is demonstrated in
this new animated screenshot. (Watching the screenshot makes me deeply jealous of TI-83+ Silver Edition owners).
One other feature which is not demonstrated (yet was quite a lot of work) is the ability to render more than one sprite in each convex sub-sector correctly. The convex sub-sectors are already sorted front-to-back by the BSP tree, so when rendering sprites these are drawn in the reverse order so sprites in the foreground occlude sprites in the background. To draw multiple sprites within each sub-sector correctly they need to be sorted from back-to-front, which I've done using a simple insertion sort. In addition, sprites are now assigned to sub-sectors using a linked list, which means that it will be possible to remove a sprite from one sub-sector and move it into another. This means that sprite objects will be able to be moved around the level, whereas they are currently static.