Jump to content
IGNORED

Ms. Pac-Man Arcade batari Basic game!


Jr. Pac

Recommended Posts

I learned how to use batari Basic, and started a Ms. Pac-Man game, that you need to turn your television on its side so it has the correct layout to play. It is unplayable currently, I just started today. There is just a maze layout and some sprites. I may possibly turn this into Pac-Man, as regular Pac-Man is much simpler and has no maze changes.

jr_pac_2011y_07m_24d_2018t.bas.bin

post-29027-0-28176400-1311567632_thumb.png

Edited by Jr. Pac
  • Like 1
Link to comment
Share on other sites

I can't figure out what's wrong with this, I keep getting a Syntax Error.

Looks like you have 3 problems:

 

1. You have two labels with the same name (draw_loop).

 

2. scorecolor:$0E isn't indented and it should be scorecolor=$0E not scorecolor:$0E

 

3. You have goto jump 4 times in your program, but you don't have a label called jump, so there's nothing to go to.

Edited by Random Terrain
Link to comment
Share on other sites

I don't know how and what to fix. :(

Just look at the code:

 

draw_loop

  COLUP0=$1C
  COLUP1=$42
scorecolor:$0E

  drawscreen

  if joy0up then player0x = player0x+1: goto jump
  if joy0down then player0x = player0x-1: goto jump
  if joy0left then player0y = player0y+1: goto jump
  if joy0right then player0y = player0y-1: goto jump

draw_loop
  drawscreen
  goto sprites

 

 

 

 

Do you see draw_loop? Do you see the other draw_loop? Get rid of it:

 

draw_loop

  COLUP0=$1C
  COLUP1=$42
scorecolor:$0E

  drawscreen

  if joy0up then player0x = player0x+1: goto jump
  if joy0down then player0x = player0x-1: goto jump
  if joy0left then player0y = player0y+1: goto jump
  if joy0right then player0y = player0y-1: goto jump

  drawscreen
  goto sprites

 

 

 

 

Oops, I also see an extra drawscreen that doesn't need to be there. Get rid of it:

 

draw_loop

  COLUP0=$1C
  COLUP1=$42
scorecolor:$0E

  drawscreen

  if joy0up then player0x = player0x+1: goto jump
  if joy0down then player0x = player0x-1: goto jump
  if joy0left then player0y = player0y+1: goto jump
  if joy0right then player0y = player0y-1: goto jump

  goto sprites

 

 

 

 

Do you see scorecolor:$0E? Change it to scorecolor=$0E and indent it:

 

draw_loop

  COLUP0=$1C
  COLUP1=$42
  scorecolor=$0E

  drawscreen

  if joy0up then player0x = player0x+1: goto jump
  if joy0down then player0x = player0x-1: goto jump
  if joy0left then player0y = player0y+1: goto jump
  if joy0right then player0y = player0y-1: goto jump

  goto sprites

 

 

 

 

Do you see goto jump used 4 times? I assume it's there so the player can only go in one of 4 directions at a time. You need to add a label or you'll get an error since there is nothing to jump to:

 

draw_loop

  COLUP0=$1C
  COLUP1=$42
  scorecolor=$0E

  drawscreen

  if joy0up then player0x = player0x+1: goto Skip_J0
  if joy0down then player0x = player0x-1: goto Skip_J0
  if joy0left then player0y = player0y+1: goto Skip_J0
  if joy0right then player0y = player0y-1: goto Skip_J0

Skip_J0

  goto sprites

 

I changed jump to Skip_J0.

 

 

 

Do you see goto sprites? Change it to goto Main_Loop and change draw_loop to Main_Loop:

 

Main_Loop

  COLUP0=$1C
  COLUP1=$42
  scorecolor=$0E

  drawscreen

  if joy0up then player0x = player0x+1: goto Skip_J0
  if joy0down then player0x = player0x-1: goto Skip_J0
  if joy0left then player0y = player0y+1: goto Skip_J0
  if joy0right then player0y = player0y-1: goto Skip_J0

Skip_J0

  goto Main_Loop

 

Now it will be clear where your main loop is.

 

 

 

The errors seem to be gone for now:

 

regularpactest_2011y_07m_25d_1325t.bas

Edited by Random Terrain
  • Like 1
Link to comment
Share on other sites

. . . and I don't know how to fix the wall collision detection.

Be sure to check the bB page:

 

http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html

 

I've been slowly adding little example programs. Use the Index on the right side of the page to find the subject you are interested in, click the link, then scroll down to see if there are any example programs for that subject. My example programs are in boxes that look like this:

 

post-13-0-58658900-1311703890_thumb.png

Link to comment
Share on other sites

I don't think you have me the info I need. Try the test and see.

I plan to make more example programs. One will be a simplistic example where you move a guy around a maze. Don't know how much it would help you, but I can start working on it now just in case.

Link to comment
Share on other sites

... Anybody have the answer to the odd controls?

I'm getting close to finishing a Pac-Man-ish example program with a Pac-Man type guy that you can move with the joystick and one enemy moving around a maze (no dots, of course). I hope to be done tonight or some time tomorrow.

Link to comment
Share on other sites

... Anybody have the answer to the odd controls?

I'm getting close to finishing a Pac-Man-ish example program with a Pac-Man type guy that you can move with the joystick and one enemy moving around a maze (no dots, of course). I hope to be done tonight or some time tomorrow.

Phew. Thanks!

Link to comment
Share on other sites

OK, everything seems to be converted properly (to a lower resolution), the Pac-Man style guy is now animated and I finally tracked down a bug that was messing things up. I'll clean up the code and add more REMs, then post the example program in a new thread.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...