Commodore 64

Why another Commodore 64 Game Tutorial series?

There are many 6502/6510 assembly language tutorial and also many Commodore 64 tutorial. One problem with those is that they all start with very basic stuff like binary code, CPU registers and spend a lot of time repeating the same stuff over and over again. Then they move to some code and they all start with talk about graphics modes and how to turn on and off sprites, how to create custom character sets which is followed by simple example of few sprites on the screen that can be moved by joystick and some basic collision and that is that. This is all great and is needed, however in software development there is a common knowledge that 80% of the code is done in 20% of the time and the remaining 20% requires 80% of the time. Almost all tutorials focus on first 80% but nobody tackles the hard part that is required to actually finish the game. Boring things like game states and how to transition between different stages, how to do proper timing for explosions, how to properly count and display score, how to incorporate sound and on and on and on.

We will approach the game development in small and incremental steps. We will develop some classic games and learn new techniques as we go. I will try to explain the algorithms and why I used them. As always programming is as much art as is science and same things can be achieved in many ways so the standard disclaimer, this is just how I do it and represent my approach. I also don't claim to be expert in assembly and in 80 didn't actually code for Commodore 64 but I was intrigued by it and will try to learn the tricks as we go along from simple to more complex projects and do my best to share them with you. Of course I will be happy to hear your opinions in form of comments and improve my code. However the amount of optimizing the code will be limited to minimum, only as much as needed to get each game running at proper speed but to keep code as readable as possible. Of course as we are progressing to more complex games more optimization will be required.

Goal of each project is to have complete and functional game with all the required components. Each one will be available as full source code and as binary. I use Kick Assembler to write code and various other tools to design graphics, fonts and sprites. All these tools have great many tutorials and documentation so we will not focus on that here.

Project 1: Peng

We will learn basic techniques like game loop, display setup, lookup tables, reading controllers, etc.

Project 2: Alien Invaders

In this section we will work in bitmap mode. We will learn about unwrapping the code, preshifted graphics etc.

Project 3: Bacman

We will introduce custom character sets and finally we will use sprites and make first attempt at AI.

Project 4: Z-Type

Time to introduce scrolling, and to start playing with raster interrupts.

Next Project

Please let me know in the comments if you would like me to tackle any other well known game concept.

Comments

Popular posts from this blog

Commander X16 Premium Keyboard

Hello VERA (BASIC vs C vs Assembly)

Default Palette