Friday, May 8, 2015

Created a game in Scratch

I came across some videos of Jeff Minter who created some amazingly original games in the 8 bit era and is still going strong developing new games today and it got me thinking of one of his stranger games that I remember playing on the Commodore VIC-20.
Meta Galactic Llama Battle at the Edge of Time.  Here's a video of it on the Commodore 64. I can't remember if I had it for the C64 as well, but definitely played it on the VIC-20


As with most of Jeff Minters games it kind of takes a slightly different approach.
You're a Llama at the bottom of the screen and you can move left and right.  You can exit one side of the screen and come in the other side as well.
You shoot lasers out of your mouth at 45 degrees and you have to shoot the spiders falling from the top of the screen.
If a spider reaches the ground it starts to crawl towards you making evasive action essential. 
All very interesting so far.  To add to the complexity and the control you can also raise and lower a ceiling for your laser to bounce off of to assist in shooting the spiders.

 I had great fun with this game all those years ago and so wanted to see if I could re-create something similar using Scratch.

After some fumbling I put created a little game inspired by the Llamas.

Below is the game and here is a Link to project on Scratch website if you want a peek inside. https://scratch.mit.edu/projects/61239650/




It's been fun developing a game in Scratch. I'm most definitely not an expert and I expect there are a lot of refinements that could be done to the code to improve the game but it plays similar to the original.  I hope you enjoy it.

Friday, May 1, 2015

7th Egham Raspberry Jam - 26th April 2015

What a great Sunday afternoon of Raspberry Pi activity.

40+ people turned up on the day with an ever greater proportion of parents with their kids with a real buzz on the day.

The most popular tables were the ones where a boy and girl were showing other kids how to program in Scratch.  I had a lovely experience at the end of the event where a father and his daughter came of to say they were leaving and the daughter was beaming as she had just written her first program in Scratch.  It was amazing to see the excitement on her face and the please she was experiencing from leaning a new skill.

For those interested in the latest in desktop environments +Martin Wimpress was there showing how fantastic Ubuntu Mate run on the Raspberry Pi 2 with desktop effects enabled. We had a great chat about RPi.GPIO support and what it would take to have it baked into the next build.
Martin also solved one of my questions. When navigating menus in Mate on the Pi2 sometimes they would stick and not respond.  I thought this was an I/O issue but it looks like it is down to OpenOffice have massive icons SVGs so on first opening a menu the Raspberry Pi has to render the icons for display. This happens once when you go to the menu for the first time. For return visits the icons are already renders so the menu is nice and fast.
I'm trying to decide if I will uninstall OpenOffice as Abiword and Gnumeric give me everything I need and then for graphics I use GIMP and Inkscape.
Martin had a build of Ubuntu Mate that used F2FS (http://en.wikipedia.org/wiki/F2FS) This is a file system specifically designed for flash memory and is suppose to improve the life of SD cards as well as improve performance.  I haven't had a chance to test yet but another win for optimisation.

As a side note GIMP and Inkscape are definitely usable on the Pi2.  I have previously used both on hardware of similar performance for commercial website development.  It's not going to match your i5/i7 with 16GB RAM and the latest graphics card, but it is definitely usable.

A second side note not from the Jam. I had my Ubuntu Mate Pi2 set up at home and needed to print.
It found my wifi network printer and installed all the correct drivers without me having to do anything special.  I love that Graphics acceleration just work, wifi (with the right dongle) just works and printing just works. There are the 3 points that I usually have concerns about on Linux and with the Raspberry Pi they just work.

Back to the Jam details.
Among the many items on display were:

Music playing Octopus (see flickr link at the bottom for pictures)
Portable games console,
Robot arm controlled by Scratch,
Crumble board (http://redfernelectronics.co.uk/crumble/) A great little interface board programmed using an block based interface like scratch.
Minecraft fun
Robot with robotic arm and webcam all controlled using PWM to vary speed from an Android table.
Sonic Pi coding +Sonic Pi
Scratch Development
CNC machine controlled by Raspberry Pi by +Stephen Cornes
EEG Brainwave reading using Mindflex, Arduino and Raspberry Pi
7 Segment of Pi board for development
Pitrol - build it yourself controller for the Raspberry Pi

At the end of the event I got the TwitterCam running and it did take pictures and tweeted them
The pictures can be see at the @EghamJam feed

Here is a link to some pictures from the event if you want to get a flavour for what happens at the Egham Jam.

https://www.flickr.com/photos/tictactoepony/sets/72157649918333124/

What a great day and thank you to everyone who came and brought their projects and enthusiasm to share.


We also had some Motorola LapDock troubleshooting going on as well.  These things turn your Raspberry Pi into a laptop


EEG Brainwave reader with Ubuntu Mate Visualisation



Looking forward to the next Egham Jam.