Breakout clone in 10 lines of BBC BASIC (max 80 chars per line)

Post Reply
User avatar
0xC0DE
Posts: 1305
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Breakout clone in 10 lines of BBC BASIC (max 80 chars per line)

Post by 0xC0DE »

Last edited by 0xC0DE on Fri Feb 05, 2021 3:02 pm, edited 2 times in total.
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
lurkio
Posts: 4351
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Breakout clone in 10 lines of BBC BASIC (max 80 chars per line)

Post by lurkio »

Flippin' great!

Good luck in the comp!

=D> =D> =D>
User avatar
0xC0DE
Posts: 1305
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Breakout clone in 10 lines of BBC BASIC (max 80 chars per line)

Post by 0xC0DE »

Thank you! I wonder if other Stardotters are participating...
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
leenew
Posts: 4902
Joined: Wed Jul 04, 2012 4:27 pm
Location: Doncaster, Yorkshire
Contact:

Re: Breakout clone in 10 lines of BBC BASIC (max 80 chars per line)

Post by leenew »

Excellent work!
Impressive =D>

Lee
User avatar
0xC0DE
Posts: 1305
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Breakout clone in 10 lines of BBC BASIC (max 80 chars per line)

Post by 0xC0DE »

Thanks Lee! 8)
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
FourthStone
Posts: 1528
Joined: Thu Nov 17, 2016 2:29 am
Location: Brisbane, Australia
Contact:

Re: Breakout clone in 10 lines of BBC BASIC (max 80 chars per line)

Post by FourthStone »

Nice game and well thought out logic such as a little randomness to prevent ball getting stuck horizontally =D> Cracked 1k points :mrgreen:

Couple of bytes you could reclaim with unused variables ME$ and YEAR :lol: =D>
User avatar
0xC0DE
Posts: 1305
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Breakout clone in 10 lines of BBC BASIC (max 80 chars per line)

Post by 0xC0DE »

Thanks! I see you have read the source code well 8)
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
lurkio
Posts: 4351
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Breakout clone in 10 lines of BBC BASIC (max 80 chars per line)

Post by lurkio »

0xC0DE wrote: Fri Feb 05, 2021 2:16 pm I wonder if other Stardotters are participating...
You don't seem to be on the list of entrants..?:

https://gkanold.wixsite.com/homeputeriu ... -list-2021

:?:
User avatar
0xC0DE
Posts: 1305
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Breakout clone in 10 lines of BBC BASIC (max 80 chars per line)

Post by 0xC0DE »

lurkio wrote: Sat Feb 20, 2021 11:04 am
0xC0DE wrote: Fri Feb 05, 2021 2:16 pm I wonder if other Stardotters are participating...
You don't seem to be on the list of entrants..?:

https://gkanold.wixsite.com/homeputeriu ... -list-2021

:?:
Need to finish the accompanying required documentation!
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
Kecske Bak
Posts: 753
Joined: Wed Jul 13, 2005 8:03 am
Location: Mélykút, Hungary
Contact:

Re: Breakout clone in 10 lines of BBC BASIC (max 80 chars per line)

Post by Kecske Bak »

I had a quick play with getting the game to work on BBC Basic for SDL (attached). You'll need to rename it to OUTBREA.bbc. It was interesting as the centre of the "O" character is not in the centre of the "O" on this version of BBC Basic so the collision detection didn't work. What I did to get around this was define char 224 an O character to match the BBC Micro O.

I really take my hat off to you - the game is ingenious, and it's only when you try and take something like this to bits you realise just how clever it is.
Attachments
OUTBREA.txt
Outbreak for BBCSDL
(4.51 KiB) Downloaded 90 times
User avatar
0xC0DE
Posts: 1305
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Breakout clone in 10 lines of BBC BASIC (max 80 chars per line)

Post by 0xC0DE »

Thanks! And great to see what is basically the reverse process of me getting the game down to 10 (short) lines of BASIC :mrgreen:
You even spotted the statement that I removed in the final version (ball_y=5). It is indeed unneccesary.
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
Kecske Bak
Posts: 753
Joined: Wed Jul 13, 2005 8:03 am
Location: Mélykút, Hungary
Contact:

Re: Breakout clone in 10 lines of BBC BASIC (max 80 chars per line)

Post by Kecske Bak »

One of the most interesting things I found in your listing was how you had to move some bits of code out of what might be the most obvious order to put them in, so that you could keep the lines within the character limit. It's a really remarkable little program!
User avatar
marcusjambler
Posts: 1150
Joined: Mon May 22, 2017 12:20 pm
Location: Bradford
Contact:

Re: Breakout clone in 10 lines of BBC BASIC (max 80 chars per line)

Post by marcusjambler »

Very impressive game coding :D
Hope it wins!!
Deleted User 9295

Re: Breakout clone in 10 lines of BBC BASIC (max 80 chars per line)

Post by Deleted User 9295 »

Kecske Bak wrote: Sun Feb 28, 2021 5:48 pmIt was interesting as the centre of the "O" character is not in the centre of the "O" on this version of BBC Basic
Characters are 7 pixels wide in an 8-pixel-wide cell. I think the original BBC Micro's characters were 'right justified', i.e. they have a gap on the left but not on the right. I chose to make mine 'left-justified', with the gap on the right, so they are shifted left by one pixel. I think the main reason was to demonstrate that I had not simply reproduced the BBC Micro's character set, which is protected by Copyright.

Copyright is already a tricky issue for emulators, so using the original Acorn character set probably isn't a big deal for them. But in the case of BBC BASIC for Windows and BBC BASIC for SDL 2.0 I needed to be ultra careful in respect of IPR. Whether in practice the one-pixel shift helps I don't know, but it shows I thought about the issue.
User avatar
lurkio
Posts: 4351
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Breakout clone in 10 lines of BBC BASIC (max 80 chars per line)

Post by lurkio »

0xC0DE wrote: Sat Feb 20, 2021 1:54 pm
lurkio wrote: Sat Feb 20, 2021 11:04 am You don't seem to be on the list of entrants..?
Need to finish the accompanying required documentation!
Congratulations!

https://gkanold.wixsite.com/homeputerium/results-2021

=D> =D> =D>
User avatar
0xC0DE
Posts: 1305
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Breakout clone in 10 lines of BBC BASIC (max 80 chars per line)

Post by 0xC0DE »

lurkio wrote: Sat Apr 24, 2021 4:11 pm
0xC0DE wrote: Sat Feb 20, 2021 1:54 pm
lurkio wrote: Sat Feb 20, 2021 11:04 am You don't seem to be on the list of entrants..?
Need to finish the accompanying required documentation!
Congratulations!

https://gkanold.wixsite.com/homeputerium/results-2021

=D> =D> =D>
Thank you! I'm pretty proud of my 4th place in the PUR-80 category :D
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
lurkio
Posts: 4351
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Breakout clone in 10 lines of BBC BASIC (max 80 chars per line)

Post by lurkio »

0xC0DE wrote: Sat Apr 24, 2021 5:31 pm I'm pretty proud of my 4th place in the PUR-80 category :D
You woz robbed! :D

Seriously, though, Outbreak is fantastic!

Incidentally, The Children, which won the "EXTREM-256" category is another cracking little game (once you get the convoluted emulation setup right!). Would be great to see a Beeb port of it...

:idea:
User avatar
0xC0DE
Posts: 1305
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Breakout clone in 10 lines of BBC BASIC (max 80 chars per line)

Post by 0xC0DE »

:mrgreen: :mrgreen:
Honestly, I haven't looked at many of the other programs. There is a lot to learn from these for sure!
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
Post Reply

Return to “miscellaneous new bbc and electron games”