# Bouncing of the ball when it touches the Bat (80s Krakout style)

It’s night when I’m writing this. I came up with a little Monkey X tutorial on how to program the bouncing of the ball, when it touches the bat in the “old school way” — like in the popular C64 gameÂ Krakout in the 80s.

In the video for the tutorial you can see, that as the ball touches the bat for the first time, delta y doesn’t change. This is because both the ball and the bat are uneven as height in pixels; now both the ball and the bat have a middle point.

This is just a short piece of code, that doesn’t handle the case, when the ball is at the horizontal top or bottom of the bat. There’s some extra work for anyone who wants to make an 80s style Krakout game. đź™‚

The delta y for the ball is calculated simply how the ball’s y-position is related to the middle point toÂ the bat. The “scale” variable is used to adjust the max y-speed of the ball.

Source code below:

Feel free to use and improve the source above in your own projects.

Here’s the graphics to download (license: public domain), except the background picture (right click and save as…):

The bat is 32 x 73 pixels as size, the ball is 16 x 17 pixels.

For comparing to the C64’s popularÂ Krakout, see the video below:

Link: Monkey X (from itch.io), it’s free.

Many years ago I started to program Krakout style game in the spirit of the good old Commodore 64, but as usual, something went wrong. Three months work with multiple levels and a level editor programmed in Blitz3D were lost because I hadn’t taken backups of the files, when I, well, “fixed” the Windows installation I had at the time…

# Shortly about my computer gaming history (1984 – 1987)

It all started in 1984, when in Finland the prices of home computers were significantly reduced. One could buy a home computer for under 1000 Finnish marks. That’s about 167 euros. My parents bought me a Commodore Vic 20, that costed 999 Finnish marks.

I really liked the first (and at the time only) game I got with Vic 20: Radar Rat Race. See below a picture ofÂ the module:

Below is a YouTube video from the game:

I remember that the game had some bug though: When one got far enough, playing the game became somehow impossible.

Another game I liked, was Fire Galaxy. Below is a little video from the game:

A bit later my Commodore 64 times began.

At those days I saw many C64 games. The most remarkable games from me at the time were Ultima IV: Quest of the Avatar and Ultima V: Warriors of Destiny. Ah, the story of the games and all the philosophy in them… Especially the three principles (of the eight virtues): Love, Truth and Courage. These define the good in the games. Evil is defined asÂ â€ťprinciplesâ€ť of the opposite of the mentioned: hate, falsehood and cowardice.

As to choosing the character in these games, I always Â answered the philosophical questions as myself, not by trying to get my character certain quality. As a result of this, my character became to be of the weakest profession in the game: The shepherd.

Intro from C64’s Ultima IV:

Intro from Ultima V (C64/C128):

When running the game on the C64, there isn’t background music, the sound effects only, because the game is so huge, that C64 hasn’t enough memory for the music.

Boulder Dash and Boulder Dash II were my favourites too.

Below is a video from both games:

I played a lot also Delta, a game by a Finnish programmer Stavros Fasoulas (music by famous Rob Hubbard), see the video below:

One good game for the C64 that teaches also some strategy is Paradroid. There are many remakes of this classic game also to PC.

Commodore 64’s Tetris has incredible music!

There areÂ many games in the world of Commodore 64 that I wasn’t really interested in, but the music isÂ incredible. As an example I must mention Cybernoid II:

Some games were simple and fun to play with good graphics and music, but let the player down with one thing: There was no ending of anykind! I remember playing â€ťendlesslyâ€ť both International Karate and IK+ with black belt, but the games just went on and on…

As an youngster I decided, that if I was ever to program a computer game, it would always have an ending.

One incredible C64 game I remember, is Wizball:

Some C64 games I liked, were kind of games that often other people didn’t like. As an example let me mention Armourdillo:

the music of Armourdillo:

If my memory serves my right, I playedÂ ArmourdilloÂ with music.

Another game, that I almost forget as an example of a game that other people often didn’t seem to like wasÂ Master of Lamps:

For the third example of game that the other people didn’t seem to like, but was fun to me as a kid isÂ Poster Paster:

As to Defender of the Crown, I liked C64’s version more than Amiga’s, altough the Amiga version has better graphics and music.

One very good game I almost forgot to the C64 isÂ Thrust:

WithÂ Spy vs. Spy II we both, I and one of my friendsÂ had lots of fun. We made lots of traps to each other in order to get to that submarine and win the game. There might be one “room” filled with so many traps while we were playing the game, that in practice there was only one special way to get through the room.

One special game from the year 1984:Â Ghostbusters. Why this game was special? At the time I was Vic 20 user and to me (and to many others) it was simply amazing to hear so authentic speech from a movie in a computer game! What a miracle computer C64 was: With it one can even listen little parts of authentic speech from a movie in a game. How we were amazed!

A game that made many of us laugh, when we were kids, isÂ Super Pipeline II.Â A fun quality game with nice music and funny graphics and not too hard to finish.

One funny detail from the past in the 80s in our C64 times was C64’sÂ Commando; first the other boys told how hard game Commando is. Eventually one of my friends tried to play Commando for the first time in his life (and this was the first time he saw the game too) and this one friend managed to finish the game from the very beginning to the end at his first try — how the other boys were confused. “Yeah, really hard game!”, he said with little sarcasm.

A game that required fast thinking and good reflexes and gave us visually something new compared to what we had seen before was Cosmic Causeway:

For the end let be mentioned some early gems in the world of Commodore 64 games: M.U.L.E., Archon and Archon II.

Videos below:

Perhaps I come back later with my Amiga gaming history…

# Another Game That I Dream to Create

This goes again to the nostalgia category. I really would like to make my own version of Commodore 64’s Stix.

This is a classic game from the year 1983. Below is a screenshot from C64 emulator:

The idea is to fill 75% of the playing area by turning 90 degrees from the direction the player is going. Kind of addictive game!

This idea could be refined to something more interesting…

# A Game That I’ve Always Wanted to Create…

The computer games that have given me best gaming experiences ever, are Commodore 64’s Ultima IV and Ultima V. In my youth I always wanted to create a game like these. Many, many years ago I even started making some kind of Ultima like game on Amiga in assembly and C, but I never got that project finished. I made everything myself, the code, graphics and musics.

Here’s a screenshot from work in progress from WinUAE (Amiga emulator):

The screenshot is from a demo written in assembly where there is jumping scrolltext (in Finnish) with the three bitplanes jumping separately. In the demo there’s a little world where the boy in the picture wanders, destroys ghosts and in the end finds his love…

Both demo and the unfinished game that is written in C use Amiga’s system routines. The unfinished game doesn’t have (of course) a scrolltext. The graphics that are made with Amiga’s Deluxe Paint II, are only experimental…

Hopefully I will sometime in the future find time to make this kind of a game for PC, probably in BlitzMax. Because of lack of time, I prefer nowadays to use a programming language, that makes it possible to get something done pretty quickly. And for the sake of nostalgia, the game would have 2D graphics like the original Ultima IV and Ultima V of Commodre 64 (and Amiga).

In the scrolltext it says: â€ť[Ja he] elivĂ¤t onnellisina jne…â€ť That’s in English: â€ť[And they] lived happily etc…”