Please or Register to create posts and topics.

S01E01 - What is Manic Miner?

So, what is Manic Miner?  Perhaps you have been living under a rock, or perhaps you are just not old enough to remember the game that changed how we view platform games. For those who don't know what Manic Miner is, let me explain...

Manic Miner is a platform based game written for the ZX Spectrum by a [then] 16 year-old Matthew Smith and published by Bug-Byte in 1983. It was republished later in the same year by Software Projects, a company set up by Matthew, Alan Maton, and Colin Roach. Although Matthew worked as a freelance developer for Bug-Byte, an oversight in his contract enabled him to take Manic Miner with him when he left - ooops! There is a fantastic documentary on Matthew Smith produced by Kim Justice on YouTube. I highly recommend you watch it.

Inspired by Miner 2049er which was published for the Atari 8-bit family in 1982, Manic Miner has been called one of the most influential platform games of all time. It has been ported to many home computers, consoles, and mobile devices.

To get a more full flavour of Manic Miner, check out the full walkthrough video on YouTube publish by RZX Archive. You might want to turn the volume down after a few minutes to save your ears from bleeding! That said, Manic Miner was the first ZX Spectrum game to feature in-game music combined with sound effects while you played!

Game Play

You control Miner Willy as he attempts to escape from 20 different caverns by collecting various flashing objects to activate the exit portal. Once the portal is activated, you must jump into it to progress to the next cavern. All this must be done before your oxygen supply runs out and while avoiding various enemies and deadly obstacles that wander around the caverns along predefined paths. Once you have successfully traversed all 20 caverns, the game starts again from the beginning. Scoring is based on the objects that you collect, and bonus points are awarded for the amount of oxygen you have when you reach the portal. An extra life is awarded for each 10,000 points scored.

Deconstructing the Game

As with any game you want to create, you need a plan. In our instance, this process is a little easier because we already have a finished game that we can reference. But we do need to break the game down into it's component parts so we understand what we need to do and can identify any challenges that we may experience during the programming. From this, we can plan our STOS activities and hopefully cater for any hurdles before they become problematic - there's nothing worse than getting part way through something and realising "Oh crap! How can we deal with that?" and having to refactor a load of stuff.

Gameplay Graphics

Let's have a look at the Manic Miner graphics and how we are going to use them.

Miner Willy

Our hero is a fairly simple single colour 10x16 sprite with a total of 4 animation frames to cover walking and jumping in one direction. What is going to be really interesting about the Miner Willy sprite is the hot spot positioning - Manic Miner has some pretty serious pixel-perfect jumps that need to be made. I hope we can replicate them appropriately.

STOS has a minimum sprite width of 16 pixels, so we will need to define Miner Willy as a 16x16 sprite, and it will take the first 8 sprites in our STOS sprite bank. Four sprites for walking to the right, and four sprites for walking to the left. There are no individual jumping sprites, as they are just the same walking sprites with a vertical movement.

His starting point in the game is usually the same, regardless of the level, which is 16,112. There are a couple of levels where this changes, but it's not very often.

Walls & Floors

There are various wall & floor graphics throughout the game that stop Miner Willy from walking to certain places within the level; however, the common factor is that they are all 8x8 pixels and follow repeatable patterns. This makes it nice and easy for us to replicate these elements. Something that we need to note is that some floors dissolve when Miner Willy stands on them for too long.

We will need to compensate for the fact that STOS can only handle a minimum of 16 pixels wide for a sprite. Not a problem, because although we are going to store these images in a sprite bank, we are going to do something whacky with them later on!

Baddies

There are various different types of baddies, and they are all of varying size too. The one common factor of them is they all have 8 frames of animation (4 left & 4 right) and either move up/down or left/right. They move on a set pattern, but are not necessarily linked to the floors they are placed on. Each screen has a varying number of baddies. If Miner Willy hits a baddie, a life is lost and the level resets back to the beginning.

Obstacles

As with the walls, all obstacles are 8x8 pixels and come in the form of stalactites, stalagmites, cactus plants, and other varieties of nastiness to jump over. One touch of these obstacles, and you lose a life, and the level resets back to the beginning.

Collectables

For Miner Willy to progress to the next cavern, all the flashing collectable objects need to be picked up. All collectables are 8x8 pixels, and within the game the foreground colour attribute is rapidly switched to make them flash. We will draw these elements using colour 1 as we can apply a STOS colour cycle without affecting any of the other colours on the screen - bonus!

Exit Portals

Exit portals come in various different styles, and are 16x16 in size. They have a simple inverse flash animation that made use of the ZX Spectrum foreground and background flash function - So we need to make sure we get the timing of this function correct. As we don't have a flash function in STOS, we will either need to use a colour cycle, or a simple inverse sprite. I've opted for a second sprite as this means that we don't have to worry about palettes or anything like that for a colour cycle.

Level Breakdown

Let's break down the different levels that Manic Miner has. This way, we know what we have to achieve. We'll start with "Central Cavern" (level 1) first of all, and we'll add to this list as we progress with the episodes.

Level 1 - Central Cavern

Element Description
Solid Floor Bright Red
Dissolving Floor Dark Red
Number of Baddies 1
Baddy Types 1 x Yellow Trumpet Robot - L/R
Number of Collectables 5 x Keys
Obstacles Blue Stalactite
Green Cactus
Exit Portal Blue / Yellow in bottom right

Ok, I think we are about ready to start putting some code together. So check out Episode 2 to take a look at how we are going to get things setup.