BASIC 10Liners 2018

I recently heard about a contest to write a game in BASIC using only 10 lines. One of the requirements is that it be done on an 8-bit computer. I've been tinkering a lot with my old Tandy Model 102 so I thought this would be a fun project for it.

My original idea was to try to make a very simplified RPG-type game but I just couldn't fit it into 10 lines. Instead I switched gears and recreated a little game I had originally written on my TRS-80 PC-3 Pocket Computer back in the 1980s. My original PC-3 game was a javelin throwing game. Although I had a CoCo 2, my best friend had a Commodore 64 and we played a lot of Summer Games II which was my inspiration. Unlike the PC-4, the PC-3 didn't have any graphics characters built in and there were no bitmapped graphics either, so my program simply alternated printing X and Y as your player moved to sort of simulate running. Then when you hit a different key to throw your javelin the animation changed to moving a dash ( - ) across the sreen until it landed as a slash ( \ ) to look like a javelin stuck in the ground. It was the best I could do on a text-only single line display.

The source code for that game has long been lost so I had to remake it from scratch. I also made some changes from how I remember it, both for the contest rules, and to take advantage of the more powerful computer and larger screen. The Model 102 has two ASCII characters that look like stick figures in slightly different poses so I was able to use those instead of the X and Y of my original. I also changed the game to a long jump instead of javelin throw because with more than one line of text available on the Model 102 screen I could include a jump animation which looks better than my animated dash in the original. But the general gameplay is exactly the same. Basically you hit two keys on the keyboard as fast as possible until your player reaches a line on the screen then you hit another key to throw or jump. The distance you throw/jump is based on the speed you were hitting the keys and how close you were to the line.

There are some pretty amazing entries to the contest so I'm not expecting to place anywhere near the top, nevertheless, I'm pretty happy with the result given I only have 10 lines at 80 characters per line to work with.

The code is availabe on github https://github.com/ksbex/basic-longjump

Screen-Recording-2018-03-06-15-39-21.gif