| |
Shadow Account closed
Registered: Apr 2002 Posts: 355 |
Event id #2846 : The 256b sprite font compo
<Post edited by moderator on 22/7-2019 11:21>
* The object of the competition is to generate a sprite-font, in 256 bytes or less code.
* The code should be placed at $0900 and up, but no further than $09ff and must end with an RTS.
* The sprites should be placed at $2000-$2fff, so sprite number $80-$bf.
* 64 sprites are viewed, but it is up to the coder to decide how many he want to generate, but to be considered a font, at least the letters A-Z should be present and readable.
* For the other sprites, you can of course generate the appropriate numbers/punctuation characters, or spaceships or whatever, or not generate them at all and spend all your bytes on doing fancier A-Z, it's up to you to decide what will impress the voters most! :)
* Since the code to actually view the sprites would take quite some space, and the competition should not be about that optimizing the viewer code (or who can do the coolest looking viewer) I will provide the code that displays the 64 sprites on screen, it will occupy $0801-$08ff, and will perform a JSR to $0900 where your font generation code should be.
* The viewer has a number of tweakable parameters that are placed on $0810-$0814:
$0810 - $00=Sprites should be singlecolor. $ff=Sprites should be multicolor
$0811 - Bakground and border color.
$0812 - Sprite base color ($d027-$d02e will be set to this)
$0813 - Sprite multicolor1 ($d025 will be set to this)
$0814 - Sprite multicolor2 ($d026 will be set to this)
Simply change these bytes directly in the viewer code (if you compile it) or in the final binary if you use that, they should not be set from you generator code, as this is also not something that should steal your precious space.
* The generator code may *not* depend on A,X,Y holding specific startup values, or memory being initialized to something specific (you may for example not pull data from the viewer code and use etc.).
* The generator code may use ZP and stack (remember that your code is a subroutine that is being called though, so don't destroy the return address!)
* The generator may use memory up to $3fff
* Max three entries per coder
* The deadline for the compo is two months from now, 2019-09-22 at 23:59:59 CET
* Then follows a voting period of two weeks, a snapshot of the CSDb votes at 2019-10-06 at 23:59:59 CET will be the final result. (modedit: fixed date)
* No prizes except eternal glory.
Here's the viewer code for Kick Assembler usage, with a place to put your generator code at the end:
.pc =$0801 "Basic Starter"
:BasicUpstart($0820)
.pc=$0810 "Constants"
multicol:
.byte $00
bgcol:
.byte $06
sprcol:
.byte $0e
sprmcol1:
.byte $00
sprmcol2:
.byte $00
.pc = $0820 "Code"
sei
lda multicol
sta $d01c
lda bgcol
sta $d020
sta $d021
lda sprmcol1
sta $d025
lda sprmcol2
sta $d026
lda sprcol
ldx #$07
!loop:
sta $d027,x
dex
bpl !loop-
ldx #$00
lda #$20
!loop:
sta $0400,x
sta $0500,x
sta $0600,x
sta $0700,x
inx
bne !loop-
lda #$ff
sta $d015
lda #$80
sta $d010
ldx #$07
ldy #$00
lda #$18+44
!loop:
sta $d000,y
clc
adc #29
iny
iny
dex
bpl !loop-
jsr generatefont
lda #$35
sta $01
mainloop:
lda #$2f
sta ycoord
lda #$80
sta spridx
yloop:
lda ycoord
!wait:
cmp $d012
bne !wait-
clc
adc #4
ldx #$07
ldy #$00
!loop:
sta $d001,y
iny
iny
dex
bpl !loop-
ldx #$00
ldy spridx
!loop:
tya
sta $07f8,x
iny
inx
cpx #8
bne !loop-
clc
lda spridx
adc #8
sta spridx
lda ycoord
adc #25
sta ycoord
cmp #$2f+8*25
bne yloop
jmp mainloop
ycoord:
.byte 0
spridx:
.byte 0
.pc=$0900 "Font generation code"
generatefont:
rts
Yes, code is neither pretty nor optimal, but that's not the point here, the pretty code should be written by YOU! :D
If you prefer some other assembler, here's the prebuilt binary for the $0801-$08ff portion:
sprite_font_view_base.prg
Here are some simple examples I've done to prove that it actually works:
Sprites using ROM font scaled to 3x3 pixel size. $0810 params set to : $00,$06,$0e,$00,$00
example1.prg
Exact same font but with multicolor params set (works this way as well!) $0810 params set to : $ff,$0b,$0c,$0f,$0f
example2.prg
|
|
| |
Shadow Account closed
Registered: Apr 2002 Posts: 355 |
A CSDb-related question - what type of release should the entries be set as? "C64 1k intro" perhaps?
Because even if the competing code is less than 256b, the final result .prg with the included viewer will be upwards of 512 byte big. |
| |
Rex
Registered: Sep 2011 Posts: 14 |
There is a typo in your voting period end date. It ends before the compo deadline. |
| |
Shadow Account closed
Registered: Apr 2002 Posts: 355 |
Quote: There is a typo in your voting period end date. It ends before the compo deadline.
AH crap! Yes, it's supposed to be 2019-10-06 of course. Unfortunately I can't edit it now. |
| |
iAN CooG
Registered: May 2002 Posts: 3204 |
Quote: AH crap! Yes, it's supposed to be 2019-10-06 of course. Unfortunately I can't edit it now.
I changed it for you to 6 october |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
Can we still assume that interrupts are already disabled?
(as per comment #13 from Proposal - The sprite font compo!)
I just noticed that Geir's entry starts by disabling CIA interrupts, and was wondering if other ROM based entries can safely skip that step. |
| |
Shadow Account closed
Registered: Apr 2002 Posts: 355 |
Quote: Can we still assume that interrupts are already disabled?
(as per comment #13 from Proposal - The sprite font compo!)
I just noticed that Geir's entry starts by disabling CIA interrupts, and was wondering if other ROM based entries can safely skip that step.
Yes, that was my intention, seems like I forgot to copy that text over to the official rules. |
| |
Rudi
Registered: May 2010 Posts: 126 |
So, the generator code should be less than or equal to 256b, but not the final .prg (or whatever format you use), since you're providing the viewer code? |
| |
Shadow Account closed
Registered: Apr 2002 Posts: 355 |
Quote: So, the generator code should be less than or equal to 256b, but not the final .prg (or whatever format you use), since you're providing the viewer code?
That is correct:
"The end result PRG should not be a 256 byte binary, instead it's the 257 bytes (for viewer code + load address) PLUS your code, so the ending .PRG file may be as big as 513 bytes." this was my summary of it posted in the discussion thread, unfortunately I forgot to copy it into the event description. |
| |
Rudi
Registered: May 2010 Posts: 126 |
|
| |
Slammer
Registered: Feb 2004 Posts: 416 |
I assume its not safe to assume that $2000-$2ffff is filled with anything other than random bytes? |
| |
Shadow Account closed
Registered: Apr 2002 Posts: 355 |
Quote: I assume its not safe to assume that $2000-$2ffff is filled with anything other than random bytes?
That is correct, my "super-secret-verfier" does fill all areas with crap before running, so if your font doesn't look the same as the normal .PRG when run from that, the entry will be set as out-of-compo until fixed. |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
Is it ok to trash locations $00 and $01?
I can shave two bytes off the entry I'm currently working on if that's legal, and the default viewer doesn't appear to care (I'm on 519b at the moment...)
(edit: I've managed to get down to 513b without changing location $00 after all, and I know that other entries already change $01, but it would be interesting to get a rules clarification anyway :) ) |
| |
Shadow Account closed
Registered: Apr 2002 Posts: 355 |
Yeah, I see no reason why you can't trash $00 and $01, I assumed a lot of entries would be switching in the char ROM for example, so that was expected. |
| |
Mixer
Registered: Apr 2008 Posts: 455 |
I wanted to put data from page start but the jsr $0900 rule ruined the plan :( -> plan b |
| |
Digger
Registered: Mar 2005 Posts: 438 |
@Mixer: True, "generatefont" address ought to be somewhat arbitrary within the page. Can you start at $9ff and read backwards? ;-) |
| |
Digger
Registered: Mar 2005 Posts: 438 |
Kernal/BASIC usage is allowed right? Here’s some neat tricks that might be useful http://nurpax.github.io/posts/2019-08-18-dirty-tricks-6502-prog.. |
| |
Oswald
Registered: Apr 2002 Posts: 5095 |
I'd have preferred to have in the rules that the rom font must be explicitly used. Generating a font entirelly from 256b, and out of the existing ROM one is two totally different beast. |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
That would be quite a different competition, Oswald.
Going by the last few comments on the proposal discussion (cf Proposal - The sprite font compo!), part of the point of this one was to pit the two approaches against each other.
I may yet do a ROM based entry next month, will see how I go for time and spoons. |
| |
Oswald
Registered: Apr 2002 Posts: 5095 |
yeah, well next year could have been font generator without using ROM font compo, and this one could have been ROM only. But I was amongst the naysayers, but glad to see creativity finding its way, inspired me too, thinking on something. |
| |
Digger
Registered: Mar 2005 Posts: 438 |
Lil’ bit disappointed with no entry from Cruzer though ;-) |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
Perhaps he's holding off on uploading an epic last minute entry :) |
| |
Shadow Account closed
Registered: Apr 2002 Posts: 355 |
One week left of the compo, some awesome entries already, but there's still time left, so go go go!
Note - midnight on the 22nd is the deadline, but if there is an entry that is released very close to the deadline that does not make it through my verifier, I'll grant a few extra days for that entry to be fixed. |
| |
Shadow Account closed
Registered: Apr 2002 Posts: 355 |
Right now there's approximately 23 hours left until deadline!
If you have an entry that I've missed (ie. not posted a "verification passed" comment on) - please let me know! |
| |
hedning
Registered: Mar 2009 Posts: 4734 |
Successful compo I must say. Congrats! |
| |
Krill
Registered: Apr 2002 Posts: 2982 |
Could have done without that pesky 16K limit. Why? Just... why. =) |
| |
Shadow Account closed
Registered: Apr 2002 Posts: 355 |
Alright, all entries that are in-compo should now be verified and OK as far as I can tell.
Time to vote people, and try to actually use the available numbers so that we get a fair result, not just 10s for everything! ;) |
| |
Digger
Registered: Mar 2005 Posts: 438 |
Would be nice to make a small intro with the winner(s) sprites used in real world context (scroll or DYSP or whatevs). I think Cruzer should code this since he has never delivered his entry! <3 |
| |
Shadow Account closed
Registered: Apr 2002 Posts: 355 |
Quote: Would be nice to make a small intro with the winner(s) sprites used in real world context (scroll or DYSP or whatevs). I think Cruzer should code this since he has never delivered his entry! <3
My plan was actually to make a small result-intro showcasing the top three entries and release as a surprise when the results are in, but now you spoiled it! |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1409 |
Ooh, this one’s going right down to the wire. More voting please, and yes, spread out them numbers, at least until voting is over. |
| |
Mr.Ammo Account closed
Registered: Oct 2002 Posts: 228 |
Only a few more hours. The min number of voters for an entries is 10 and the max number of voters for an entry is 36. Highest CSDb score is 9.71 and the lowest score is 6.71. Highest sum of votes is 350 and the lowest is 74.
These entries can use some more votes!! ;-)
Now go vote!! |
| |
Shadow Account closed
Registered: Apr 2002 Posts: 355 |
And the results are in: Sprite Font Compo Results! |
| |
Mr.Ammo Account closed
Registered: Oct 2002 Posts: 228 |
Some raw numbers for the people who like them. Mind you, the ranking deviates a bit from the ranking Shadow used in Sprite Font Compo Results (rank 15 - 18). I ordered the ranking based on CSDb average and then on the sum of the votes. I added the standard average (sum of votes / voters) to show the difference between the CSDb weighted average and the std. average.
Rank Entry name / Released by CSDb Avg Std. Avg Voters Sum downloads
1) Fontesquieu 256b by Plush 9.71 9.730 37 360 68
2) Foundry 255b by ChristopherJam 9.59 9.594 32 307 110
3) Oldskool Sprite Font 256b by No Name 9.10 8.923 26 232 78
4) Back to Fourteen Segments 256b 9.00 8.929 28 250 116
by ChristopherJam
5) Five by Five 256b by Geir Straume 8.90 8.783 23 202 94
6) Quasar Sprite Font 256b by No Name 8.88 8.889 18 160 39
7) Butt Fat 256b by Elysium 8.79 8.800 25 220 61
8) Faery Times 256b by Aleksi Eeben 8.75 8.714 21 183 58
9) Hello Sun 1092 by Cascade 8.50 8.357 14 117 38
10) Battlezone Font by Mixer 8.40 8.444 18 152 55
11) Joe Petscii + 256b Font by Arise 8.31 8.294 17 141 38
12) Green Phosphor 153b by ccr 8.28 8.200 20 164 96
13) Slim Candy 256b by Geir Straume 8.08 8.071 14 113 32
14) Romulus 1 256b by Camelot 8.00 8.000 18 144 74
15) NotScii V4 by OMG 8.00 8.000 14 112 33
16) Green Behind Ears by Cascade 8.00 7.636 11 84 28
17) Ransom Note 256b by Geir Straume 7.64 7.611 18 137 71
18) Legilize 256b by Viznut 7.64 7.647 17 130 62
19) Crushed Apple Cider by ChristopherJam 7.40 7.364 11 81 27
20) Single Sprite Poop Font by Smasher 6.58 6.400 20 128 89
21) Urban City by Rudi 5.67 5.500 14 77 35
|