so based on a conversation from another thread, I decided to do an implementation of the one line program :
10 PRINT CHR$(205.5+RND(1)); : GOTO 10
now i'm a hobbyist programer at best, so I pose the challenge to the community, what's the smallest program you can write to recreate this effect?
this is my effort - using sprites and in 50 tokens
there's no way to print unicode characters is there?
edit: oh yeah! and my original idea for getting the program in the smallest space was to use poke() to draw a character directly to the screen, but my technical knowledge failed me on that point
Some sprite variants:
Version A (36 tokens):
Version B (36 tokens):
Version C (49 tokens):
Real Smooth scrolling
I claim no expertise in writing super-laconic code.
This is so not in my wheelhouse, but I love the idea of it and am curious if folks come up with any other clever hacks. I'm mostly coming up with little ideas that are worse:
I was able to cleverly add a few characters to YellowAfterlife's 36 char solution by replacing T%128 with BAND(T,127) -- at least it's more cryptic that way!
What if we give SPR() fewer parameters? We can call SPR(RND(2)) and skip those x and y coordinate params entirely, since it'll supply 0,0 by default! As long as we precede that with a call to CAMERA() that includes the parameters instead plus some extra char overhead. Woo!
The map! The map uses 8:1 pixel ratios! That means we can use smaller numbers! 128 becomes 16, that's a whole character less, and we can do that twice! And also spend a bunch of extra characters since we have to call both mset and map, and feed map the params 0,0,0,0,16,16 just to get it those 16s and paint the whole screen. Also, RND(2) needs to become RND(2)+1 and we offset the sprites by a position, since map() treats 0 values specially as blank tiles.
Replace integer constants with a short variable name! 16 shows up five times in the map/mset variant, with the three 16s in the math and the two in the map() call, so lets replace all five with "S" and do S=16 and come out exactly one character better than before!
- S is a really great looking letter, let's use that more. T=0? More like T=S-S. T+=1? No, T+=S/S. RND(2)+1? Meet my good friend RND(S+S)/S+S/S.
[Please log in to post a comment]