Jump to content
IGNORED

A New twist on Pac Man?


1980gamer

Recommended Posts

That's the screen timeout happening - if no key is pressed, the screen blanks (I always hit this one, even Mr Chin triggered it ;) ). You can prevent it from happening by setting >83D7 to an odd number -- but every time a key is pressed it will be reset again. The safest way in XB is probably to set >83D6 to 0 in your main loop (so keep resetting it). Not sure if the compiler supports CALL LOAD, but CALL LOAD(-31786,0) should work.

 

Interestingly... I notice that the XB interpreter resets the counter to zero by itself except when waiting for input, so that made it hard to test that this was the right address. It also means that XB programs never blank unless waiting at an INPUT or an ACCEPT?

Yep, it's just as Tursi says. (It usually is!!) XB and BASIC reset the counter automatically when they execute any program statement. In assembly language, pressing a key resets the timer but scanning the joystick does not reset it. You can see this in Alpiner using Classic 99's debugger. Tursi's fix will cure it for now-I will change the compiler to reflect XB behavior when I get a chance.

Link to comment
Share on other sites

Hi Gene: Just played mirror maze and found a difference between this one and the earlier one. In the new version, when you go through the tunnel does not come out properly mirrored. That is to say, the joystick controls are not reversed - left is still left, right is still right, etc. That's different from before. A neat touch would be to reflect the position of the ghosts on the mirror side. If they are on the right on the normal side they could be on the left on the mirror side. Of course this will only work if the maze is symmetrical.

BTW, I'm about to take a look at your keyboard problems.

(EDIT) Well, I can't duplicate this behavior - played a couple more times and the motion is correct. Hmm. Anyway, I still think the ghosts should be mirrored; if a ghost follows you into a tunnel it will always get you when you come out on the other side.

Edited by senior_falcon
Link to comment
Share on other sites

Hi Gene: Just played mirror maze and found a difference between this one and the earlier one. In the new version, when you go through the tunnel does not come out properly mirrored. That is to say, the joystick controls are not reversed - left is still left, right is still right, etc. That's different from before. A neat touch would be to reflect the position of the ghosts on the mirror side. If they are on the right on the normal side they could be on the left on the mirror side. Of course this will only work if the maze is symmetrical.

BTW, I'm about to take a look at your keyboard problems.

(EDIT) Well, I can't duplicate this behavior - played a couple more times and the motion is correct. Hmm. Anyway, I still think the ghosts should be mirrored; if a ghost follows you into a tunnel it will always get you when you come out on the other side.

Hi Harry,

The blanking issue seems to be fixed. Still have the input issue....But this is a hidden SHIFT 838 type thing, so no big deal, but would be helpful in trouble shooting.

Joystick control... I have it set up to use joystick 1 and 2.

I think Joystick 1, left is always left, right is always right. Joystick 2, left and right get reversed in "MIRROR MODE"

I actually play on the laptop keyboard and with the arrow keys as joystick 1 and esdx for the original control.

This lets me go thru the tunnel and jump to the other side of the screen, or "flip" the screen to stay on the same side of the screen but change modes.

It is totally cheating, but it lets me test higher levels without changing starting levels in code ( this is where the input fix would let me change starting screen, number of ghosts etc. )

 

So, try the other joystick and let me know if it works as you thought it would.

 

Mirroring the ghosts? Yeah, that "could" work. The mazes are not exactly the same on each side...

Well, they are... But a "junction" could allow a ghost to go up/down and right. But on the other side of the screen that is left to right,

the options would be up/down and left.

 

Thus, I would have to STOP ghost movement when pacman goes through the tunnel.

Then re-calc possible directions.

 

This is easy enough, but I have a play rule ( in my mind ) that a ghost will never reverse direction.

upon direction re-calc, the ghost could choose the reverse direction. This would be for all ghosts, not only at junctions.

 

It is not the end of the world... Or I could add variables to hold "old direction" for each ghost.

I currently save x,y direction value for each ghost, when they reach a junction, I calc the possible directions...less the reverse direction they are currently going.

This gives the ghosts smooth movement around the maze and some "stupidity" If you chase a ghost, you are pretty safe.

Though you move faster than the ghost, so pause a little.

 

Hmmm, what is the reverse position? center of the maze left/right so say 12 is the middle, if the ghost is at column 5, it would be jumped to column 17.

That is easy enough... actually, this is very doable..

change x,y direction with *-1

 

Wow, I wish the 12,5,17 thing was actual, but it is pixel position, but should be the same math, I just don't know the real numbers to use yet.

 

Okay, I am tired and rambling. But I may try to make a 2.0 version with your suggestions.

 

Every time I think I am done.....Something new to add! No fruit! I don't have any chars left for them! ( not really true I guess )

 

Good night.

Gene

Link to comment
Share on other sites

Okay Harry,

Here is a special version for you!

The ghosts now flip position on the maze when pacman goes thru a tunnel.

 

After over complicating it.... This was all I needed to add.

3871 FOR GC=1 TO 4
3872 CALL POSITION(#(GC)+1,GX(GC),GY(GC))
3874 NL=14+(13-INT((GY(GC)+7)/8)) :: GY(GC)=(NL* 8)-7 ::CALL LOCATE(#GC+1,GX(GC),GY(GC))
3876 YG(GC)=YG(GC)*-1
3878 NEXT GC

I tried to do all of line 3874 in just the call locate... But I was having trouble getting it to work right.

So I broke out the pieces to what you see now. It still didn't work. Forgot the +1 on the #GC+1.

I haven't put the formula back into the locate and I don't think I need to. It works. Don't fix what is not broken.

 

Let me know if this is what you had in mind?

 

Gene

 

 

MODE-C.zip

Link to comment
Share on other sites

That seems closer. There is one bug in the code. If you are playing with the ESDX keys the left/right controls are reversed on the flip side of the maze. If you are using the joysticks (or at least the numeric keypad in Classic99) the controls are not reversed on the flip side, and when you enter a tunnel on the right, you come out on the left side. Another thing that seems wrong is that when you eat a power dot on the flip side, it goes away but doesn't energize you. It seems to me that you should either be able to eat the dots from either side, or if you can only eat them on the regular side, then you should just pass over (actually under) them on the flip side. Minor details - it's starting to look really good!

Link to comment
Share on other sites

Power pellets--"pass over (actually under) them on the flip side."

That is a good idea. Requires some logic changes, I still will count the power pellet as a normal dot and give 10 points.

I want pacman to have to cover those for locations.

 

"There is one bug in the code. If you are playing with the ESDX keys the left/right controls are reversed on the flip side of the maze."

This is as intended. The IJKM keys work as you are currently seeing with the joystick/arrow keys.

If you were to use the other joystick, it would behave as ESDX.

In classic99 I can change the joystick under OPTIONS-->Options and switch the arrow keys to work as joystick1 or joystick2.

 

Hope that helps.

 

Do you think the ghost flipping should mimic the controller being used?

Actually, no, I think I kinda like the flip. Hmmm.... Need to play it some more.

 

Gene

Link to comment
Share on other sites

Here is the latest version.

The power pellets are not counted on the mirror side of the maze. No power up etc.

This lets me keep the screen dot count correct.

This also allows for drop in of new mazes.

I have at least 1 more maze created that I had to remove from the old version because of memory limits.

I could look at adding it back in. It should not take much effort at all.

Just an update to the level increase counter and the read data restore point for the new maze.

 

I'll see if I have enough memory left to add a new maze later.

 

Gene

 

 

MIR2-C.zip

Link to comment
Share on other sites

I tried it on the current MESS, and I have keyboard and joystick. I have to lock Alpha Lock when using the keyboard (using ESDX, not esdx); remember to unlock it when using the joystick. The joystick is mapped to the cursor keys of the PC keyboard.

Link to comment
Share on other sites

Here is the latest version.

The power pellets are not counted on the mirror side of the maze. No power up etc.

This lets me keep the screen dot count correct.

This also allows for drop in of new mazes.

I have at least 1 more maze created that I had to remove from the old version because of memory limits.

I could look at adding it back in. It should not take much effort at all.

Just an update to the level increase counter and the read data restore point for the new maze.

 

I'll see if I have enough memory left to add a new maze later.

 

Gene

 

 

 

Once you have the final version, I'll replace the one on the Gameshelf with it.

Link to comment
Share on other sites

That's the screen timeout happening - if no key is pressed, the screen blanks (I always hit this one, even Mr Chin triggered it ;) ). You can prevent it from happening by setting >83D7 to an odd number -- but every time a key is pressed it will be reset again. The safest way in XB is probably to set >83D6 to 0 in your main loop (so keep resetting it). Not sure if the compiler supports CALL LOAD, but CALL LOAD(-31786,0) should work.

 

Interestingly... I notice that the XB interpreter resets the counter to zero by itself except when waiting for input, so that made it hard to test that this was the right address. It also means that XB programs never blank unless waiting at an INPUT or an ACCEPT?

Hmmm Tursi maybe I should fix that so in RXB you never does a screen blank?

(Even if using a Input or Accept)

Link to comment
Share on other sites

  • 2 weeks later...

Well, I think this is it... until Ms. Mirror Maze... J/K no Ms. Mirror Maze planned!

I give a little control/maze demo before the game plays now.

I have removed a bunch of debug code and fixed a bug that stopped the levels from speeding up.

Power pellets shorten a little with each new maze etc.

 

This is as complete as I think I can make it?

 

Unless a bug is found, This is done.

Time to look at my racing game again.... And maybe some Intellivision programing now.

 

Thanks for all the feedback and of course the compiler.

 

Enjoy.

Gene

 

PAC.zip

  • Like 1
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...