Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NOT Pacman.....
#4
(09-24-2025, 06:49 AM)johnno56 Wrote: Nicely done! Those tunnels were very handy! The "settings" was a great idea... Big Grin

Many thanks Johnno.

I have updated the zip file to resolve an issue that Marcus identified, where Pacman could be moved up or down while going through the tunnels -  many thanks Marcus for finding this.

If you have already downloaded the original file, you can just update the "move_pacman()" function with this code:
Code:
function move_pacman()


if pacman.x >= 0 and pacman.x <= 1024-32
if keydown(KEY_LEFT) or joyx() < 0
if TM_GetCelAt( pacman.x - 1,pacman.y  ) <> 0 ' if the cel is anything but a wall
    pacman.dx = - pacman.speed
    pacman.dy = 0
    pacman.cell = 4
endif
endif
if keydown(KEY_RIGHT) or joyx() > 0
if TM_GetCelAt( pacman.x + pacman.w + 1,pacman.y   ) <> 0
    pacman.dx = + pacman.speed
    pacman.dy = 0
    pacman.cell = 0
endif
endif
if keydown(KEY_UP)  or joyy() < 0
if TM_GetCelAt( pacman.x ,pacman.y - 1 ) <> 0
    pacman.dy = - pacman.speed
    pacman.dx = 0
    pacman.cell = 2
endif
endif
if keydown(KEY_DOWN)   or joyy() > 0
if TM_GetCelAt( pacman.x ,pacman.y + pacman.h + 1  ) <> 0
    pacman.dy = + pacman.speed
    pacman.dx = 0
    pacman.cell = 6
endif
endif
endif
'allow pacman to move through the side tunnel
if pacman.x < 0 then pacman.x = 1024
if pacman.x >1024 then pacman.x = 0
endfunc'============================
Reply


Messages In This Thread
NOT Pacman..... - by kevin - 09-23-2025, 02:43 PM
RE: NOT Pacman..... - by Marcus - 09-23-2025, 07:51 PM
RE: NOT Pacman..... - by johnno56 - 09-24-2025, 06:49 AM
RE: NOT Pacman..... - by kevin - 09-24-2025, 07:52 AM
RE: NOT Pacman..... - by 1micha.elok - 09-24-2025, 08:26 AM
RE: NOT Pacman..... - by Marcus - 09-24-2025, 04:19 PM
RE: NOT Pacman..... - by kevin - 09-24-2025, 04:40 PM
RE: NOT Pacman..... - by Marcus - 09-24-2025, 06:45 PM
RE: NOT Pacman..... - by kevin - 09-24-2025, 07:14 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)