April 30, 2021 Update

This commit is contained in:
StewBC 2021-04-30 18:12:38 -07:00
parent b65242cb0c
commit 2cf027fc1c

View File

@ -1,6 +1,13 @@
# Manic Miner
Remake of the ZX Spectrum game for the Apple II.
Updates:
i. 30 April 2021 - I Sped up rendering for a more even experience, especially
in The Vat and The Warehouse. The Apple II vesrsion is marginally slower than
the ZX Spectrum version (I think - tested with Speccy) but feels pretty good.
To make room for the fully unrolled level rendering, I sacrificed the lower
case letters in the font. I updated the table of timings, below.
1. INTRODUCTION
This is a game I have always loved, from the moment I saw it in a computer shop
@ -88,35 +95,46 @@ as much as is possible given the limitations.
4. TECHNICAL DETAILS
The game is written in 6502 assembly language using the ca65 assembler. The
game uses memory from $0800 to $B52C.
game uses memory from $0800 to $BE4B.
Below is a CPU cycle profile of 1 game frame in stage 1 after a couple of
seconds of being on the level. The door isn't visible so this renders only the
one enemy and Willy, as well as the level tiles. The auidoPlayNote includes an
artificial delay that's based on the number of tiles rendered. If I didn't have
that, the really empty levels such as SkyLab would play the in-game music way
too fast. However, this does mean that the game experience is smoother with the
music turned off, since there's no artificial delay.
one enemy and Willy, as well as the level tiles. gameDelay is an artificial
delay based on how many tiles were rendered, which smooths out the gameplay,
and thus song tempo across levels. If the music is turned off, audioPlayNote
will also create an artificial delay to simulate the delay incurred by
toggling the speaker.
Hex | Dec | Frame % | Item
--- | --- | --- | ---
19C3E | 105534 | 100% | Total Frame
Cycle counts are not constant across all frames so all timings below are
approximate.
Hex | Dec | Frame % | Item
--- | --- | --- | ---
1267f | 75391 | 100% | Total Frame
18 | 24 | 0% | inputGet
E8 | 232 | 0% | willyMove
80 | 128 | 0% | gameAI
5EF3 | 24307 | 23% | screenClear
5EF3 | 24307 | 32% | screenClear
123 | 291 | 0% | tilesAnimateKeys
47 | 71 | 0% | tilesAnimateConveyor
6EB | 1771 | 2% | screenDrawSprites
C55 | 3157 | 3% | screenDrawWilly
C6FD | 50941 | 48% | screenDrawLevel
DDA | 3546 | 3% | uiUpdate
3A | 58 | 0% | screenDrawSprite (door)
26 | 38 | 0% | screenSwap
51BD | 20925 | 20% | audioPlayNote
a07 | 2567 | 3% | screenDrawWilly (For collisions)
71d7 | 29143 | 39% | screenDrawLevel
8d1 | 2257 | 3% | screenDrawWilly (For display, over level)
3A | 58 | 0% | uiUpdate
3a | 58 | 0% | screenDrawSprite (door)
28 | 40 | 0% | screenSwap
1d1f | 7455 | 10% | audioPlayNote
1f76 | 8054 | 11% | gameDelay (sparse vs abundant level draw equalizer)
As can be seen, clearing the area where the world will be drawn takes almost 24%
of the frame and drawing the level tiles takes about 50% of the frame!
As can be seen, clearing the area where the world will be drawn takes almost
32% of the frame and drawing the level tiles takes about 39%, plus 3% to
re-render willy, of the total frame. Drawing is almost 80% of the frame.
The ZX Spectrum version had Willy under the level tiles, but I prefer Willy
in front, so I re-render willy without collision detection once the level tiles
have been drawn, so he is always in front (but before the door is drawn so he is
behind the door).
5. KEYS
@ -272,6 +290,7 @@ apple commander jar file. Here's how it's done for different shell's:
GIMP exported BMP.
* Everyone involved in the Apple II projects (AppleWin | AppleCommander).
* Everyone involved in making the cc65 tools, it's very good.
* Ian Brumby for showing me how you really unroll a draw loop.
9. CONTACT