Gravedigger

Gravedigger

Resurrecting a 1980’s c64 Game, this was one of the first computer games I learnt to code BASIC with by reading from a book and copying the code verbatim. The publication at the time was Creepy Computer Games which consisted of 8 programmable games (Computer Nightmare, The Number Wizard, Ghost Guzzler, Spiderwoman, Gravedigger, Mad House, Ghost Maze, and Seance).

Published way back in 1983 however I did not learn to code a computer until a few years later. I found this game to be most entertaining and one of my favourites. In fact you can still play the original online at gamebase64.com.

The original game only had one level and looked as dated as it was loved.
The original game Gravedigger, 1983, only had one level and looked as dated as it was loved.

Eventually as time went by and I got a little older, I had moved onto the Amiga, and was tinkering around with Amiga basic. Having the advantage of being able to reference subroutines by name rather than by line. I decided to undertake transposing the game like-for-like on the the Amiga using Amiga Basic. Sadly, I do not have any photo I can show you and the Amiga was sold shortly before going to college.

…Fast Forward, got fatter unto 2022… I looked up emulators a couple of years ago as I still wanted to occasionally play games like Bubble Bobble, Spy Vs Spy, Barbarian etc. I found a great website gamebase64.com. You can play the games you remember. Then I decided to search for “Gravedigger” I found the publication here at https://bbcmicro.co.uk.

bbcmicro.co.uk, find old classic computer games online.
bbcmicro.co.uk, where you can find old classic computer games online.

I was in the process of stretching my JS coding, so I went about re-creating a VUE.js app for this game, taking the original code and refining it. I added levels (now seven), and different monsters too with different move patterns, some re-spawn and multiply. I also wanted to make mention Alan Ramsey, 1983, Author (Creepy Computer Games), because if it wasn’t for this little game it might not have inspired me to learn more about coding so a big thank you to Alan.

New levels and monsters added into the game.
New levels and monsters added into the game

I spent a recent weekend trying to tidy it up. It’s a real mash up now, as not quick vue-esque atm as I am using JS Classes for the creatures as I wanted to refactor the code to be a bit neater. A lot more can be done to refactor it into more components, bet meh it works for now and when I have a bit more time I think I’ll re-work it properly.

The demo is here where you can play… ->

And the Git repository if you want to have a poke around here.

Anyway this was a bit of fun and worth a mention, especially having to transpose BASIC to Javascript.

Irish Ferries Booking Form on Club Membership Portal

Booking form with timetable in Portsmouth Irish Club App

I have been busy working on providing special offers for our Irish Club memberships and in conjunction with Irish Ferries which offers a discount on selected sailing adding benefit to our members who wish to travel.

I just recently updated our members portal Vue.js with a new booking form, the content of the offer is controlled from the main WordPress Site via REST, we can also make sure that the promotional codes are kept secure. The timetables are mapped in JSON format and there was a lot of validation on the options available based on the https://www.irishferries.com/. When a booking is made then a REST request is sent and handled on the WordPress server and generates the communication to thrid-parties. We also create a new post to log the booking request.

Jeeni Radio | Vue.js

Jeeni Radio Web App in Vue.js

A Vue.js project that I built to help with the last CrowdCube campaign.
The project takes a playlist of pre-recorded mp4/3’s and looks up to an API from the WordPress database and strings them together as a list. It works out the current timestamp to work out where the current playhead might be and on which track using a modulated mathmatical algorythm.

https://radio.jeeni.com/

The advantage of this project is:

  • It appears/feels like it is a radio program rather than pre-recorded
  • If you reload the page then the playhead is recalculated to the correct position
  • It will be synched almost exactly accross multiple devices
  • Links back to the website and to the correct track or showcase.

Club Door App | WordPress / Vue.js / Rasberry Pi and Python

I have been involved in a recent project which has been more advanced. I was charged with finding a plugin that would be able to help memberships grow and be managed online. Linking membership plugin via a custom API to be able to control access to the club building using a QR Code.

There was no strict brief so on understanding the requirements of the club I set about creating the brief for the club. First finding a suitable plugin which I chose ARM from a list of about ten suitable plugins using a staging area of the website. Next to create a Custom API plugin that would be able to lookup the information, and using a small QR Code Generator Library to create a base64 encoded image that could be included in the API Json response.

I then wrote and created a custom Vue.js app that was able to log a user in via the API and return the QR code to the app. Vue.js made the application agnostic of the WordPress site and much faster to work with. I used Bulma CSS which is fairly robust and lightweight for styling and structure.

The next phase was to get a Rasberry Pi Zero W from the PiHut, and a 5volt Relay, a 470Ohm Resistor, a webcam and program it that when somebody scanned the QR code the Python code would call an API that would check if the user was a valid member (or they were not barred) and allow them access. It also logged the time of entry and snapped a picture. This was wired into the existing magnetic door and allowed to activate the Relay for 5-10 Seconds.

Prototype Rasberry Pi Zero W with Webcam, Relay for door entry system
Prototype Rasberry Pi Zero W with Webcam, Relay for door entry system

The script was set to run automatically from boot via a Supervisor script and re-load if it failed.

Some caveats and improvements:

We found that when the internet was down that the system would either not work or be slow, so I altered the custom plugin to write all the members status to a dot file that would then be Rsynched to the PI via SSH keys access every hour. This way the door access could read from a file rather than use the network and could continue to work regardless if the internet was down or not.

The webcam is not the best in low light so we ended up fitting a scanner (RFID/NFC and QR), I will be programming this in as well as the reading of NFC chips when they arrive. We found that some older members struggle with holding the cards up to the camera so next year will be utilising NFC as well as the QR.

I also made the Vue.js app a PWA so that a shorcut can be saved to the desktop of a phone.

Here is the finalised project mounted to the wall:

The advantages of this project:

  • Allows more control over the members from the website
  • Allows new members to sign up and existing members to be able to pay for membership online
  • Keeps a tally of who enters the building via this method so useful for security footage, fire service
  • As members can let themselves in they no longer need to wait for staff to stop serving to push a button to gain entry to the building
  • Allows less contact on surfaces to prevent the spread of Coronavirus

BiteSize Php a simple bespoke PHP Framework Json App

bitesize php is a micor php MVC framework written by Andi Lee Davis

This is a little PHP Framework that I wrote when applying for positions at Portsmouth and Southampton Universities.
I did not get the work but I did use it to launch https://alexahomesupport.co.uk & https://googlehomesupport.co.uk

The app is good for lightweight 2-3 page websites. Nothing special but uses a MVC approach with a JSON file for content, menu and placeholders for content output. It’s lightweight, does not need to use Javascript (but is included) and a minimal CSS.

This greatly reduces the page load times, and even though it’s one of the most basic things I have ever written, it could have a lot of potential.

The project can be downloaded at my BiteSize Repository on GitHub.