Remake Manic Miner’s collapsing platforms | Wireframe #49
Traverse a crumbly cavern in our homage to a Spectrum classic. Mark Vanstone has the code
One of the most iconic games on the Sinclair ZX Spectrum featured a little man called Miner Willy, who spent his days walking and jumping from platform to platform collecting the items needed to unlock the door on each screen. Manic Miner’s underground world featured caverns, processing plants, killer telephones, and even a forest featuring little critters that looked suspiciously like Ewoks.
Written by programmer Matthew Smith and released by Bug-Byte in 1983, the game became one of the most successful titles on the Spectrum. Smith was only 16 when he wrote Manic Miner and even constructed his own hardware to speed up the development process, assembling the code on a TRS-80 and then downloading it to the Spectrum with his own hand-built interface. The success of Manic Miner was then closely followed by Jet Set Willy, featuring the same character, and although they were originally written for the Spectrum, the games very soon made it onto just about every home computer of the time.
Both Manic Miner and Jet Set Willy featured unstable platforms which crumbled in Willy’s wake, and it’s these we’re going to try to recreate this month. In this Pygame Zero example, we need three frames of animation for each of the two directions of movement. As we press the arrow keys we can move the Actor left and right, and in this case, we’ll decide which frame to display based on a
count variable, which is incremented each time our
update() function runs. We can create platforms from a two-dimensional data list representing positions on the screen with 0 meaning a blank space, 1 being a solid platform, and 2 a collapsible platform. To set these up, we run through the list and make Actor objects for each platform segment.
draw() function, we can blit a background graphic, then Miner Willy, and then our platform blocks. During our
update() function, apart from checking key presses, we also need to do some gravity calculations. This will mean that if Willy isn’t standing on a platform or jumping, he’ll start to fall towards the bottom of the screen. Instead of checking to see if Willy has collided with the whole platform, we only check to see if his feet are in contact with the top. This means he can jump up through the platforms but will then land on the top and stop. We set a variable to indicate that Willy’s standing on the ground so that when the SPACE bar is pressed, we know if he can jump or not. While we’re checking if Willy’s on a platform, we also check to see if it’s a collapsible one, and if so, we start a timer so that the platform moves downwards and eventually disappears. Once it’s gone, Willy will fall through. The reason we have a delayed timer rather than just starting the platform heading straight down is so that Willy can run across many tiles before they collapse, but his way back will quickly disappear. The disappearing platforms are achieved by changing the image of the platform block as it moves downward.
As we’ve seen, there were several other elements to each Manic Miner screen, such as roaming bears that definitely weren’t from Star Wars, and those dastardly killer telephones. We’ll leave you to add those.
Get your copy of Wireframe issue 49
You can read more features like this one in Wireframe issue 49, available directly from Raspberry Pi Press — we deliver worldwide.
And if you’d like a handy digital version of the magazine, you can also download issue 49 for free in PDF format.
I bought this game when I was 11 and am still playing it to this day (on a C64). I am a teacher and often have end-of-term activities based around retro games and the kids always love Manic Miner!
It took many, many years (about 20) for me to complete the game without using any cheats, so great value for money, for the few quid it cost me!
For me the best collapsing platforms are in “The Vat”.
Matthew Smith was a genius that never got the recognition that he deserved. What he did, on his own, in a new system in a new market was incredible. In the 80’s documentation was just a few pages at the back of the users manual and if you were lucky a z80 book at the local library. Every aspect of this game was a perfect execution. From the music, graphics to it’s pixel perfect collision. The progression was perfect. He should be, if has not already been, given a BAFTA (or similar) for his early works. Manic Minor was the game that all others were compared against. He inspired me. And that is not overstatement.
I think that’s pushing it a bit. He was a talented (and troubled) chap for sure, but there were loads of great games back then and they were all written by a single programmer with the same documentation. And lest we forget, Jet Set Willy was an un-completable, buggy mess when it was released.
No it was not. Had a couple issues easily fixed with a poke from a mag. And why did you feel the need to post negativity on a public space. Not cool man, not cool.
I read about Matthew Smith at the time, and of course Braben and Bell. I tried to emulate them but was never successful. In doing so I at least acquired enough skills to get me a career.
Yes I did the same. :) Play a game then try to replicate some part that I had seen. Happy days hacking away till 5am before school :D
This is brilliant! Does anyone know how I might be able to get the game fully operational on a Raspberry Pi (i.e. not just with the collapsing platforms?)
It would be awesome to recreate whole game in Pygame Zero…
Both MM and JSW as well.
This is splendid! Does anybody know how I could possibly get the game completely operational?