Jump to content
IGNORED

Pac-Man


atari2600land

Recommended Posts

I just made this ROM for fun, making Pac-Man move around the screen. Then I wondered, is something like the Pac-Man game for the 2600 (The first, really bad one) possible with Batari BASIC? Because that would be cool. You could put in different mazes and stuff while keeping the original "charm" of the 2600 Pac-Man game. I don't know why people think the original sucks, other than the graphics & sfx, it's actually kinda cool.

pacman01.bin

pacman01.bas

Edited by atari2600land
Link to comment
Share on other sites

I just made this ROM for fun, making Pac-Man move around the screen. Then I wondered, is something like the Pac-Man game for the 2600 (The first, really bad one) possible with Batari BASIC? Because that would be cool. You could put in different mazes and stuff while keeping the original "charm" of the 2600 Pac-Man game. I don't know why people think the original sucks, other than the graphics & sfx, it's actually kinda cool.

 

 

Any screenshots? :ponder:

Link to comment
Share on other sites

I added a ghost that goes up and down. Only problem is I have no idea why I'm doing this. Hopefully inspiration will take place here soon.

If you're learning from it, then that's a good enough reason for doing it! :) And personally, I think it's a great idea to try to recreate (as much as possible) existing games using bB, to see how far bB can go. And of course you don't need to recreate a game; you could instead create a new game with the same characters but in a different setting, such as (just letting my crazy mind wander here) a kind of cross between Pacman and Mario Bros., or Pacman Pitfall!, or Pacman Pinball, or Pacman Adventure.

 

Michael Rideout

"I finally earned my certification in insanity. I can now command much higher pay for my ideas!"

Link to comment
Share on other sites

I got the ghost to go clockwise around the screen, which made me think of an idea for a title screen. The A & C in Pac-tion are a ghost and Pac-Man. The ghost (A) starts chasing Pac-Man © and they go around the edge of the screen, and an A and C pop up where the ghost and Pac-Man used to be. A few mock-up screenshots are provided. How can I make the P, T, I, O and N letters using Batari BASIC since it only has 2 players (player0 is Pac-Man and player1 is the ghost?)

post-9475-1153980255_thumb.png

post-9475-1153980267_thumb.png

Link to comment
Share on other sites

What a clever idea! :)

 

If you want to spell PAC-TION like that, I think you'll probably need to use a custom kernel that uses a variation on the "score" trick to display 6 players (3 copies of player0, and 3 copies of player1), and update the data for the players very quickly (as in the "score" trick). However, that won't let you change the positions of Pac-Man and the ghost, so to do that you'll probably need to use flickering to display two different frames one after the other. And if you're going to use flickering, you may be able to use player0 and player1 in the standard bB canned kernel without using the "score" trick, especially if you also use the missiles and ball. It might be easier to just use a custom kernel with flickering. It's late, and I have to go to bed real soon, so I can't wrap my fuzzy brain around it right now and give you any further guidance or suggestions. I'm giving myself 20 more minutes before I crash, so try the ideas I mentioned in the "Weird Error" thread and I'll try to help further with that if I can, then I must go to bed.

 

Sorry, I forgot, you want the A and C to show up after Pac-Man and the ghost move. You'll have to use the "score" trick, no doubt about it.

 

Michael Rideout

"I'm so tired, I can't see crooked."

Edited by SeaGtGruff
Link to comment
Share on other sites

Here's what I want Pac-Man and the ghost to do in the title screen. Now all I have to do is add the letters in, which will take up 3 player sprites (since I can't have more than 8 pixels in a sprite)

 

%100

%100

%100

%100

%111

%101

%101

%111

the P

 

%01001001

%01001010

%01001010

%01001010

%01001010

%01001010

%01001010

%11101001

the T, I and half of O

 

%10010001

%01010001

%01010001

%01010001

%01010011

%01010101

%01011001

%10010001

the other half of O and N.

 

And this score trick, does that mean that the score is just 2 digits and 2 copies? And how do I do this?

pacman04.bas.bin

pacman04.bas

Edited by atari2600land
Link to comment
Share on other sites

And this score trick, does that mean that the score is just 2 digits and 2 copies? And how do I do this?

 

Here is my understanding on how the "score" trick works.

 

Take a look at this picture.

 

post-9847-1154029168_thumb.png

 

As you already know each "player" is a max of 8 pixels wide, and there are two players. You may or may not know this but there is a register you can "call" that allows you to make up to 3 copies of players (NUSIZ0 for player 0, NUSIZ1 for player 1). To do this in Batari basic all you have to do is put in a line that looks something like this: NUSIZ0 = $03 which would make 3 close copies of player 0. Try it. What you would need to do to achieve up to a 48 pixel long title screen is, as you can see from the picture, make 3 close copies of both players and line them up so closely that they SEEM to look like one. You may not know this either but the tv "draws" the atari's screen left to right. So what you would need to do then (I think you can only do this in asm, but correct me if i'm wrong) would be as it's "drawing" quickly change the player sprites. That's really all there is to it.

Link to comment
Share on other sites

So if there's 3 close copies of player0 & player1, you can somehow make copies look different before it draws the rest of the screen? And so how would Pac-Man be chasing the ghost if player0 & player1 are Pac-Man and ghost respectively? It wouldn't seem like there would be enough players, unless you can somehow make player0 be Pac-Man and then draw the letter A really quickly with the copies. Man, that sounds complicated. I really would like to see how this all works out. I don't have any ASM programming skills whatsoever. BTW, I know about the TIA register NUSIZ0,1 = $03, as I've used it in Super Maria Sisters.

Link to comment
Share on other sites

It is complicated. It requires you to use VDEL(vertical delay) as a horizontal delay and update the player graphic data while the line is being generated. If your timing is wrong then the graphics won't be displayed correctly.

 

There's an explanation of it in the Stella mailing list - The scores / 48-pixel highres routine explained!

Edited by SpiceWare
Link to comment
Share on other sites

I think this is becoming a little too complicated for me. Maybe I should just spell out PAC-TION with the playfield.

 

I know of an easier way. Try this. Take two sprites and place them side by side.This gives you 16 horizontal pixels to work with. Here's an example.

 

post-9847-1154036575_thumb.png

Link to comment
Share on other sites

So if there's 3 close copies of player0 & player1, you can somehow make copies look different before it draws the rest of the screen? And so how would Pac-Man be chasing the ghost if player0 & player1 are Pac-Man and ghost respectively? It wouldn't seem like there would be enough players, unless you can somehow make player0 be Pac-Man and then draw the letter A really quickly with the copies. Man, that sounds complicated. I really would like to see how this all works out. I don't have any ASM programming skills whatsoever. BTW, I know about the TIA register NUSIZ0,1 = $03, as I've used it in Super Maria Sisters.

You have the gist of it now, I think, especially the quandry-- if you use the "score" trick to spell "PACTION," then how can you also draw Pac-Man and the ghost? One way would be to ensure that they're never on the same scan lines as the "PACTION" game title, but then your idea of using Pac-Man for the C, and the ghost for the A, wouldn't work. So that really leaves only two other possibilities, as I see it:

 

(1) Try to use Pac-Man and the ghost in the title, but have them move out of the title in a vertical direction-- straight up or straight down-- then replace them with the letters C and A, then let them move around the screen, but keep them from ever crossing the lines where the title is. But this has another wrinkle, which is that you can't change the player data and the player color fast enough to do both in the "score" trick.

 

(2) Draw two fields or frames or screens (whatever you want to call them) one after the other, flickering between them. One screen would have the "PACTION" title, and the other screen would have Pac-Man and the ghost chasing each other around the screen. The flickering would make the colors look more washed-out or dimmer, but you would need to use flickering only on the lines where the title is, and then only when Pac-Man and/or the ghost are crossing over those lines.

 

Michael Rideout

Link to comment
Share on other sites

I know of an easier way. Try this. Take two sprites and place them side by side.This gives you 16 horizontal pixels to work with. Here's an example.

 

post-9847-1154036575_thumb.png

I don't think you can spell "PAC-TION" with just 16 pixels, but that idea would be good for doing other (shorter) titles.

 

Michael Rideout

Link to comment
Share on other sites

(2) Draw two fields or frames or screens (whatever you want to call them) one after the other, flickering between them. One screen would have the "PACTION" title, and the other screen would have Pac-Man and the ghost chasing each other around the screen. The flickering would make the colors look more washed-out or dimmer, but you would need to use flickering only on the lines where the title is, and then only when Pac-Man and/or the ghost are crossing over those lines.

 

#2 would be the most satisfying of the 2 choices, but I think I'll just go with the playfield. It was a good idea, though, wasn't it? Anyway, I spelled it out with the playfield, now I just need to know when (and how many times) i should call up drawscreen without getting a flicker. Needless to say, this version has flickering for some reason.

 

EDIT: These are the correct files.

pacman06.bas.bin

pacman06.bas

Edited by atari2600land
Link to comment
Share on other sites

I don't think you can spell "PAC-TION" with just 16 pixels, but that idea would be good for doing other (shorter) titles.

 

It could be spelled vertically quite nicely in 16 pixels, or quite adequately with eight. If using only 8, the other player could be used to show a Pac-Man and ghost.

 

If you use a multi-sprite kernel, the player and ghost could revolve around the "PAC-TION" logo without flicker if a missile was used for the dash and the two sprites crossed paths on the same line as that.

Link to comment
Share on other sites

I think I'll just go with the playfield. It was a good idea, though, wasn't it?

Yes, I thought it was a clever idea!

 

Anyway, I spelled it out with the playfield, now I just need to know when (and how many times) i should call up drawscreen without getting a flicker. Needless to say, this version has flickering for some reason.

It's because you're drawing the playfield each time. I made the same mistake in my first attempts on my "Reventure" game.

 

bB uses both players for the score, so you have to set the player0 and player1 graphics and color each time you go through the loop to draw the screen, otherwise they just get wiped out by the score routine.

 

On the other hand, bB doesn't use the playfield for anything special, so if you set the playfield pixels and the playfield color, they stay the way you set them until you change them. Thus, you can draw the title with the playfield pixels just once, before you get into the loop, and it will stay there. If you try to draw the playfield inside the loop, you'll tend to get flickering, because the routines the draw the playfield (pfpixel, pfvline, and pfhline) take up a lot of machine cycles.

 

I'm attaching a corrected version of your code, which now runs the way it should. :)

 

Michael Rideout

pacman06a.bas

pacman06a.bas.bin

Link to comment
Share on other sites

Thank you, Mike! :cool:

This is going to be a Pac-Man-themed Fast Food-type game. Basically, dots (missile0) and ghosts (player1) are going to move left towards Pac-Man and he can eat the dots but avoid the ghosts. Every 20 dots he eats, though, a power pellet comes along and if he eats that, he can eat the ghosts for 20 seconds or so. Boy, have I got a lot of coding to do for this one, eh? I'll post questions here if I get stuck.

Link to comment
Share on other sites

Here's an updated version, the beginning of the actual gameplay. I need some help in a couple of places.

I'd like a dot to be on screen going left at the same time as a ghost. I think my trouble is in line 3200, so I put rem: help! there.

Also, I'd like the big dot that enables you to eat the ghosts for a limited time gone once it reaches x=20, and I put rem:help! on line 3202 because I think that's where the problem lies. For both these problems, you'll probably have to look at lines 3100-3221. I also posted a binary file so people can check out the very early stages of the game. The collisions haven't been entered yet, so there's no penalties, no score, and not really a point, either. But, just in case you wanted to look at what I'm doing, I'm posting it.

pacman07.bas.bin

pacman07.bas

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...