AtariAge Forums: Atari 2600 BASIC compiler is here! - AtariAge Forums

Jump to content

  • (18 Pages)
  • +
  • « First
  • 11
  • 12
  • 13
  • 14
  • 15
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Atari 2600 BASIC compiler is here!

User is offline batari Icon
Posted Tue Jul 19, 2005 2:11 PM


  • Icon
  • River Patroller
  • PM this member
  • View blog
  • View gallery
  • Posts: 4,845
  • Joined: 20-September 04

s0c7, on Tue Jul 19, 2005 1:12 PM, said:

batari, on Tue Jul 19, 2005 3:29 AM, said:

Just got a chance to look at your code... I think I answered the wrong question before, as the scrolling into the score was a bug in Alpha 0.1.  This has been fixed in Alpha 0.2, so removing the rem in line 80 scrolls properly.  The code needed to be fixed up a bit to compile in Alpha 0.2, since inline asm needs to be indented now.
View Post


Ok, thanks for looking at it. Just d/l'd the latest, greatest and yes that did fix my scrolling issue. Was going to stick in another couple of quick changes and post a new source, but I've run into another issue. I can't get score to decrement properly. score = score - 1 yields 67.

Just to see if it was my program, I changed the following lines in your sample.bas

60 if joy0up then score = score + 1
80 if joy0down then score = score - 1

Hit up a couple of times, then hit down.
View Post

You're right - it's a bug in the compiler. This had been added to the todo list for Alpha 0.3.
0

User is offline s0c7 Icon
Posted Tue Jul 19, 2005 2:49 PM


  • Icon
  • Dragonstomper
  • PM this member
  • View blog
  • Posts: 530
  • Joined: 01-March 05

batari, on Tue Jul 19, 2005 3:11 PM, said:

You're right - it's a bug in the compiler.  This had been added to the todo list for Alpha 0.3.
View Post


Ok. Thanks. I replaced my posted source with a new version that is compatible with the current release (clouds scroll now :) ). I probably won't release another update until the next version of bB comes out.

This post has been edited by s0c7: Tue Jul 19, 2005 2:50 PM

0

User is offline attendo Icon
Posted Tue Jul 19, 2005 3:25 PM


  • Icon
  • Chopper Commander
  • PM this member
  • Posts: 223
  • Joined: 21-May 05
  • Location: nl

batari, on Tue Jul 19, 2005 9:08 PM, said:

attendo, on Tue Jul 19, 2005 6:50 AM, said:

Could you perhaps change it? also a little bit because my ide doesnt work with the files in 2600basic.zip and needs the latest version..

2600basic.zip ( 110.9k ) Number of downloads: 173 <---
batari_basic_alpha2.zip ( 148.74k ) Number of downloads: 10
View Post

Yeah, it doesn't make much sense to continue to have Alpha 0.1 there, so I removed the file.
View Post


Thanks, lol your a very busy man now, phew.

This post has been edited by attendo: Tue Jul 19, 2005 3:26 PM

0

User is offline batari Icon
Posted Tue Jul 19, 2005 3:29 PM


  • Icon
  • River Patroller
  • PM this member
  • View blog
  • View gallery
  • Posts: 4,845
  • Joined: 20-September 04

s0c7, on Tue Jul 19, 2005 1:12 PM, said:

Ok, thanks for looking at it.  Just d/l'd the latest, greatest and yes that did fix my scrolling issue.  Was going to stick in another couple of quick changes and post a new source, but I've run into another issue.  I can't get score to decrement properly.  score = score - 1 yields 67.

Just to see if it was my program, I changed the following lines in your sample.bas

60 if joy0up then score = score + 1
80 if joy0down then score = score - 1
View Post

Just thinking out loud... One way to do score=score-1 is score=score+999999. This will work now and also will carry over to later versions.
0

User is offline kisrael Icon
Posted Tue Jul 19, 2005 3:37 PM


  • Icon
  • HMBL 2600 coder
  • PM this member
  • Posts: 3,939
  • Joined: 10-July 02
  • Location: Boston Burbs, MA
Just a note, I will keep an archive of versions, just because at some point we might end up with source code that won't turn into ASM with the updated versions.

batari, if you get the chance, would you be able to put up a list of "likely" and "possible" and "in a perfect world" features for future versions? Or do you think it might make people too crazy if they don't see or end up getting their favorite features? In particular, I'm wondering about aliases for the A-Z variables and being able to ditch line numbers and to label subroutines with names rather than numbers...

Man, I forgot how brutal old school BASIC was...in some ways worse than DASM! There's that famous "GOTO considered harmful" where that one guy thought if a student leans BASIC first, they may be broken for life as a programmer...I know enough programming now that I can compensate (I think) by making myself follow certain patterns, putting everything in subroutines and using comments, but still

(I don't mean to sound ungrateful Batari! It's no coincidence that bB is getting me to FINALLY start coding some projects I've been toying with for a long time...)
0

User is offline vdub_bobby Icon
Posted Tue Jul 19, 2005 3:52 PM

    • Boom bam.


  • Icon
  • Quadrunner
  • PM this member
  • View blog
  • Posts: 5,750
  • Joined: 24-November 04
  • Location: Seattle, WA
Incidentally, batari, if you want me to write a kernel for you, just let me know - I'd be happy to. Just tell me what it should do and I'll code it (and actually test it, :lol:). If you want to write 'em, cool; I just wanted to get the offer on the table.
0

User is offline s0c7 Icon
Posted Tue Jul 19, 2005 4:42 PM


  • Icon
  • Dragonstomper
  • PM this member
  • View blog
  • Posts: 530
  • Joined: 01-March 05

batari, on Tue Jul 19, 2005 4:29 PM, said:

Just thinking out loud... One way to do score=score-1 is score=score+999999.  This will work now and also will carry over to later versions.
View Post


That works as far as the display. I'm also having problems getting score to work correctly in conditional situations. This may be my fault, not sure. Make the following changes to sample.bas to see what I'm talking about. Again, up/down the joystick to increment/decrement the score. The score color doesn't change if it goes over 10. However, if you roll it backwards to 999999 it will change.

35 if score > 10 then scorecolor = 80 : goto 45
60 if joy0up then score = score + 1
80 if joy0down then score = score + 999999
0

User is offline kisrael Icon
Posted Tue Jul 19, 2005 5:32 PM


  • Icon
  • HMBL 2600 coder
  • PM this member
  • Posts: 3,939
  • Joined: 10-July 02
  • Location: Boston Burbs, MA

vdub_bobby, on Tue Jul 19, 2005 2:52 PM, said:

Incidentally, batari, if you want me to write a kernel for you, just let me know - I'd be happy to.  Just tell me what it should do and I'll code it (and actually test it, :lol:).  If you want to write 'em, cool; I just wanted to get the offer on the table.

Hey, are you gonna do requests? ;-)

Actually there's an interesting challenge here. Batari should consider writing up a quick standards doc for kernals--ideally they should use as much of the same variables (in terms of positioning things) as is feasible, given the feature layout of the given kernal.

I'd love to see that kernal that lets you read in a background from "DATA" like statements.....
0

User is offline batari Icon
Posted Tue Jul 19, 2005 5:32 PM


  • Icon
  • River Patroller
  • PM this member
  • View blog
  • View gallery
  • Posts: 4,845
  • Joined: 20-September 04

s0c7, on Tue Jul 19, 2005 5:42 PM, said:

batari, on Tue Jul 19, 2005 4:29 PM, said:

Just thinking out loud... One way to do score=score-1 is score=score+999999.  This will work now and also will carry over to later versions.
View Post


That works as far as the display. I'm also having problems getting score to work correctly in conditional situations. This may be my fault, not sure. Make the following changes to sample.bas to see what I'm talking about. Again, up/down the joystick to increment/decrement the score. The score color doesn't change if it goes over 10. However, if you roll it backwards to 999999 it will change.

35 if score > 10 then scorecolor = 80 : goto 45
60 if joy0up then score = score + 1
80 if joy0down then score = score + 999999
View Post

Right now, using the score in an if-then won't work as you expect... Instead, accessing "score" really gives you the BCD value of the highest two digits. You meed to break the score into three individual BCD values by dimming variables, then doing the following checks:

dim scorevalue2=score+2
dim scorevalue1=score+1
dim scorevalue0=score
if scorevalue2>$10 || scorevalue1>1 then scorecolor=80:goto 45
if scorevalue0>1 then scorecolor=80:goto 45

EDIT: OOPS, error in above, left out the "then"

I haven't tried this, but I think it will work.

This post has been edited by batari: Tue Jul 19, 2005 5:52 PM

0

User is offline batari Icon
Posted Tue Jul 19, 2005 5:37 PM


  • Icon
  • River Patroller
  • PM this member
  • View blog
  • View gallery
  • Posts: 4,845
  • Joined: 20-September 04

kisrael, on Tue Jul 19, 2005 4:37 PM, said:

batari, if you get the chance, would you be able to put up a list of "likely" and "possible" and "in a perfect world" features for future versions? Or do you think it might make people too crazy if they don't see or end up getting their favorite features?  In particular, I'm wondering about aliases for the A-Z variables and being able to ditch line numbers and to label subroutines with names rather than numbers...
View Post

You must be too busy to read the README :D
Aliases: already in Alpha 0.2
Linenumbers: now optional in Alpha 0.2
Labels: now allowed, but also optional in Alpha 0.2

But yeah, I think such a list would be helpful.
0

User is offline batari Icon
Posted Tue Jul 19, 2005 5:38 PM


  • Icon
  • River Patroller
  • PM this member
  • View blog
  • View gallery
  • Posts: 4,845
  • Joined: 20-September 04

vdub_bobby, on Tue Jul 19, 2005 4:52 PM, said:

Incidentally, batari, if you want me to write a kernel for you, just let me know - I'd be happy to.  Just tell me what it should do and I'll code it (and actually test it, :lol:).  If you want to write 'em, cool; I just wanted to get the offer on the table.
View Post

:cool: I'll PM you with particulars later tonight... I don't want to announce anything publicly until we have something workable.
0

User is offline yuppicide Icon
Posted Tue Jul 19, 2005 5:45 PM


  • Icon
  • I am the Black Knight. Give me your money!
  • PM this member
  • View blog
  • View gallery
  • Posts: 5,276
  • Joined: 02-December 04
  • Location: New Jersey
I suggested once this gets more polished we contact Retro Gamer about putting in some programs people can type in themselves like back in the old days.

skeezix, on Fri Jul 15, 2005 2:25 PM, said:

Anyone talked to Retro Gamer about this yet? :)

jeff
View Post

0

User is online Jess Ragan Icon
Posted Tue Jul 19, 2005 6:09 PM

    • He is Franz Kafka


  • Icon
  • A Warrior of Words Taking A Stand
  • PM this member
  • Posts: 7,355
  • Joined: 20-August 01
  • Location: MI

batari, on Tue Jul 19, 2005 8:04 PM, said:

Yep, Potatohead is right - the compiler currently doesn't like -1.  Just replace -1 with 255, and it will compile and work how you want it to.  No need to define player 1.
View Post


Yep, that did the trick. Can't imagine the logic behind this, but hey, if it works, it works!

Thanks for the advice. I'll tweak this a little more and see what happens.

JR
0

User is offline batari Icon
Posted Tue Jul 19, 2005 6:17 PM


  • Icon
  • River Patroller
  • PM this member
  • View blog
  • View gallery
  • Posts: 4,845
  • Joined: 20-September 04

Jess Ragan, on Tue Jul 19, 2005 7:09 PM, said:

batari, on Tue Jul 19, 2005 8:04 PM, said:

Yep, Potatohead is right - the compiler currently doesn't like -1.  Just replace -1 with 255, and it will compile and work how you want it to.  No need to define player 1.
View Post


Yep, that did the trick. Can't imagine the logic behind this, but hey, if it works, it works!
View Post

For an explanation, read the section on negative numbers here:

http://alienbill.com...s/0.2/help.html
0

User is online Jess Ragan Icon
Posted Tue Jul 19, 2005 6:35 PM

    • He is Franz Kafka


  • Icon
  • A Warrior of Words Taking A Stand
  • PM this member
  • Posts: 7,355
  • Joined: 20-August 01
  • Location: MI
Look at me! I'm flyin', I'm flyin'!

By the way, Player0 will not work as part of an IF/THEN statement. HOWEVER, you can use IF/THEN statements to skip over the shapes you don't wish to use, thus creating limited animation.

I have an idea for a video game which may just be possible with Batari BASIC. With some clever programming and a little flicker, I may be able to draw out every onscreen character, with a minimum of those chunky blocks.

JR

Attached File(s)


This post has been edited by Jess Ragan: Tue Jul 19, 2005 7:18 PM

0

User is offline kisrael Icon
Posted Tue Jul 19, 2005 6:58 PM


  • Icon
  • HMBL 2600 coder
  • PM this member
  • Posts: 3,939
  • Joined: 10-July 02
  • Location: Boston Burbs, MA
I seem to be getting a lot of bogus
Max. nested gosubs exceeded in line 65
As far as I can tell I'm not nesting ANY gosubs....just a series of gosubs with each sub returning once it's done... any idea?
0

User is online Jess Ragan Icon
Posted Tue Jul 19, 2005 7:40 PM

    • He is Franz Kafka


  • Icon
  • A Warrior of Words Taking A Stand
  • PM this member
  • Posts: 7,355
  • Joined: 20-August 01
  • Location: MI
I'm kickin' it into overdrive with this one!
(Bonus points for anyone who can name the game that inspired this demo)

JR

Attached File(s)


0

User is offline batari Icon
Posted Tue Jul 19, 2005 8:00 PM


  • Icon
  • River Patroller
  • PM this member
  • View blog
  • View gallery
  • Posts: 4,845
  • Joined: 20-September 04

kisrael, on Tue Jul 19, 2005 7:58 PM, said:

I seem to be getting a lot of bogus
Max. nested gosubs exceeded in line 65
As far as I can tell I'm not nesting ANY gosubs....just a series of gosubs with each sub returning once it's done... any idea?
View Post

Yes, it's bogus, caused by fuzzy thinking on my calculation nested gosubs.

Until I fix, a workaround would be to stick inline asm in there:

gosub subroutine

would become

asm
jsr subroutine
end

This should work, and bypass the incorrect checking for nested gosubs.

This post has been edited by batari: Tue Jul 19, 2005 8:01 PM

0

User is online Jess Ragan Icon
Posted Tue Jul 19, 2005 8:50 PM

    • He is Franz Kafka


  • Icon
  • A Warrior of Words Taking A Stand
  • PM this member
  • Posts: 7,355
  • Joined: 20-August 01
  • Location: MI
I've got a question about the score counter. It only seems to count upwards... any attempts to initialize it or count downward with it end in failure. What I'd like to do is split the score counter into two parts; one for the actual score, then another for a countdown timer which would end the game once it reaches zero. Is there any way to do this?

JR
0

User is offline s0c7 Icon
Posted Tue Jul 19, 2005 9:09 PM


  • Icon
  • Dragonstomper
  • PM this member
  • View blog
  • Posts: 530
  • Joined: 01-March 05
I know I said I'd wait until the next release..... :ponder:

Here is the latest version of F-4.
What's new/changes:
- You now start with a score of 3. For every hit, add 1. For every miss, subtract 1. If your score reaches 0, game over.
- You have to use the reset button to start a game (fire won't do it anymore).
- Revamped the source somewhat. Added even more comments.

Big thanks to batari for getting back to me so quick on the questions I posted earlier. I kind of cheated with my solution to the If..Then score issue. :evil:

Still some things I want to do, but this is getting close.


** Update 7/20 - d/l removed. See post 340 for the latest version.

This post has been edited by s0c7: Wed Jul 20, 2005 2:49 PM

0

User is offline batari Icon
Posted Tue Jul 19, 2005 9:28 PM


  • Icon
  • River Patroller
  • PM this member
  • View blog
  • View gallery
  • Posts: 4,845
  • Joined: 20-September 04

Jess Ragan, on Tue Jul 19, 2005 9:50 PM, said:

I've got a question about the score counter.  It only seems to count upwards... any attempts to initialize it or count downward with it end in failure.  What I'd like to do is split the score counter into two parts; one for the actual score, then another for a countdown timer which would end the game once it reaches zero.  Is there any way to do this?

JR
View Post
There's not really any way to do it right now. But later I might allow two 3 digit scores which would allow you to do this.
0

User is online Jess Ragan Icon
Posted Tue Jul 19, 2005 10:06 PM

    • He is Franz Kafka


  • Icon
  • A Warrior of Words Taking A Stand
  • PM this member
  • Posts: 7,355
  • Joined: 20-August 01
  • Location: MI
All right, this is the last version of my demo for the day. With any luck, it will evolve into a full-fledged game in the next few days.

I couldn't get the ship to properly wrap around the screen, so instead I've created boundaries to keep it in check. Now it's time to bring an enemy to this little party...

JR

Attached File(s)


0

User is online Jess Ragan Icon
Posted Tue Jul 19, 2005 10:23 PM

    • He is Franz Kafka


  • Icon
  • A Warrior of Words Taking A Stand
  • PM this member
  • Posts: 7,355
  • Joined: 20-August 01
  • Location: MI

s0c7, on Wed Jul 20, 2005 3:09 AM, said:

I know I said I'd wait until the next release..... :ponder:

Here is the latest version of F-4. 
What's new/changes:
- You now start with a score of 3.  For every hit, add 1.  For every miss, subtract 1.  If your score reaches 0, game over.
- You have to use the reset button to start a game (fire won't do it anymore).
- Revamped the source somewhat.  Added even more comments.

Big thanks to batari for getting back to me so quick on the questions I posted earlier.  I kind of cheated with my solution to the If..Then score issue.  :evil:

Still some things I want to do, but this is getting close.
View Post


Geez, this is seriously impressive. The scrolling screen totally floored me, and you came up with a pretty clever way to subtract points from the score. My only complaint is the random enemy movement... the rival jet looks like it's being flown by a coffee addict. Other than that, you've done a most excellent job!

JR
0

User is offline Tork110 Icon
Posted Tue Jul 19, 2005 11:00 PM


  • Icon
  • Space Invader
  • PM this member
  • Posts: 15
  • Joined: 12-July 05
  • Location: Maryland
Thanks for your help from the other day. I'm getting closer to completing the game I'm working on. My game is basically running around trying to avoid getting hit by falling pf pixels and a bouncing missile. Because I feel that that may not be great by itself, I've been trying to add everything I could think of including animations for when you reach a certain score, music, and hopefully a title screen. The music is giving me the most trouble right now. I guess I should write a quick program to find out what the TIA can do.
0

User is offline kisrael Icon
Posted Wed Jul 20, 2005 12:10 AM


  • Icon
  • HMBL 2600 coder
  • PM this member
  • Posts: 3,939
  • Joined: 10-July 02
  • Location: Boston Burbs, MA
So I've finally got of my butt and MADE something with this great tool. Not a game, more of a toy...plus, I made a Playfield Graphic Editor that some of you may find useful.

The toy name is "NECG DRUMMA v0.1". Screenshot and binary attached I hope. I made extensive use of pfpixel to write the title of the game in the background. It's New England Classic Gamers' own "PacPilgrim" for a simple drum machine: left is bass, right is snare, button is high hat.

The quick and dirty tool I made for that is here: the bBpf Editor. You can use the keyboard to enter Xs and.s to draw the pixels, and it translates them to individual pfpixel calls, with a few formatting option. It's not super-well tested, doesn't warn you if you do something that exceeds what bB can do, but it worked pretty well for me!

I'm including the text of the game here becuase I think it uses some good practices available with the 0.2 Alpha that I haven't heard much talk about: it shuns line numbers, uses descriptive labels for both goto-locations and variable names.

 dim pacMouthTime=a 
 dim voice0vol=b
 dim voice1vol=c
 dim okToReadStick=d

 COLUPF = 90

 player0x = 128 : player0y = 35
 player1x = 127 : player1y = 40

 okToReadStick = 1

setHatGraphic player0:
 %11111111
 %00110100
 %00111100
 %00111100
 %00111100
end

 pfpixel 0 0 on : pfpixel 3 0 on : pfpixel 5 0 on : pfpixel 6 0 on
 pfpixel 7 0 on : pfpixel 10 0 on : pfpixel 11 0 on : pfpixel 14 0 on
 pfpixel 15 0 on : pfpixel 0 1 on : pfpixel 1 1 on : pfpixel 3 1 on
 pfpixel 5 1 on : pfpixel 9 1 on : pfpixel 13 1 on : pfpixel 20 1 on
 pfpixel 22 1 on : pfpixel 26 1 on : pfpixel 27 1 on : pfpixel 28 1 on
 pfpixel 30 1 on : pfpixel 0 2 on : pfpixel 2 2 on : pfpixel 3 2 on
 pfpixel 5 2 on : pfpixel 6 2 on : pfpixel 9 2 on : pfpixel 13 2 on
 pfpixel 15 2 on : pfpixel 16 2 on : pfpixel 20 2 on : pfpixel 22 2 on
 pfpixel 26 2 on : pfpixel 28 2 on : pfpixel 30 2 on : pfpixel 0 3 on
 pfpixel 3 3 on : pfpixel 5 3 on : pfpixel 9 3 on : pfpixel 13 3 on
 pfpixel 16 3 on : pfpixel 21 3 on : pfpixel 24 3 on : pfpixel 26 3 on
 pfpixel 27 3 on : pfpixel 28 3 on : pfpixel 30 3 on : pfpixel 0 4 on
 pfpixel 3 4 on : pfpixel 5 4 on : pfpixel 6 4 on : pfpixel 7 4 on
 pfpixel 10 4 on : pfpixel 11 4 on : pfpixel 14 4 on : pfpixel 15 4 on
 pfpixel 4 6 on : pfpixel 5 6 on : pfpixel 8 6 on : pfpixel 9 6 on
 pfpixel 12 6 on : pfpixel 14 6 on : pfpixel 16 6 on : pfpixel 20 6 on
 pfpixel 22 6 on : pfpixel 26 6 on : pfpixel 29 6 on : pfpixel 4 7 on
 pfpixel 6 7 on : pfpixel 8 7 on : pfpixel 10 7 on : pfpixel 12 7 on
 pfpixel 14 7 on : pfpixel 16 7 on : pfpixel 17 7 on : pfpixel 19 7 on
 pfpixel 20 7 on : pfpixel 22 7 on : pfpixel 23 7 on : pfpixel 25 7 on
 pfpixel 26 7 on : pfpixel 28 7 on : pfpixel 30 7 on : pfpixel 4 8 on
 pfpixel 6 8 on : pfpixel 8 8 on : pfpixel 9 8 on : pfpixel 12 8 on
 pfpixel 14 8 on : pfpixel 16 8 on : pfpixel 18 8 on : pfpixel 20 8 on
 pfpixel 22 8 on : pfpixel 24 8 on : pfpixel 26 8 on : pfpixel 28 8 on
 pfpixel 29 8 on : pfpixel 30 8 on : pfpixel 4 9 on : pfpixel 6 9 on
 pfpixel 8 9 on : pfpixel 10 9 on : pfpixel 12 9 on : pfpixel 14 9 on
 pfpixel 16 9 on : pfpixel 20 9 on : pfpixel 22 9 on : pfpixel 26 9 on
 pfpixel 28 9 on : pfpixel 30 9 on : pfpixel 4 10 on : pfpixel 5 10 on
 pfpixel 8 10 on : pfpixel 10 10 on : pfpixel 12 10 on : pfpixel 13 10 on
 pfpixel 14 10 on : pfpixel 16 10 on : pfpixel 20 10 on : pfpixel 22 10 on
 pfpixel 26 10 on : pfpixel 28 10 on : pfpixel 30 10 on

startLoop

 rem player1x = 127
 player1y = 47


 if okToReadStick = 0 then goto doneStick

 if joy0left then player1x = 117 : voice0vol = 12 : AUDF0 = 30 : AUDC0 = 15 : okToReadStick = 0 : goto doneStick
 if joy0right then player1x = 137 : voice0vol = 8 : AUDF0 = 8 : AUDC0 = 8 : okToReadStick = 0 : goto doneStick


 rem if joy0up then player1y = 20
 rem if joy0down then player1y = 60

doneStick


 if joy0left then goto stickAintClear
 if joy0right then goto stickAintClear
 okToReadStick = 1;
stickAintClear

 if joy0fire then player1y = 37 : voice1vol = 8 : AUDF1 = 0 : AUDC1 = 8

 if voice0vol = 0 then goto doneLowerVoice0
 voice0vol = voice0vol - 1
doneLowerVoice0
 if voice1vol = 0 then goto doneLowerVoice1
 voice1vol = voice1vol - 1
doneLowerVoice1


 AUDV0 = voice0vol
 AUDV1 = voice1vol



 if player1x < 127 then player1x = player1x + 1: REFP1 = 8 : REFP0 = 8
 if player1x > 127 then player1x = player1x - 1: REFP1 = 0 : REFP0 = 0
 if player1y < 47 then player1y = player1y + 1
 if player1y > 47 then player1y = player1y - 1




 player0y = player0y + 5 
 player0x = player0x - 1

 if player0x < player1x then player0x = player0x + 1
 if player0x > player1x then player0x = player0x - 1
 if player0y < player1y then player0y = player0y + 1
 if player0y > player1y then player0y = player0y - 1

 player0y = player0y - 5 
 player0x = player0x + 1


 goto doPacGraphic
returnFromPacGraphic

 COLUP0 = $04 : COLUP1 = $1C
 drawscreen

 goto startLoop



doPacGraphic
 pacMouthTime = pacMouthTime + 1
 if pacMouthTime > 20 then pacMouthTime = 1
 if pacMouthTime > 10 then goto setPacGraphic2
setPacGraphic1 player1:
  %00011000
  %00111100
  %01110000
  %01100000
  %01110000
  %00111100
  %00011000
end
 goto doneSettingPacGraphic
setPacGraphic2 player1:
 %00011000
 %00111100
 %01111110
 %01100000
 %01111110
 %00111100
 %00011000
end
doneSettingPacGraphic
 goto returnFromPacGraphic

 rem X..X.XXX..XX..XX................
 rem XX.X.X...X...X......X.X...XXX.X.
 rem X.XX.XX..X...X.XX...X.X...X.X.X.
 rem X..X.X...X. .X..X....X..X.XXX.X.
 rem X..X.XXX..XX..XX................
 rem ................................
 rem ....XX..XX..X.X.X...X.X...X..X..
 rem ....X.X.X.X.X.X.XX.XX.XX.XX.X.X.
 rem ....X.X.XX..X.X.X.X.X.X.X.X.XXX.
 rem ....X.X.X.X.X.X.X...X.X...X.X.X.
 rem ....XX..X.X.XXX.X...X.X...X.X.X.

Attached image(s)

  • Attached Image

Attached File(s)


0

  • (18 Pages)
  • +
  • « First
  • 11
  • 12
  • 13
  • 14
  • 15
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic


1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users