The Bear Essentials: Developing a Commodore 64 game – Part 5
Jun11

The Bear Essentials: Developing a Commodore 64 game – Part 5

Creating Caverns I wrote about creating rooms back in part 3 of this series and how I began to store the room data in memory.  But of course, rooms in the game have to fit together to form a world in which the character will explore on their journey. With my game I thought it would be good to split this world into different areas where a number of rooms will be grouped together and have a common theme. I actually came up with this idea fairly early on, as I always find it easier to play through games when you exit one area and find yourself in a new area that looks completely different.  It keeps the game feeling fresh and encourages exploration. The first map I sketched for the game had 60 rooms.  I picked this number to aim for as I figured this would allow all rooms to be visited in around an hour, and also as this is the size of Miner Willy’s mansion in the first Jet Set Willy game, which is a joy to explore without feeling too overwhelming. I split the map into eight different areas:  Home, Forest, Cloudy, Rocky, Mining, Jungle, Tunnel and Secret.  However, I soon opted to cut this down to six areas (taking out Tunnel and Secret) when I realised how much work was going to be involved in creating a different look, and ideally, a piece of music for all areas.  With only 64kb to work with, memory was also a consideration here too! The map went through four revisions, until I settled on a final design. The Home area would be where the player starts and finishes the game.  This leads into the first ‘proper’ area of the game, which is Forest and serves as an introduction as to how the game is played and what the objectives are. From Forest, the player can opt to exit the area in two places which lead to ‘continue’ rooms, where the player is awarded an extra credit and a new point to start from when continuing after death.  These continue rooms also serve as a break from the game and a hub to which the other areas of the game are accessible. I decided to keep one special area of the game locked until all others have been cleared in the Mining area. This area works differently to the rest of the game, and forms the final part of the players journey back to the Home area.  It takes inspiration from Manic Miner and the very first idea I had for the game, which was to only allow...

Read More
The Bear Essentials: Developing a Commodore 64 game – Part 4
Jun26

The Bear Essentials: Developing a Commodore 64 game – Part 4

Part 4: Studying SID It’s been over a year now since I started work on my platform game, and there is still plenty of work to do on it. I would never have imagined it would take me this long to make a Commodore 64 game, but I constantly find myself revisiting things that I thought previously completed to improve them.  I’m without a doubt past the 50% progress marker now anyway, which is definitely a positive. And on another positive note, Bear has found a really nice home with new Commodore 64 game developers Pond Software. Pond’s first release earlier this year, ‘Spaceman Splorf: Planet of Doom’ is a very polished score chasing game with excellent sound and graphics and can be downloaded for free from: http://pondsoft.uk You can also read about Pond’s upcoming releases, which include entries for the 2016 Reset 4kb Game Coding Competition, which I would encourage any C64 coders to take part in! Details of the competition can be found here: http://cloud.cbm8bit.com/resetc64/crapgamecompo2016v1.1.pdf The Sound Interface Device I’m sure at some point everybody has been impressed by a piece of music played by the Commodore 64’s SID chip.  Over the years there have been many names associated with squeezing excellent pieces of music from the three sound channels of the SID – Rob Hubbard, Ben Daglish, Jereon Tel, Steve Rowlands…  Look them up on YouTube if you still need convincing. Before I started writing my C64 platform game, I had a small amount of knowledge of how the SID chip worked having read about it in various books and magazines.  When it came to making use of it in my own programs however, I only really managed to get the most basic of sounds working. For some games this is absolutely fine (my Snake clone had small noises to indicate picking up, crashing and starting the game, and also a very simple tune when the game first loads), but for other more complicated games it really is deemed unacceptable for a C64 game to not have some cool music and sound effects. This was the case with RockMaze, my first attempt at creating a C64 game.  I can’t remember if I ran out of time, or if I failed at attempts to get sound effects working, but either way the game ended up being completely mute.  When I was asked recently if I would like to contribute to the Reset magazine cover disk, I thought this would be an ideal time to read up on the SID chip once again and try to add some music and sound effects to RockMaze. After a quick internet...

Read More
The Bear Essentials: Developing a Commodore 64 game – Part 3
Dec28

The Bear Essentials: Developing a Commodore 64 game – Part 3

Part Three: The Joy of Plex Things have been progressing well with my Commodore 64 platform game since part two, and I have now put together a trailer showing the first two areas of the game. Before I begin retelling my joyous experiences of learning C64 sprite multiplexing, I’d like to show a couple of screenshots that show the origins of Bear, who actually started life in Unity 3D. I had numerous attempts at making a platform game in Unity, with the goal then to be able to publish it to numerous platforms (probably starting with iOS). However, I found it difficult to get the pixel perfect platforming I was aiming for, and I struggled to make graphics assets that would suit the game I had in mind. In the end, I gave up on the idea, and Bear sat untouched for a good long while. I’m really glad that I decided to get my C64 out of the loft and set it up.  This is what sparked the idea of making Bear into a C64 sprite, and attempting to make my platform game again.  I’m surprised that the restrictions of working with a C64 has helped to bring the game to life, and that I found it much easier to create graphics with a 16 colour limit and a low resolution.  Something to Bear in mind if I ever attempt to make the game in Unity again! Speaking of restrictions, one quite large restriction on the Commodore 64, is that it only has eight hardware sprites available to use, which looking on the bright side, is more than enough for some games.  In fact, the first two games I made for the C64 didn’t even use sprites in the main game, and were just used to show things like the game logo and score, and everything else was built from screen characters. Some games require many more than the eight available sprites though, and so a technique called sprite multiplexing is needed to allow this. This technique takes advantage of the register which tracks where the screen refresh is currently happening, and re-uses sprites that have already been displayed by moving them down the screen underneath the refresh so that they are drawn again, giving the impression that there are actually more than eight sprites. This is quite a commonly used technique on the C64, one famous example is of the massive ‘fist’ boss in Turrican. The fist is made up of rows of sprites that are reused again and again to make one very impressive giant enemy! There are very helpful sprite multiplexing code examples (along with...

Read More
The Bear Essentials: Developing a Commodore 64 game – Part 2
Oct03

The Bear Essentials: Developing a Commodore 64 game – Part 2

Part Two:  Pixel perfect platforming Since the last instalment, I made the decision to go completely back to basics and do some research before progressing any further with my platform game. Why?  It has been a dream of mine to make a C64 platform game for a long, long time, and I want to make the best job of it that I possibly can. And it’s always good to learn something new, right? Since I am (possibly quite badly) self taught in machine language and it has been many years since I used it last, there are a fair few gaps in my knowledge of how machine language and the C64 work, so I figured it would be a good idea to try to fill in some of these gaps to make progressing with coding as easy as possible. I already owned The Commodore 64 Programmers Reference Guide, which is very handy to refer to and learn the basics of machine language, but I needed something a little more advanced.  I sought out some recommendations from the Lemon64 forums, and one book that cropped up again and again was Jim Butterfield’s ‘Machine Language for the Commodore 64‘. I recommend the revised and expanded edition, which you can download along with lots of other great books from here: http://www.bombjack.org/commodore/books.htm Jim’s book is widely regarded as being the best way to get started and to advance with machine language.   Another great suggestion given to me was to study some source code from other C64 games. This was a very valuable step to take as it has taught me many programming tricks, ways to structure code and some great ways to conserve memory.  It can be a little daunting diving in to somebody else’s code, but with the right approach and some patience can be incredibly rewarding when you discover something new. Armed with all of this new information, I actually decided to start my game again from scratch, which although has cost me time and was somewhat painful, it will now ensure that my project is structured correctly and that all of my code is up to date with the new knowledge I have gained. Another piece of  ‘research’ I decided was needed was to play some platform games for inspiration.  One of these was the first game I remember playing on my Dad’s ZX Spectrum 48k, which had only three buttons to control the main character, the simplicity of which I adore: Left, Right, Jump. Simple. Too many games these days have you clumsily looking down at your hands trying to remember what does what. None of that here....

Read More
The Bear Essentials: Developing a Commodore 64 game
Aug19

The Bear Essentials: Developing a Commodore 64 game

Part One: Initialising and moving a sprite I find it absolutely incredible that the Commodore 64 development scene is alive and well.  Thanks to companies like Psytronik there is still a healthy stream of games arriving on the C64 25 years after I first got my machine in 1990. I was fairly late to the Commodore party, having had my first 8-Bit computer experiences on my Dad’s ZX Spectrum 48k.  I loved every minute I spent with the little rubber-keyed beauty, but eventually wanted to branch off into a territory of my own choosing…  I wanted a computer of my own. I chose the C64 after reading about a recent price drop and an influx of new cartridge releases which promised to give the 64 a new lease of life.  This didn’t turn out exactly as Commodore had planned though, and it wasn’t long after I first owned the machine that the 8-Bit computer scene gave way to the 16-Bit computers and consoles. I never once regretted my decision to follow the C64 route though. Like all 8-Bit computer owners, my first programming attempts were in the BASIC language, but I soon grew frustrated that I couldn’t make the type of games I wanted to make as BASIC just wasn’t fast enough.  And so, armed with an Action Replay cartridge and the Commodore 64 Programmer’s Reference Guide, I taught myself the basics of 6502 machine language. My first creation was a Boulderdash / Repton clone called RockMaze, written mainly in BASIC but using the speed of machine language for scrolling the screen and copying levels in and out of memory.  It was a fun little game to make (and play), and even had a level editor. After this, I was determined to write another game, but this time made in 100% machine language.  For this, I decided it would be better to use a very simple concept, and created a clone of the Snake game (which was later made very popular by a certain mobile phone company!) My bedroom programming time soon disappeared in favour of the usual teenage pastimes (pubs and girls if I remember correctly!), and the games I made were destined to be forgotten at the back of a dusty loft. Fast forward to 2015, and after joining the Lemon64 community, I was asked if I would like to give RockMaze and Worm! an official release. Wow!  Finally my games would actually get played by somebody other than myself! After some rummaging in the loft for the old tapes and converting the games to run on disk, they were uploaded to the Commodore 64 Scene Database...

Read More
Build your own Commodore 64 arcade stick – a guide
May20

Build your own Commodore 64 arcade stick – a guide

As many of us know, some of those games of the 8-bit era take a very large toll on the most common implement used to control them: the joystick. Yes, some of them just aren’t made to last (Mr Cheetah Annihilator, with your poorly designed plastic shaft, I am looking at you!), but even the most rugged of joysticks (Zipstick, anyone?) can get creaky and inaccurate after wrangling through the pixel perfect jumps of Manic Miner one too many times. This is why, after reading an article in Reset magazine issue 5 (Reset is a free downloadable Commodore 64 magazine that I highly recommend for C64 fans! reset.cbm8bit.com) describing how to build a Zipstick-style joystick out of readily available parts, I decided to give it a go myself. I am very proud of the results! As much as it pains me to use eBay sometimes (we all know how atrocious it can be for it’s outrageously priced retro goods), it is a very useful source for finding DIY bits and bobs, electronics and materials for home projects. I managed to find every part I needed on there, and if you look hard enough, you can find items with downloadable PDF diagrams containing all of it’s dimensions (which is massively helpful in the planning stages when you’re not entirely sure how the thing is going to look yet!) Planning is an important stage, even if it’s just a rough sketch of where the stick will be and the button layout, it has to be done.  Ignore this stage at your own risk!  You may end up with something that looks like this: Interesting! I managed to find an ‘outdoor waterproof circuit box’ which was an ideal shape and size for the arcade / fight-stick style layout I was aiming for.  Having the dimensions straight away from a PDF saved some number of hours, as I was able to draw the box life-size on squared paper and try out different layouts of the stick and buttons before I even had it. Incidentally, it was the grey (almost) Commodore-like colour of the box that gave me the idea of the Commodore colour scheme, and upon searching for ‘Commodore decal’ online, I came up trumps with the perfect match for my project. Once the housing had arrived, it really became quite an exciting project! At least, for a Commodore enthusiast like myself anyway: I managed to find a seller that supplied a ‘budget option’ for buying arcade buttons and sticks together. Some arcade quality parts can cost an absolute fortune, so to find a bundle of the buttons and stick together at a...

Read More