Home > Books > Amstrad CPC > Misfit

Misfit plus bonus CPC games

Instructions for this Basic tutorial's concluding game, Misfit, by Sean McManus

This game is called Misfit. You can find it on the disc, and it's also now playable on this web page in an embedded Amstrad CPC emulator.

Misfit is a sliding puzzle game written in Amstrad Basic, with a stereo soundtrack and the option to define your own designs. The definer can be used by itself for creating sprites, since it saves data in the same format as our sprite routine, although it's a bit limited for large projects. Its very basic instructions are shown on screen. For designing sprites and managing banks of them, see my Amstrad CPC Sprite Definer program.

Click the emulator below to activate your computer keyboard in it.

Misfit, the game, works by enlarging your design (or one of the two presets in the program) and cutting it up into tiles. The top right tile is always removed, and this should be kept in mind when designing puzzles. Additionally, you should try to ensure that the design has enough variety in it to make it clear which tile is which when the game begins.

Having scrambled the tiles, the game challenges you to slide them back to the correct place in the time limit given.

You can choose three levels of time limit and three levels of difficulty based on the number of shuffles the computer makes before letting you play.

The keys used are QAOP or the cursor keys.

In 2020, when I updated my disc of games, I made a simple hack to get cursor keys working with the game. It's not especially elegant, but you might find it useful if you have type-ins that you want to reconfigure the keys on.

Using the KEY DEF command in BASIC, you can configure the cursor keys to display a text character. In this case, I changed them to display the QAOP characters that are used to control the game. You can find the key numbers you need in the back of the Amstrad manual. I've used the ASC command here to avoid having to look up the ASCII codes for the characters I'm assigning to those keys. It also makes this code more readable. Here's the code:

key def 0,1,asc("Q"):key def 2,1,asc("A"):key def 8,1,asc("O"):key def 1,1,asc("P"):

This simple hack enabled me to update the game to use the cursor keys without having to look at where and how the keys are detected in the game. I used a similar approach to update Paclone and Alien Intervention, both on my disc. The downside is that if you break into BASIC to look at the listing, the cursor keys won't be working normally. You can use the LOAD command to load the program from disc, then delete the line that sets up the cursor keys, though. It's near the start, and it's commented.

Free bonus Amstrad CPC games

Although the original issue of The Basic Idea did not include them, the disc now also includes several games from Amstrad Action and Amstrad Computer User magazines, some of which are shown below. They also draw extensively on the techniques in this book and have their code unprotected for you to investigate.

Screenshot of Wallbuster

Screenshot of Wallbuster

Screenshot of Alien Intervention

Screenshot of Alien Intervention

Screenshot of Gribbet

Screenshot of Gribbet!

Postscript

There is a version of Misfit in Javascript which you can play online now.

More Amstrad CPC tutorials and software

Find all my Amstrad CPC tutorials here, and download my updated software disc here!

Credits

© Sean McManus. All rights reserved.

Visit www.sean.co.uk for free chapters from Sean's coding books (including Mission Python, Scratch Programming in Easy Steps and Coder Academy) and more!

Discover my latest books

100 Top Tips: Microsoft Excel

100 Top Tips: Microsoft Excel

Power up your Microsoft Excel skills with this powerful pocket-sized book of tips that will save you time and help you learn more from your spreadsheets.

Scratch Programming in Easy Steps

Scratch Programming IES

This book, now fully updated for Scratch 3, will take you from the basics of the Scratch language into the depths of its more advanced features. A great way to start programming.

Mission Python book

Mission Python

Code a space adventure game in this Python programming book published by No Starch Press.

Cool Scratch Projects in Easy Steps book

Cool Scratch Projects in Easy Steps

Discover how to make 3D games, create mazes, build a drum machine, make a game with cartoon animals and more!

Raspberry Pi For Dummies

Raspberry Pi For Dummies

Set up your Raspberry Pi, then learn how to use the Linux command line, Scratch, Python, Sonic Pi, Minecraft and electronics projects with it.

Earworm

Earworm

In this entertaining techno-thriller for adults, Sean McManus takes a slice through the music industry: from the boardroom to the stage; from the studio to the record fair.

Scratch and Raspberry Pi resources

Scratch cat with balloons invites you to visit my Scratch resources

Sean's Scratch Resources

Tips, tutorials and free book chapters for Scratch, a coding language widely used in schools.

Four LEDs on a breadboard connected to a Raspberry Pi

Sean's Raspberry Pi Resources

Tutorials and guides for the Raspberry Pi, a budget computer perfect for learning to program.

Walking astronaut from Mission Python book Top | Search | Help | Privacy | Access Keys | Contact me
Home | Blog | Copywriting Services | Books | Free book chapters | Articles | Music | Photos | Games | Shop | About