It's Sean!

UK freelance journalist, author
and writer Sean McManus

Printed from www.sean.co.uk. © Sean McManus.
You are here: Home > Blog Home > Sean McManus's Writing blog

Sean's Tech and Writing Blog

Discover some a-maze-ing Scratch projects!

16 September 2016


Whenever we're on holiday, if there's a maize maze or a hedge maze nearby, we always take a look. Mazes fascinate me.

So when it came to planning projects for Cool Scratch Projects in Easy Steps, I thought it would be interesting to include some maze games. In my previous book Scratch Programming in Easy Steps, there's a chapter of seven short projects at the end and one of those was a really simple script to enable you to move a dot through a maze without being able to walk through walls. Although it's a short project, it was really popular, so I know many readers share my interest in mazes.

As a result, there are three maze projects in Cool Scratch Projects in Easy Steps. The first is Maze Maker, which will generate a random maze for you based on a grid you provide it. You can save an image of the Stage, and reload it as a sprite or background, so you can use the mazes generated by this project in pretty much any game. This project was an opportunity to show how you can make more complex programs, and it uses a technique I previously used for my Minecraft Maze Maker, which appeared in Raspberry Pi For Dummies and Raspberry Pi Projects. Here's a video of it in action, drawing a brain shaped maze:

Then, there's a game called Circuit Breaker, which uses mazes generated in Maze Maker. In this game, you have to track down as many bugs in the circuit as you can in two minutes. The time pressure makes it quite a tense game, because you often have to move on instinct rather than trying to trace the entire route before moving. As with all the projects in the book, I've included suggestions for how you can expand on them and one of my favourite ideas for customising this game is to award bonus time when you catch a bug. I'm sure you can think of other things you can do with this project. Here's a video of it in action:

The third maze project is a 3D Maze Explorer, which enables you to walk through a maze. You move by turning left or right and then walking forwards or backwards. The arrow in the top left is a compass that points north. The maze can be randomly generated, using the Scratch Maze Maker project, or you can design it yourself. The book shows you how to get the script working with both types of maze. It also shows you how to add collectables (cakes, in fact!) to your hand-designed mazes, and you can adapt the script to add them to random mazes too. Here's a video that shows me playing the game. At times it might be a little bit confusing because you can't see which keys I pressed and I've gone through it quite fast, but the game feels natural when you're playing it. It starts by scanning in one of the random mazes.

Cool Scratch Projects in Easy Steps is hot off the presses and in the shops now! My previous book Scratch Programming in Easy Steps is also available, and the two complement each other nicely, with "Cool" showing you how to build specific cool projects, and "Programming" going into greater depth on how the Scratch programming language works.

Bookmark and Share
Permanent link for this post.

0 comments

Making music and art in Scratch

09 September 2016


We've come a long way in bringing coding back into schools in the last few years, but I think there's potential to more closely incorporate it in other aspects of the curriculum. In the same way that writing and maths are used in most other subjects, as ways of expressing ideas, coding can be too. In the arts, the computer can be a great tool for creation, with randomness and serendipity adding to the creative process. (If you're interested in random art, check out my review of Brian Eno's 77 Million Paintings). Computers can also provide a way for people to express themselves through music or art, even if they are not talented with an instrument or pencil.

In my new book Cool Scratch Projects in Easy Steps, a follow-up to Scratch Programming in Easy Steps (both available now), I've included two music projects and an art project.

The first music project is a drum machine that you can customise with your own sounds (in Scratch 2.0) and use to program your own rhythms. Each row represents a different sound, and each column represents a beat. If the spot at a particular point is turned on (blue), that sound will play on that beat. Here's a video of it in action:

I've also provided some synthesised note samples for download that you can use to turn this Scratch project into a melody machine, so you can use the same program to play evolving tunes, like this:

The second music project is a random tune generator, called Scratch Cat Maestro. I used the C Major Pentatonic scale for this, but you can use any scale. The tune is only 32 notes long, but I used the pattern AABA to repeat bits, so it feels like there is some structure and it's not just a stream of random blips. It ends on the root note, so it feels complete. Some tunes come out better than others, obviously. Here's a demo:

For both books, I wrote a chapter at the end with a few short and sweet programs that readers can quickly dip into. Both books had a random art project in this section. In Scratch Programming in Easy Steps, the project is called Abstract Artist and created line-based patterns. For Cool Scratch Projects in Easy Steps, the art project is called Going Dotty and creates hypnotic circle patterns.

I have a keen interest in electronic music today, and first started experimenting with it by programming an Amstrad CPC464 in BASIC. I hope that these Scratch projects will show readers new ways of making music and art on the computer, and will inspire them to experiment with customising these projects, or designing their own.

For more information, visit the homepages for Cool Scratch Projects in Easy Steps and Scratch Programming in Easy Steps. You can order Cool Scratch Projects in Easy Steps here, and Scratch Programming in Easy Steps here, with further links to buy my books here.

Bookmark and Share
Permanent link for this post.

0 comments

Revealed: the free gift with Cool Scratch Projects in Easy Steps

10 August 2016


I can now reveal the free gift that comes with the print edition of Cool Scratch Projects in Easy Steps: it's a pair of 3D glasses. They're the red/cyan coloured lens type (called "anaglyph"), and the book has three projects that show you how to use them to make 3D effects with images that pop out of the screen or sink into it. There's a game called 12 Angry Aliens, where you have to zap the aliens that rush towards you; a 3D art package that enables you to position shapes at different depths, and a game called Space Mine 3D that shows off the depth you can achieve with a nice tunnel effect. You can see all the projects here, although the videos for the 3D projects will make more sense if you have a pair of 3D glasses. If you are buying the ebook, lose your glasses or want another pair, anaglyph glasses are available cheaply online from Amazon and eBay.

Cool Scratch Projects in Easy Steps is now expected to be available 12th August, rather than the end of the month, so you can get started on the projects over the summer holidays. You can get a special launch price by ordering direct from the publisher, and be one of the first to get your hands on a copy of the book!

Here are some photos of the book being printed.

Cool Scratch Projects book at the printers

Cool Scratch Projects book at the printers

Cool Scratch Projects book at the printers

Cool Scratch Projects book at the printers

And here's the first photo of the first copy the publisher received! It's nearly here! I'm getting excited...

Cool Scratch Projects book at the printers


Bookmark and Share
Permanent link for this post.

0 comments

Cool Scratch Project: Discover the Magic Mirror

28 July 2016


Now I've finished writing Cool Scratch Projects in Easy Steps, I'm going to start uploading the examples and supporting content as we approach publication. By publication day, you will be able to find the projects in the official Cool Scratch Projects in Easy Steps studio on the Scratch website. I hope that you'll agree that the projects in this book bring something fresh and exciting that you won't have seen somewhere else, and that they can live up to the label of being 'cool'.

The projects won't necessarily be shared in the order they appear in the book, but I thought I'd start with the first one. Magic Mirror is a new spin on the 'cat going for a walk' project which starts many tutorials, including my previous book Scratch Programming in Easy Steps. In Magic Mirror, you move the cat using the left and right arrow keys, with the up key to jump. When you walk in front of the Magic Mirror, you see your reflection. Jumping into the buttons changes the mirror's settings, with different distorted reflections available. It's like a fairground's hall of mirrors, reimagined. This is a fun short project that shows you how to use graphic effects and layers, and introduces some ideas that are used in the more advanced projects later in the book.

Cool Scratch Projects in Easy Steps is available for pre-order now and will be released 31st August. Amazon's pre-order guarantee means that you will pay the lowest price they offer until the publication date if you pre-order now. If you have any questions, feel free to ask in the comments below, although we're saving a surprise for a bit later on so I might not be able to answer everything...

The project is embedded below:


Bookmark and Share
Permanent link for this post.

0 comments

Fixing a Scratch bug in the buzzer game

12 May 2016


UPDATE: The Scratch team has now fixed this bug.

My book How to Code includes a buzzer game project. There's a bug in Scratch at the moment, which means the arrow sprite doesn't face the direction of travel. When you add a sprite, its default movement direction is right, so sprites are usually drawn to be facing right. The arrow1 sprite, however, points up when it is loaded.

This is a new thing, because it wasn't the case when I wrote and tested the game and it isn't the case in my downloaded version of Scratch 2.0, which is older than the current online version.

If you are experiencing this problem, you can fix it by adding a block to set the costume to the correct one at the start of the game, as shown below.

scratch code showing where to put the switch costume to arrow1-a block, after the set size to 40% block in the game


Bookmark and Share
Permanent link for this post.

0 comments

Learn to read sheet music on the Raspberry Pi with Clef Hero

04 March 2016


Chords on the Amstrad CPCThe March 2016 issue of The MagPi is out now, featuring my project Clef Hero. The game uses the Piano Hat, a tiny music keyboard that fits on the top of the Raspberry Pi, to teach you to read sheet music. I made it for myself first of all, but it provides a good example of how the Piano Hat works and will hopefully help others to learn too. I don't read music fluently, especially around the leger lines, and many years ago I learned chord fingering using a program I wrote for the Amstrad CPC (pictured, right), playing my keyboard while watching the computer screen.

Clef Hero game on Raspberry Pi

Clef Hero game on Raspberry Pi

In the Clef Hero game, you are shown the treble stave and notes appear on it, which you then have to hit on the keyboard. The keyboard only has one octave on it, so the same key is reused for the same note in different octaves. The game starts easy with a small selection of notes, but gradually adds more notes and introduces sharps and flats until you're working with the full stave.

For its musical notes, the project uses Sonic Pi, so my tutorial also explains how you can use Sonic Pi to generate a scale and then use Audacity to turn it into separate note files that Clef Hero can play. You can find a guide to note numbers in Sonic Pi here.

The game is written in Python, using Pygame Zero.

The Piano Hat for the Raspberry Pi

The Piano Hat for the Raspberry Pi

Here are the links you need:

For more information on Sonic Pi and Python, take a look at the book I co-wrote with Mike Cook, Raspberry Pi For Dummies.

With thanks to Gerd Altmann who created the background design I'm using here.

Bookmark and Share
Permanent link for this post.

0 comments

Throw some brains at it!

10 February 2016


Writing a book can be a solitary business, especially for self-published novelists. I had a policy of not discussing my novel while writing it, because I wanted people to be excited by the book when it came out and not bored of hearing me talk about it. But that meant I overlooked an important step in the book's lifecycle: that of testing the cover and title with its audience before proceeding to publication.

My novel is a techno-thriller set in the music industry, and involves a conspiracy where a record label sells computer generated music to fans, without telling them the bands are fake.

It originally came out under the title University of Death, named after the "real" band that gets mixed up in the action. The cover design was a stark black and yellow silhouette of fans with their raised arms at a concert. The cover and title were distinctive, but they didn't reflect the book's content well, and some people were put off by what they thought was a zombie story. Given that most of my non-fiction books are about programming and website design, it was a real kick-self moment when I realised I'd failed to test the end product with its audience before releasing it.

When I came to publish the book on Kindle recently, I decided to get some more brains on the case. I started by running a brainstorm on Facebook to invite people to suggest a new name for the book. I had really struggled to come up with a good name, but there were lots of brilliant suggestions from my friends. I filtered out the titles already claimed for erotic fiction novels (my, those authors are prolific!) and those encumbered by trademarks or other business activities (I was particularly sorry to see Spytunes and Autotuned struck off the list). Finally, I chose the title 'Earworm', suggested by my friend Andy Lawn.

For the cover, I ran a design competition through 99designs.co.uk. You provide a brief, and the site's talented community of designers submit designs to meet it. After some rounds of feedback and shortlisting, you pay £189 for your chosen design.

Almost immediately, a design came in that I thought was a contender to be the final winner. It looked professional and it had dramatic typography that wouldn't look out of place in an airport bookshop. Even as some great other designs came in, it remained a favourite. When I had a few designs in, I put together a shortlist and ran a poll among my Facebook friends. Guess what? My favourite cover ranked fourth. Out of six. It looked like a war novel, somebody said, and they were right.

This was when I had to trust the crowd. It might be my book, but it needs to appeal primarily to my readers, and my friends represented those readers in all their diversity much better than any one person could. They identified a cover with much broader appeal, that better reflected the themes of the book, and which I'm pleased to say I've grown to love.

I've learned that whether it's for a brainstorm, or market research, one of the best assets an author can have is a network of friends who can provide a fresh perspective on the big decisions. Thank you to everyone who helped me. It made a huge difference.

Find out more about Earworm and see the final cover here. Earworm is out now on Kindle and in print on Amazon.

Photo shows Display Stand with Brains by Katharina Fritsch

Bookmark and Share
Permanent link for this post.

0 comments

Dip into the blog archive

June 2005 | July 2005 | August 2005 | September 2005 | October 2005 | November 2005 | December 2005 | January 2006 | February 2006 | March 2006 | April 2006 | May 2006 | June 2006 | July 2006 | August 2006 | September 2006 | October 2006 | November 2006 | December 2006 | January 2007 | February 2007 | March 2007 | April 2007 | May 2007 | June 2007 | July 2007 | August 2007 | September 2007 | October 2007 | November 2007 | December 2007 | January 2008 | February 2008 | March 2008 | April 2008 | May 2008 | June 2008 | July 2008 | August 2008 | September 2008 | October 2008 | November 2008 | December 2008 | January 2009 | February 2009 | March 2009 | April 2009 | May 2009 | June 2009 | July 2009 | August 2009 | September 2009 | October 2009 | November 2009 | December 2009 | January 2010 | February 2010 | March 2010 | April 2010 | May 2010 | June 2010 | August 2010 | September 2010 | October 2010 | November 2010 | December 2010 | March 2011 | April 2011 | May 2011 | June 2011 | July 2011 | August 2011 | September 2011 | October 2011 | November 2011 | December 2011 | January 2012 | February 2012 | March 2012 | June 2012 | July 2012 | August 2012 | September 2012 | October 2012 | December 2012 | January 2013 | February 2013 | March 2013 | April 2013 | June 2013 | July 2013 | August 2013 | September 2013 | October 2013 | November 2013 | December 2013 | January 2014 | February 2014 | March 2014 | April 2014 | May 2014 | June 2014 | July 2014 | August 2014 | September 2014 | October 2014 | November 2014 | December 2014 | January 2015 | February 2015 | March 2015 | April 2015 | May 2015 | June 2015 | September 2015 | October 2015 | December 2015 | January 2016 | February 2016 | March 2016 | May 2016 | July 2016 | August 2016 | September 2016 | Top of this page | RSS

Books by Sean McManus

Scratch Programming in Easy 

Steps

Scratch Programming in Easy Steps

Raspberry Pi For Dummies

Raspberry Pi For Dummies

Learn to program with the Scratch programming language, widely used in schools and colleges.

Set up your Pi, master Linux, learn Scratch and Python, and create your own electronics projects.

Super Skills: How to 

Code

Super Skills: How to Code

Web Design in Easy Steps

Web Design in Easy Steps

Learn how to code with this great new book, which guides you through 10 easy lessons to build up your coding skills.

Learn the layout, design and navigation techniques that make a great website. Then build your own using HTML, CSS, and JavaScript.

More books

©Sean McManus. www.sean.co.uk.