free website creation software
It appears your browser does not support the canvas element so no emulator is available.

Ball Bat

'Breakout' has all the classsic elemnents of a traditional video game so is usually a good starting point

Ok, now let's try a game - nothing that's going to set the world alight, just a simple game based on a very well known premise.

A game I've given the outstanding name of Ball Bat.


The main point of this isn't to write a fantastic game, it's just to cover the main elements you need in just about any game and write

it using the templates we created with Hello World

Right so first things first, you need something on screen that the player can control - in this case it's a simple bat which you can move left and right. 


Then, we need some non player characters or objects which do stuff without being directly controlled by the player - which would be the ball.

We also need interaction between the objects, we need collision detection. Things need to know when they've hit other things and what to do about it.

In this case, the ball bounces off the bat in 3 different directions based on where it hits it and also bounces off the bricks in the wall.  


The source is available on github and the .p file can be downloaded from hereThe source code of the main file (ballbat.asm) is listed here


The real thing

Is it worth getting hold of a real ZX81 ?


Getting as close as you can

Firing up ZX81 programs on your laptop


The how and the why

Toolkits for developing HiRes applications on a real ZX81

ZX81 HiRes

The fun stuff

Quick Primer on the ins and outs of ZX81 HiRes