VCCC2023: Christmas Challenge
Re: VCCC2023: Christmas Challenge
I only just remembered a couple of hours ago to submit an entry. A few minutes before sending it I realised I'd included a screenshot of an earlier version! Blegh! Had to re-run everything and re-do the screenshots.
I didn't go for a minimalist entry - couldn't seem to get my brain into gear - so went for a wildcard pretty extras version.
I didn't go for a minimalist entry - couldn't seem to get my brain into gear - so went for a wildcard pretty extras version.
Code: Select all
$ bbcbasic
PDP11 BBC BASIC IV Version 0.45
(C) Copyright J.G.Harston 1989,2005-2024
>_
Re: VCCC2023: Christmas Challenge
Ah crap. I've now just thought of an optimisation to remove an IF clause.
Edit: Yep. Saves 12 bytes.
Edit: Yep. Saves 12 bytes.
Code: Select all
$ bbcbasic
PDP11 BBC BASIC IV Version 0.45
(C) Copyright J.G.Harston 1989,2005-2024
>_
- Diminished
- Posts: 1235
- Joined: Fri Dec 08, 2017 9:47 pm
- Contact:
Re: VCCC2023: Christmas Challenge
Well, that's both my entries (sizecoding + wild) sent in, and I'm not happy with either of them.
Re: VCCC2023: Christmas Challenge
I've submitted a couple as well. I don't expect either to be competitive in terms of size, but both are for platforms that nobody submitted last year...
Edit: ... and a third platform just before the deadline, having had an idea over lunch!
Edit: ... and a third platform just before the deadline, having had an idea over lunch!
Last edited by atsampson on Tue Dec 26, 2023 5:07 pm, edited 1 time in total.
- Diminished
- Posts: 1235
- Joined: Fri Dec 08, 2017 9:47 pm
- Contact:
Re: VCCC2023: Christmas Challenge
Logiker graciously gave me an extension to submit my Wild entry, so I'm spending Christmas shouting at BeebasmDiminished wrote: ↑Mon Dec 25, 2023 12:37 am Well, that's both my entries (sizecoding + wild) sent in, and I'm not happy with either of them.
Re: VCCC2023: Christmas Challenge
Well, now the deadline for entering is past, am I OK to say that if you wrote the size of the lookup table I ended up using as a decimal number and doubled it, then read it as a hex number, that was the size of my first effort that I still managed to round down to end with a 0 in one of those bases?
- Diminished
- Posts: 1235
- Joined: Fri Dec 08, 2017 9:47 pm
- Contact:
Re: VCCC2023: Christmas Challenge
Personally I'd prefer it if people waited for Logiker's video in a few days, but last year people started posting their results as soon as the deadline expired (against my protest). So I think I'm going to check out of this thread now.
See you in January.
See you in January.
Re: VCCC2023: Christmas Challenge
Would a compromise be the following : Newer people to this games might feel its hard to participate and talk about their entries / ideas because very quickly the code size reduces. So I suggest entries /ideas above 250bytes can can talked about on the 26th, above 200bytes on the 27th and above 150 bytes on the 28th until the results are announced .
Re: VCCC2023: Christmas Challenge
Hmm, not many takers so far for the greater than 250 bytes solutions. Maybe everyone's done very well this year. If, like me, you've ran out of steam and would like another programming challenge or two to keep you going for a few days, how about the two competition puzzles below, taken from the December 1983 and January 1984 issues of Acorn User respectively? The first one was relatively straightforward for me but the second one is proving a real headscratcher. Multiple simultaneous equations with an eye-watering number of variables. Ouch! Maybe this is more suited to the maths lovers than the programmers or maybe there's a simpler solution aside from brute force algorithms...
[attachment=1]Acorn User Competition Jan84.png[/attachment]
[attachment=0]Acorn User Competition Dec83.png[/attachment]
[attachment=1]Acorn User Competition Jan84.png[/attachment]
[attachment=0]Acorn User Competition Dec83.png[/attachment]
Re: VCCC2023: Christmas Challenge
I could do it by hand I think but not without bringing back horrendous memories of 1st year at Uni
Re: VCCC2023: Christmas Challenge
Sounds like a very good idea.dp11 wrote: ↑Tue Dec 26, 2023 10:19 am Would a compromise be the following : Newer people to this games might feel its hard to participate and talk about their entries / ideas because very quickly the code size reduces. So I suggest entries /ideas above 250bytes can can talked about on the 26th, above 200bytes on the 27th and above 150 bytes on the 28th until the results are announced .
Elk rev 4 & Plus1
BBC B rev 7 & Cumana Disc Drive
BBC micro:bit 1 & 2
RaspberryPi B+ & 3B & Zero
Abit BP6
BBC B rev 7 & Cumana Disc Drive
BBC micro:bit 1 & 2
RaspberryPi B+ & 3B & Zero
Abit BP6
Re: VCCC2023: Christmas Challenge
How are we counting size for BASIC? Just TOP–PAGE?
Re: VCCC2023: Christmas Challenge
Haha oh dear how did I miss that
Re: VCCC2023: Christmas Challenge
I can't wait to be baffled by how small and cunning and weird some of the entries are, I could barely understand some of last years best entries. Fingers crossed that I'm less than double some of the smallest
Re: VCCC2023: Christmas Challenge
Results to be announced Saturday 6pm GMT
Re: VCCC2023: Christmas Challenge
My entry was in assembler on the National SC/MP
https://www.mccrash-racing.co.uk/philg/ ... m#xmas2023
https://www.mccrash-racing.co.uk/philg/ ... m#xmas2023
Re: VCCC2023: Christmas Challenge
I got my pure BBC BASIC, absolutely no bells and whistles vers down to 107 bytes. I'm sure with some extra thought I could have squeezed a bit more, but I've been doing a load of ZX Spectrum coding* over the last week or so.
*Actually, extracting Spectrum Z80 code from lots of projects and tidying them into stand-alone libraries that can be used in other code. I made the mistake of thinking it would be a good idea to optimise the code, and ended up killing some of it. I'd clearly already optimised the code when I originally wrote it.
*Actually, extracting Spectrum Z80 code from lots of projects and tidying them into stand-alone libraries that can be used in other code. I made the mistake of thinking it would be a good idea to optimise the code, and ended up killing some of it. I'd clearly already optimised the code when I originally wrote it.
Code: Select all
$ bbcbasic
PDP11 BBC BASIC IV Version 0.45
(C) Copyright J.G.Harston 1989,2005-2024
>_
Re: VCCC2023: Christmas Challenge
If anyone is interested, the data for the second challenge in fuzzel's post above is:
Code: Select all
100DATA 10,3,2,3,18,15,13,7,15,11,15,7,9,9,23,4688
110DATA 14,24,20,25,23,24,7,1,10,15,9,4,11,13,11,4828
120DATA 9,0,25,3,7,14,5,17,1,13,7,15,4,18,20,4861
130DATA 22,23,12,3,25,19,13,24,14,10,13,20,24,16,10,7097
140DATA 24,8,18,17,22,24,18,25,5,11,18,25,22,21,10,7649
150DATA 15,14,5,20,1,11,7,10,22,24,15,7,8,2,11,4191
160DATA 25,1,22,17,23,23,18,4,17,21,20,2,6,17,22,5970
170DATA 20,17,10,22,16,12,4,11,10,6,8,3,17,13,22,5275
180DATA 4,14,12,23,8,18,20,17,1,15,14,15,2,22,15,5322
190DATA 14,23,6,6,16,19,8,20,23,20,2,18,12,14,25,6172
200DATA 24,2,15,1,13,9,10,17,5,0,14,24,16,18,3,5278
210DATA 25,15,15,15,23,14,18,7,15,13,2,1,0,1,18,3395
220DATA 7,18,10,24,24,15,11,24,5,19,0,22,18,23,8,6133
230DATA 18,2,17,0,19,13,13,23,3,16,14,15,21,20,24,7147
240DATA 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,411
Elk rev 4 & Plus1
BBC B rev 7 & Cumana Disc Drive
BBC micro:bit 1 & 2
RaspberryPi B+ & 3B & Zero
Abit BP6
BBC B rev 7 & Cumana Disc Drive
BBC micro:bit 1 & 2
RaspberryPi B+ & 3B & Zero
Abit BP6
Re: VCCC2023: Christmas Challenge
Is everyone ready to watch the results, then? I haven't felt this excited for about 7 months .....
Here's the annotated version of my entry: https://github.com/JulieMontoya/Random_Beeb_Stuff/tree/main/xmas_comp_2023
Here's the annotated version of my entry: https://github.com/JulieMontoya/Random_Beeb_Stuff/tree/main/xmas_comp_2023
Re: VCCC2023: Christmas Challenge
Looks like I'm first whilst everyone else is watching the results. This is basically a 3 by 3 grid of diamonds so I set up two For / Next loops to draw 9 diamonds from the centre of each. I noticed that each diamond can be drawn from x coordinates of -3 to +3 from the centre of the diamond and that the two y coordinates for each x coordinate could be calculated as +/- (3 minus the absolute value of the x value).
74 bytes in total.
At a later date I may have a go at an assembly language version although having already thought about it I doubt the code would be smaller.
74 bytes in total.
At a later date I may have a go at an assembly language version although having already thought about it I doubt the code would be smaller.
Code: Select all
5FORA=4TO16STEP6:FORB=4TO16STEP6:FORC=-3TO3:D=3-ABS(C):PRINTTAB(A+C,B+D)"*"TAB(A+C,B-D)"*":NEXT:NEXT:NEXT
Re: VCCC2023: Christmas Challenge
I did it in two lines of BBC Basic, no DATA, in 75 bytes:
Clear the screen then run.
Didn't submit though.
Code: Select all
1D=1:FORT=3TO15STEP6:FORS=1TO2:X=T:FORY=1TO19:PRINTTAB(X,Y)"*":IFX=0ORX=18D=-D
2X=X+D:NEXT,,
Didn't submit though.
Elk rev 4 & Plus1
BBC B rev 7 & Cumana Disc Drive
BBC micro:bit 1 & 2
RaspberryPi B+ & 3B & Zero
Abit BP6
BBC B rev 7 & Cumana Disc Drive
BBC micro:bit 1 & 2
RaspberryPi B+ & 3B & Zero
Abit BP6
Re: VCCC2023: Christmas Challenge
You can save two bytes, @fuzzel, by using "NEXT,," instead of "NEXT:NEXT:NEXT". Nice approach, though! Simple and direct.
Re: VCCC2023: Christmas Challenge
133 bytes but it is pretty and twinkly particularly if sped up a bit with a copro.
Code: Select all
1MODE2:VDU23;8202;0;0;0;:X=3:U=1:V=1
2X=X+U:Y=Y+V:VDU17,RND(7),31,X,Y,42:IFX MOD3>0GOTO2ELSEIFX MOD18=0U=-U
3IFY MOD18=0V=-V ELSEV=2*RND(2)-3
4GOTO2
Re: VCCC2023: Christmas Challenge
My 51 byte basic solution with only one variable https://bbcmic.ro/#%7B%22v%22%3A1%2C%22 ... %5Cn%22%7D
- Rich Talbot-Watkins
- Posts: 2054
- Joined: Thu Jan 13, 2005 5:20 pm
- Location: Palma, Mallorca
- Contact:
Re: VCCC2023: Christmas Challenge
I did it in one line of BASIC:
Owlet link (50 bytes)
and later realised I could save another byte by splitting it over two lines and making it a bit more ugly:
Owlet link (49 bytes)
I could probably explain the incremental process that led to that solution in case anyone were interested!
Owlet link (50 bytes)
and later realised I could save another byte by splitting it over two lines and making it a bit more ugly:
Owlet link (49 bytes)
I could probably explain the incremental process that led to that solution in case anyone were interested!
Re: VCCC2023: Christmas Challenge
I'm just amazed by how small the BASIC entries got!
- Diminished
- Posts: 1235
- Joined: Fri Dec 08, 2017 9:47 pm
- Contact:
Re: VCCC2023: Christmas Challenge
Well, my animated wild entry wasn't even shown moving in the results video, which I thought was miserable.
I won't be participating next year.
https://www.youtube.com/watch?v=komh0jJgaP4
I won't be participating next year.
https://www.youtube.com/watch?v=komh0jJgaP4
- BeebMaster
- Posts: 7379
- Joined: Sun Aug 02, 2009 5:59 pm
- Location: Lost in the BeebVault!
- Contact:
Re: VCCC2023: Christmas Challenge
No idea if mine was in there. Here it is anyway.
Code: Select all
10FORC=3TO15STEP6:FORA=9TO21STEP6:FORB=-3TO3:PRINTTAB(A+ABSB,C+B)"*"TAB(A+6-ABSB,C-B)"*":NEXT,,
- flaxcottage
- Posts: 5718
- Joined: Thu Dec 13, 2012 8:46 pm
- Location: Derbyshire
- Contact:
Re: VCCC2023: Christmas Challenge
Respect!Rich Talbot-Watkins wrote: ↑Sat Dec 30, 2023 6:46 pm I did it in one line of BASIC:
Owlet link (50 bytes)