WIP: Cometfall

Discussion, Reviews & High-scores

Moderator: Moderators

User avatar
Mike
Herr VC
Posts: 4843
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Kweepa wrote: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).
That's the routine I use in you-know-where: ;)

Code: Select all

.TScrollUp
 JSR TRange
 LDY y_top
.TScrollUp_00
 LDA $1100+ 0*192+8,Y:STA $1100+ 0*192,Y
 LDA $1100+ 1*192+8,Y:STA $1100+ 1*192,Y
 LDA $1100+ 2*192+8,Y:STA $1100+ 2*192,Y
 LDA $1100+ 3*192+8,Y:STA $1100+ 3*192,Y
 LDA $1100+ 4*192+8,Y:STA $1100+ 4*192,Y
 LDA $1100+ 5*192+8,Y:STA $1100+ 5*192,Y
 LDA $1100+ 6*192+8,Y:STA $1100+ 6*192,Y
 LDA $1100+ 7*192+8,Y:STA $1100+ 7*192,Y
 LDA $1100+ 8*192+8,Y:STA $1100+ 8*192,Y
 LDA $1100+ 9*192+8,Y:STA $1100+ 9*192,Y
 LDA $1100+10*192+8,Y:STA $1100+10*192,Y
 LDA $1100+11*192+8,Y:STA $1100+11*192,Y
 LDA $1100+12*192+8,Y:STA $1100+12*192,Y
 LDA $1100+13*192+8,Y:STA $1100+13*192,Y
 LDA $1100+14*192+8,Y:STA $1100+14*192,Y
 LDA $1100+15*192+8,Y:STA $1100+15*192,Y
 LDA $1100+16*192+8,Y:STA $1100+16*192,Y
 LDA $1100+17*192+8,Y:STA $1100+17*192,Y
 LDA $1100+18*192+8,Y:STA $1100+18*192,Y
 LDA $1100+19*192+8,Y:STA $1100+19*192,Y
 INY:CPY y_bot:BNE TScrollUp_00
 RTS
JSR TRange just fetches y_top and y_bot from the calling SYS statement, for a full screen you'd set y_top=0 and y_bot=184 (or use LDY #0 and CPY #184). With these parameters, the routine just needs some ~35000 cycles, and thus completes in 2 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.
You could pack the two files into a *.d64. Then you have a single file again, a convenient place for the savegame file, and the *.d64 is still small enough when zipped for transfer.
User avatar
Kweepa
Vic 20 Scientist
Posts: 1315
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Post by Kweepa »

Lovely, I'll put that scroll function in! MG has some nice compact (and efficient!) code :)

I'd like to have a version that can be run in an on-line emulator. That's why I'm aiming for a single file. But I see the sense in a D64...
User avatar
tokra
Vic 20 Scientist
Posts: 1124
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Post by tokra »

I'd prefer a single file as well if possible. Just easier to handle than a .d64 and if one wanted to transfer it to tape that would be possible as well. Using pucrunch or exomizer (which I prefer) all those 0-bytes are just happily crunched away :D
User avatar
Kweepa
Vic 20 Scientist
Posts: 1315
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Post by Kweepa »

tokra, I'm trying to use exomizer to crunch the prg, but the docs are rather confusing. Any chance you could give me a working command line? Ta!
User avatar
tokra
Vic 20 Scientist
Posts: 1124
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Post by tokra »

Yes, it's a little tricky. That's why I made my own example after I got it :D

A command line like:

Code: Select all

exomizer sfx 26603 -t52 -n auto.prg
has the following meaning:

sfx = create auto-start-program
26603 = this is the start address of the program after decrunching, eg. SYS26603 (you can use basic instead if you have a BASIC-program)
-t52 = sets decruncher target (52: Commodore Vic20, 32kB memory expansion)
-n = No decrunch effect (the VIC-20 programs are small so you won't even notice)
auto.prg = the program to crunch
User avatar
Kweepa
Vic 20 Scientist
Posts: 1315
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Post by Kweepa »

Ah yes.

Code: Select all

exomizer sfx basic -t52 -ocometfall_xmz.prg cometfall_propbeta.prg
Worked for me.
12.5k after compression!
Thanks!
User avatar
Mike
Herr VC
Posts: 4843
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

Kweepa wrote:MG has some nice compact (and efficient!) code. :)
Thanks! The scroll routine is not a permanent part of MG itself, though. Not all client programs would need a bitmap scroll routine. Rather it is part of the text display library for MG BROWSE, which can be linked to those programs which actually need that functionality. That way, there's no baggage of unused code around (and the MG core is only 1K in size).
rga24
Vic 20 Drifter
Posts: 38
Joined: Thu May 06, 2010 2:26 am

Post by rga24 »

No idea what your memory footprint is, but you could squeeze 168*192 out of the VIC (21*12 in 8*16) if you can put the video matrix at $0200. That uses 252 characters with only 4 spare.
User avatar
Kweepa
Vic 20 Scientist
Posts: 1315
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Post by Kweepa »

Unfortunately the game uses a lot of memory locations in page 2, for file operations and the keyboard buffer for example.
I don't think one extra column is a big deal though. :)
User avatar
Mike
Herr VC
Posts: 4843
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Post by Mike »

rga24 wrote:No idea what your memory footprint is, but you could squeeze 168*192 out of the VIC (21*12 in 8*16) if you can put the video matrix at $0200. That uses 252 characters with only 4 spare.
With a little more trickery, a program like MAXIGRAFIK does a fully bitmapped resolution of 208x256 pixels. However, it should give food for thought, that neither the graphic modes of MAXIGRAFIK, nor fcbpaint, and also not Picasso provide for much more than showing still images. If you're doing dynamic updates of the bitmap as it is being displayed, you're usually better off keeping most of the system area (i.e. the bottom 1K) untouched - at least if your graphics routines are working on application level and not in a demo.
User avatar
darkatx
Vic 20 Afficionado
Posts: 472
Joined: Wed Feb 04, 2009 2:17 pm
Location: Canada

Post by darkatx »

Finally beat the game!
Man this was so much fun - job well done.
Thanks Kweepa! :)
Learning all the time... :)
User avatar
orion70
VICtalian
Posts: 4341
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Post by orion70 »

I can't say the same - well it is fun indeed, but I didn't have time (or brain?) enough to beat it :) . Anyway thanks again for that.
User avatar
Peter
Vic 20 Drifter
Posts: 33
Joined: Fri Sep 02, 2011 1:03 am

Post by Peter »

Great! Cometfall scores 89% in the latest Retro Gamer (issue 101).

Congratulations Kweepa!!! :D
User avatar
Kweepa
Vic 20 Scientist
Posts: 1315
Joined: Fri Jan 04, 2008 5:11 pm
Location: Austin, Texas
Occupation: Game maker

Post by Kweepa »

Awesome news, thanks!
I won't be able to see the review for a while, as it takes about 6 weeks to get to the US.
Any chance of a pic?
User avatar
Peter
Vic 20 Drifter
Posts: 33
Joined: Fri Sep 02, 2011 1:03 am

Post by Peter »

Didn't have a scanner handy, so I took a picture of the review:

Image
Post Reply