• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Retro Rendezvous

Connect, Collaborate and Code

  • Home
  • Recommended Resources
  • Retro Shop
  • About Me
  • Contact Me

BASIC Programming

The Lords of Midnight : Landscaping

December 6, 2023 by Paul Bussey

The Lords of Midnight was a popular and epic graphic adventure game by Mike Singleton for the ZX Spectrum (and other platforms – but not for the Beeb) originally released in 1984.

Here’s a few screenshots of what it looked like:-

Image
Image

I never completed the game but did remember these landmark graphics. The technique that the author Mike Singleton used was “Landscaping” – using scaled graphics shown as a first person perspective view. It was unique at the time – definitely moving computer graphics forward several notches.

The challenge I’ve set for myself is can this be done on the Beeb with Basic? I’m only interested in getting as far as having a grid of locations, the player being able to move in one of the 8 compass directions and having a simple landscape view implemented.

The code I have developed so far is in a link at the bottom of this post which includes:-

1) The player grid set up, currently 16 x 16. Each location has a number representing a tree or mountain or just an empty space. The player grid is displayed at the moment for diagnostic purposes, showing the position of the player, with a note at the top of the screen showing which direction the player is facing.
2) The player being able to look in one of the 8 compass directions (using numbers 1-8) and move with the key “m”.
3) Some procedures to draw scaled mountains and trees. (adapted from graphics code with thanks to Dominic Pajak) . The current code just shows a demo of these scaled graphics being used.

This is an example of scaled graphics I have developed so far. The tower from the code below has been removed for now to save memory.

Image

I have a Graphics Extension ROM (GXR) – so am using some of this extended command set in my code.

The big challenge is being able to represent the “landscaping” technique. I suspect this will be quite challenging squeezing it into memory, but I want to give it a go.

Luckily this technique is outlined in detail on this web page (see below), where Christopher John Wild has put a lot of work into understanding the game and breaking it down.

https://www.icemark.com/tower/landscaping.htm

Here’s my Mode 1 version, where I’ve gotten to the point with displaying three elements; mountains, trees and towers shown in a perspective mode. The player grid is shown as a 15 x 15 grid. Use N,E,S and W keys to face in different directions and the “M” key to move one square.

The following link will take you to the Owlet editor with the code.

This link is a post in the stardot forum outlining the progress of the code, with other forum members contributing and adding to the graphics.

This is the final version.

Filed Under: BASIC Programming Tagged With: Graphics

Notes on Owlet – A Modern BBC Basic Editor

November 24, 2023 by Paul Bussey

Owlet is a welcome modern editor for BBC Basic since editing Basic on the original BBC Micro was clunky and slow. Try it here with this example of “Space Probe” a game I’ve written recently.

A Trip Down Memory Lane

In a remarkable fusion of past and present, a trio of innovative programmers – Dominic Pajak, Matt Godbolt, and Kieran Connell – have breathed new life into a classic piece of computing history. Their project, the BBCMic.ro editor, also known as Owlet, is not just a nod to nostalgia; it’s a full-blown resurrection of the BBC Micro.

The Power of Emulation

The Owlet emulator is a marvel that runs BBC Basic right in your browser, encapsulating the essence of the original BBC Micro. But that’s not all – the team has also introduced the BBCMicroBot, a tool that can execute BBC Basic code and display the results in a tweet, merging the old with the new in a way that’s both ingenious and inspiring.

Inspirations and Creations

Dominic Pajak, in explaining the motive behind this project, said it was about “bringing back to life a classic 80s computer that inspired a whole generation in the UK.” This emulator has become a canvas for creativity, with users creating everything from pixel art to fractals. Notably, Raspberry Pi founder Eben Upton has even contributed an implementation of Conway’s Life in 6502 machine code, showcasing the emulator’s capability to handle complex computations.

A Platform for Experimentation

Pajak and his collaborators view this emulator as more than just a tribute to the past. They believe it encourages experimentation, much like Raspberry Pi and Arduino do for the current generation of developers. This philosophy is evident in the emulator’s design, which includes a 10GHz 6502 emulator on the backend. This feature dramatically accelerates the computing process, allowing users to accomplish in seconds what would have taken an entire night on the original BBC Micro.

The Best of Both Worlds

The BBCMic.ro editor and the BBCMicroBot represent a unique intersection of retro and modern computing. They offer a glimpse into the past while providing a platform equipped with the speed and efficiency of today’s technology. This project isn’t just about reliving old memories; it’s about creating new ones, using a piece of history as the foundation for new learning.

Some Discoveries

  • When running BBC Basic on this emulator, don’t forget to click into the right hand window in order to interact with the screen.
  • When using Random numbers in BBC Basic, the Owlet environment will end up giving you the same number on each run. When running the same code on a machine, random numbers behave better!
  • The GXR (Graphics Extension ROM) is standard in this emulator, which a normal BBC Micro B wouldn’t have. When I was using commands to draw circles or elipses, such as the planet in the graphic above, I wasn’t aware that this was an extended graphic command, so the code didn’t draw the planet at all on a native machine.
  • When clicking on items in the gallery of examples, they don’t seem to load and seem to suppressed by having your current coding project reload instead (this at least happens in the Chrome browser)
  • Owlet can contain the whole code of your BBC Basic program in a link – so easy to share your programming projects on a forum for example.
  • Owlet can save your code as a SSD (Disk image) ready to copy onto a USB memory stick, to be read by a GOTEK device. So Owlet is ideal for development and transfer of programs back to the original machines.

Filed Under: BASIC Programming

Programming Project : Space Probe

October 30, 2023 by Paul Bussey

Back in 1986 I coded a game for the ZX Spectrum that was published in Popular Computing Weekly. Remember that magazine, where you could type in Basic programs and perhaps get them to work?

In this thread I’ll be working on converting this to BBC Basic as part of my relearning of this language.

For anyone else that may have published their BASIC programs during that time, there’s two useful archives here:-

1. Index for Spectrum/QL typed in scripts : http://www.users.globalnet.co.uk/~jg27p … _names.htm
2. This archive is from the “World of Spectrum” but the mag covers all scripts from different machines of the time. https://worldofspectrum.org/archive/mag … ing-weekly

Here’s the original mag and published page:-

Image
Image

I’ve been using the excellent Owlet editor on my Mac (I can type faster on a modern keyboard) and my first question is on the use of RND, which is very much prevalent in the code above which I’ll need in the BBC script.

I’ve noticed in Owlet that when using RND(X) it ends up giving you the same number each time, unless you have some code asking for input at the beginning (providing a random time spanned event at the start).

Here’s my finished script which ends up being better than the 1986 version.

Use this link to see and run the BBC Basic script.

Filed Under: BASIC Programming, BBC Micro B

Primary Sidebar

Footer

The Venue

We meet at the Falkirk Business Hub.

Learn more about it here

The blog

Learn about my “rediscovery” of the BBC Micro B here in my blog

Recommended Resources

As I discover them I’ll be logging useful resources for Acorn machines HERE.