New Release: KWEEPOUT
Moderator: Moderators
- Kweepa
- Vic 20 Scientist
- Posts: 1316
- Joined: Fri Jan 04, 2008 5:11 pm
- Location: Austin, Texas
- Occupation: Game maker
New Release: KWEEPOUT
http://www.kweepa.org/step/vic20/kweepout.prg
A version of Breakout (oops!) written in BASIC for the unexpanded VIC.
This was an experiment to see how much I could fit into a BASIC program.
Loosely inspired by this presentation:
http://www.youtube.com/watch?v=Fy0aCDmgnxg
Let me know what you think!
Last edited by Kweepa on Sat Mar 16, 2019 9:43 am, edited 5 times in total.
- Mayhem
- High Bidder
- Posts: 3028
- Joined: Mon May 24, 2004 7:03 am
- Website: http://www.mayhem64.co.uk
- Location: London
Nice one! Always pleasantly surprised by your versatility! Action (Doom), Text Adventure (Cometfall), Jump & Run (Blue Star) and now you even rival the Jeff's BASIC skills!
I managed to finish level one but in level two the screen started going crazy. The blanks in the background were replaced with another char, and after a few minutes even the ball was gone. Probably string-variables creeping into the character definitions (since those are written from the top down). Looks like you did not protect your character-definition by something like
like most programs do.
I managed to finish level one but in level two the screen started going crazy. The blanks in the background were replaced with another char, and after a few minutes even the ball was gone. Probably string-variables creeping into the character definitions (since those are written from the top down). Looks like you did not protect your character-definition by something like
Code: Select all
POKE56,28:CLR
- Kweepa
- Vic 20 Scientist
- Posts: 1316
- Joined: Fri Jan 04, 2008 5:11 pm
- Location: Austin, Texas
- Occupation: Game maker
Gah!
I deliberately didn't do that, because I needed all the space below for the program and variables.
I'm only using one string variable, A$, and during gameplay it's only used to hold the score, so I'm not sure how it keeps growing... Any ideas? There should be 248 bytes free between the space character and the screen.
I deliberately didn't do that, because I needed all the space below for the program and variables.
I'm only using one string variable, A$, and during gameplay it's only used to hold the score, so I'm not sure how it keeps growing... Any ideas? There should be 248 bytes free between the space character and the screen.
Could you use some of that free space to save the score there. Then read it like you would a low byte - high byte. I haven't played the game yet so I'm not sure how high the score can go, but 3 bytes can hold a number over 15 million.
score = peek(byte 1)+peek(byte 2)*256+peek(byte 3)*65536
Of course it will take a bit of memory to calculate.
if byte 1>256 then byte 2 = byte 2 + 1
if byte 2 >256 then byte 3 = byte 3 + 1
score = peek(byte 1)+peek(byte 2)*256+peek(byte 3)*65536
Of course it will take a bit of memory to calculate.
if byte 1>256 then byte 2 = byte 2 + 1
if byte 2 >256 then byte 3 = byte 3 + 1
Rob
I really should get an sd2iec device so I can try these new games that are coming out. A couple of years ago I made it a point to transfer all of the 'New Releases' via USB to 1541 cable. Emulation is fine, but when you have a real hardware setup, you tend to just want to actually play the games on real hardware.
So I'm going to order an sd2iec device right now. Maybe a second one for my C64 as well. I'm sort of tired of always trying to keep track of what game or program is on which disk, etc.
So I'm going to order an sd2iec device right now. Maybe a second one for my C64 as well. I'm sort of tired of always trying to keep track of what game or program is on which disk, etc.
"A slave is one who waits for someone to come and free him." -- Ezra Pound
-
- The Most Noble Order of Denial
- Posts: 343
- Joined: Fri May 01, 2009 4:44 pm
Ah, on my emulator it's immediately broken. Must be because I launch the program by loading it into ram, then sys'ing it.tokra wrote: I managed to finish level one but in level two the screen started going crazy. The blanks in the background were replaced with another char, and after a few minutes even the ball was gone.
http://www.mdawson.net/vic20chrome/vic2 ... neType=pal
Yes, I see the problem. You use:Kweepa wrote:I'm only using one string variable, A$, and during gameplay it's only used to hold the score, so I'm not sure how it keeps growing... Any ideas?
Code: Select all
A$=STR$(K)
Code: Select all
F=FRE(0)
Code: Select all
POKE45,x:POKE46,y:CLR
Also, if you change:
to:
You will save 10 bytes. Unless their is another reason you did it like that.
You can also put the new character data starting at location 7424.
Then:
Your first character defined would have to be a space character, and your custom characters will start with the value 32(space), but it will save 256 bytes. And you still have the regular set when reversed.
Hope that is explained ok.
EDIT:
2 more bytes, you have "thengoto" in lines 63 & 64.
Code: Select all
1 v=36874:fori=.to5:readx:pokev+i,x:next
76 data0,0,0,0,15,14
Code: Select all
1 v=36874:pokev,0:pokev+1,0:pokev+2,0:pokev+3,0:pokev+4,15:pokev+5,14
You can also put the new character data starting at location 7424.
Then:
Code: Select all
poke52,29:poke56,29:clr
Hope that is explained ok.
EDIT:
2 more bytes, you have "thengoto" in lines 63 & 64.
Last edited by GreyGhost on Tue Jun 19, 2012 1:24 pm, edited 1 time in total.
Rob
- Kweepa
- Vic 20 Scientist
- Posts: 1316
- Joined: Fri Jan 04, 2008 5:11 pm
- Location: Austin, Texas
- Occupation: Game maker
Thanks for the detailed analysis!
I had no idea there was lazy garbage collection! You (I) live and learn!
Including the character set definitely goes against my "true" agenda which is a single, type-in-able, file.
For setting the sound and border, unless I'm miscounting, using a loop and data statement (which I combined with existing data) takes 4 bytes less than 6 pokes.
I tried moving the character set further up in memory but without the FRE(0) the definitions got massacred instantly. I know how to fix it now though
THENGOTO? Oops! Amateur hour!
I'll knock up a new version soon.
Oh, and for the emulated version, I realize now that I'm using the space character undefined, so it's liable to end up garbage. In VICE it seemed to be ok.
I had no idea there was lazy garbage collection! You (I) live and learn!
Including the character set definitely goes against my "true" agenda which is a single, type-in-able, file.
For setting the sound and border, unless I'm miscounting, using a loop and data statement (which I combined with existing data) takes 4 bytes less than 6 pokes.
I tried moving the character set further up in memory but without the FRE(0) the definitions got massacred instantly. I know how to fix it now though
THENGOTO? Oops! Amateur hour!
I'll knock up a new version soon.
Oh, and for the emulated version, I realize now that I'm using the space character undefined, so it's liable to end up garbage. In VICE it seemed to be ok.
Opps. guess early morning hours must be to blame. I am getting a different result than I did last night.Kweepa wrote:For setting the sound and border, unless I'm miscounting, using a loop and data statement (which I combined with existing data) takes 4 bytes less than 6 pokes.
Anyway, gratz on getting it working correctly.
Rob