WIP: Cometfall
Moderator: Moderators
- Kweepa
- Vic 20 Scientist
- Posts: 1315
- Joined: Fri Jan 04, 2008 5:11 pm
- Location: Austin, Texas
- Occupation: Game maker
WIP: Cometfall
A text adventure for the VIC-20 with 16k expansion.
I'm writing this with cc65, and using Huffman compression on the text. Should be done soon-ish!
- orion70
- VICtalian
- Posts: 4341
- Joined: Thu Feb 02, 2006 4:45 am
- Location: Piacenza, Italy
- Occupation: Biologist
Anything that adds to readability is welcome . Another solution would be to add rows/columns keeping the VIC regular characters.
BTW, when playing those adventures in VICE, I use a lower aspect ratio (0.5):
before (0.825)
after (0.5)
This can be adjusted to a certain degree also on real hardware (C= monitors).
I'm playing this, it's very well written. Will post link to a map soon .
BTW, when playing those adventures in VICE, I use a lower aspect ratio (0.5):
before (0.825)
after (0.5)
This can be adjusted to a certain degree also on real hardware (C= monitors).
I'm playing this, it's very well written. Will post link to a map soon .
- Mike
- Herr VC
- Posts: 4845
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
How about using MG BROWSE? You find the source code of the display routines in the archive. This one is fixed-width, however.Kweepa wrote:I was considering this enhancement: [...] Thoughts?
An 8 pixel tall proportional font is most efficiently stored as 1 byte for each column. However, plotting the glyphs then is rather slow, as it has to be done pixelwise. Word wrap shouldn't be too difficult, you'd just have to remember the x-coordinate after the last blank, and copy that part of the bitmap down to the beginning of the next line.
What encoding do you use internally? ASCII or PETSCII?
- Kweepa
- Vic 20 Scientist
- Posts: 1315
- Joined: Fri Jan 04, 2008 5:11 pm
- Location: Austin, Texas
- Occupation: Game maker
I believe Mike has implemented a proportional font for the explanatory text before his spinning cube/dodecahedron demo, although I suppose that could be just a predrawn image.
I didn't want to use MG Browse as I wanted to make it proportional. I also wanted to "design" my own font, which is a width-reduced version of the VIC font. I just took the VIC font and sliced out columns. I think it keeps a nice VIC feel.
Implementation wise, I thought I'd just store it as 8 bytes per character with a separate table for the character width. Since I only have 64 characters that should be more efficient than the code overhead of column-wise rendering.
I'll probably not plot a word until I have decided whether it wraps or not. That's how I'm doing it currently with fixed-width.
I'm using the default cc65 encoding, which I believe is ASCII. I could easily switch to another encoding as all strings are stripped out of the C source by a preprocessor that compresses them.
PS Adjusting the aspect ratio is cheating! Although it does look nice!
I didn't want to use MG Browse as I wanted to make it proportional. I also wanted to "design" my own font, which is a width-reduced version of the VIC font. I just took the VIC font and sliced out columns. I think it keeps a nice VIC feel.
Implementation wise, I thought I'd just store it as 8 bytes per character with a separate table for the character width. Since I only have 64 characters that should be more efficient than the code overhead of column-wise rendering.
I'll probably not plot a word until I have decided whether it wraps or not. That's how I'm doing it currently with fixed-width.
I'm using the default cc65 encoding, which I believe is ASCII. I could easily switch to another encoding as all strings are stripped out of the C source by a preprocessor that compresses them.
PS Adjusting the aspect ratio is cheating! Although it does look nice!
And suddenly LONGSCREEN does not seem so silly anymore. I still wouldn't turn my monitor sideways though...orion70 wrote:Anything that adds to readability is welcome . Another solution would be to add rows/columns keeping the VIC regular characters.
BTW, when playing those adventures in VICE, I use a lower aspect ratio (0.5)
- Mike
- Herr VC
- Posts: 4845
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
It is a predrawn MG picture. One nicety though: the display routine built into every MG picture serves to initialise the hires screen for the demo as well.Kweepa wrote:a proportional font for the explanatory text [...], although I suppose that could be just a predrawn image.
The font currently 'lives' on Acorn RISC OS, of 15 pixels height and derived from MS Sans Serif. I toyed with the idea to port it to the VIC-20 already some time ago.
As you please.I didn't want to use MG Browse as I wanted to make it proportional. I also wanted to "design" my own font, which is a width-reduced version of the VIC font.
I find it more interesting to write programs for the VIC-20 that don't give away on the first glimpse of a screen shot that they're running on a VIC-20.I just took the VIC font and sliced out columns. I think it keeps a nice VIC feel.
- orion70
- VICtalian
- Posts: 4341
- Joined: Thu Feb 02, 2006 4:45 am
- Location: Piacenza, Italy
- Occupation: Biologist
Jeff, the game is very good indeed, and it definitely deserves a try also by those players not accustomed to text adventures. As you progress, you discover complexity, clever puzzles, some coups de théâtre, and even alternate endings (I finished the game twice, with different endings, both negative for me ).
Here's the game map so far. I guess it's far from being complete, but will investigate further .
[try to type KWEEPA ]
Here's the game map so far. I guess it's far from being complete, but will investigate further .
[try to type KWEEPA ]
- Kweepa
- Vic 20 Scientist
- Posts: 1315
- Joined: Fri Jan 04, 2008 5:11 pm
- Location: Austin, Texas
- Occupation: Game maker
Thanks for the kind words!
Here's an (incomplete) beta of the proportional font version:
http://www.kweepa.com/step/vic20/cometfall_propbeta.prg
http://www.mdawson.net/vic20chrome/vic2 ... opbeta.prg
I still need to assemblify the character printing routine, add a flashing cursor, change colours, and parse Y/N type prompts correctly.
Here's an (incomplete) beta of the proportional font version:
http://www.kweepa.com/step/vic20/cometfall_propbeta.prg
http://www.mdawson.net/vic20chrome/vic2 ... opbeta.prg
I still need to assemblify the character printing routine, add a flashing cursor, change colours, and parse Y/N type prompts correctly.
- Mike
- Herr VC
- Posts: 4845
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
I use this routine to initialise the 160x192 hires screen. It also recenters the screen window, on both PAL and NTSC:
The scrolling looks a bit strange, as if the screen was teared in the middle. But maybe it's only VICE that makes it look that way, couldn't test it on real HW thus far ...
Code: Select all
.On
CLC
LDA #$10
TAY
.On_00
STA $0FF0,Y
ADC #$0C
BCC On_01
SBC #$EF
.On_01
INY
BNE On_00
LDY #$05
.On_02
CLC
LDA $EDE4,Y
ADC Offset,Y
STA $9000,Y
DEY
BPL On_02
RTS
.Offset
EQUB $02
EQUB $FE
EQUB $FE
EQUB $EB
EQUB $00
EQUB $0C
... and also add a screen clear routine; a boot loader for a BASIC start at $2001 could also ease the executable from the lot of 0 bytes at the beginning.I still need to assemblify the character printing routine, add a flashing cursor, change colours, and parse Y/N type prompts correctly.
- Kweepa
- Vic 20 Scientist
- Posts: 1315
- Joined: Fri Jan 04, 2008 5:11 pm
- Location: Austin, Texas
- Occupation: Game maker
Thanks Mike, that should save some bytes. (I realise I haven't recentred either )
The screen tear is because the scroll is unrolled once, so it scrolls the left and right at the same time. I agree it's ugly. I might revisit it. Perhaps try scrolling top to bottom rather than left to right (which would be slower, but more aesthetically pleasing). Or perhaps if I just wait for the raster line, but I don't think it's quick enough to fit in the vertical borders.
No, it takes a couple of frames
I'd rather have a single prg than a small file. Perhaps I'll run it through pucrunch to make the load times better.
Here's a screenshot.
The screen tear is because the scroll is unrolled once, so it scrolls the left and right at the same time. I agree it's ugly. I might revisit it. Perhaps try scrolling top to bottom rather than left to right (which would be slower, but more aesthetically pleasing). Or perhaps if I just wait for the raster line, but I don't think it's quick enough to fit in the vertical borders.
Code: Select all
lda #$00
sta $61
lda #$08
sta $63
lda #$11
sta $62
sta $64
lda #$80
sta $65
lda #$88
sta $67
lda #$18
sta $66
sta $68
ldx #10
top:
ldy #0
loop:
lda ($63),y
sta ($61),y
lda ($67),y
sta ($65),y
iny
cpy #184
bne loop
lda #0
loop2:
sta ($61),y
sta ($65),y
iny
cpy #192
bne loop2
clc
lda $61
adc #192
sta $61
lda $62
adc #0
sta $62
lda $63
adc #192
sta $63
lda $64
adc #0
sta $64
lda $65
adc #192
sta $65
lda $66
adc #0
sta $66
lda $67
adc #192
sta $67
lda $68
adc #0
sta $68
dex
bne top
I'd rather have a single prg than a small file. Perhaps I'll run it through pucrunch to make the load times better.
Here's a screenshot.