Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Super Pac-Man engine
- InkNimations
-
Scratcher
11 posts
Super Pac-Man engine
Hello.
So, I've noticed there aren't that much accurate Pac-Man engines. There are actually 2: Pac-Man and Ms. Pac-Man. I want to make a third accurate engine on Super Pac-Man, but I'm not that good at making games. Could anybody provide some tips?
By the way, Super Pac-Man looks like this.

So, I've noticed there aren't that much accurate Pac-Man engines. There are actually 2: Pac-Man and Ms. Pac-Man. I want to make a third accurate engine on Super Pac-Man, but I'm not that good at making games. Could anybody provide some tips?
By the way, Super Pac-Man looks like this.

- zeldafanbigtime
-
Scratcher
30 posts
Super Pac-Man engine
Hello!
Some tips for making your Pac-Man Game (Try to be more specific on what you need help on, though):
1. For the stage, draw out all the walls Pac-Man cannot pass through, and attach a script to Pac-Man like so:
3. …I'm going to need a little more specification here about what you need.
Some tips for making your Pac-Man Game (Try to be more specific on what you need help on, though):
1. For the stage, draw out all the walls Pac-Man cannot pass through, and attach a script to Pac-Man like so:
when [up arrow] key pressed2. Think out the game a bit- and try not to use a ton of sprites! The clone function works pretty well and is useful for games requiring a lot of the same Item in a game! For placing the apples/ghosts/keys/etc., clones will help save space in the project. This can also be used for creating buttons without needing a button for each
repeat until <not <key [up arrow] pressed>>
change y by [5]
if <touching [wall]> then
change y by [-6]
end
end
3. …I'm going to need a little more specification here about what you need.
- asivi
-
Scratcher
1000+ posts
Super Pac-Man engine
Hi, please do not post images or video's links share your project instead. Thanks.
Last edited by asivi (Oct. 4, 2017 06:00:25)
- asivi
-
Scratcher
1000+ posts
Super Pac-Man engine
You could have a ghosted clone of pacman that you move before the main sprite and tell you if it touches a wall, based on that the pacman will be allowed to move or not.
- InkNimations
-
Scratcher
11 posts
Super Pac-Man engine
Hi, please do not post images or video's links share your project instead. Thanks.No offense, but the guidelines say nothing about posting images.
- asivi
-
Scratcher
1000+ posts
Super Pac-Man engine
Hi, please do not post images or video's links share your project instead. Thanks.No offense, but the guidelines say nothing about posting images.
Noone said anything about guidelines but you…
Bye.
- asivi
-
Scratcher
1000+ posts
Super Pac-Man engine
Because you didn't quote the most relevat response of mine i will shall do for you
Good luck.
You could have a ghosted clone of pacman that you move before the main sprite and tell you if it touches a wall, based on that the pacman will be allowed to move or not.
Good luck.
Last edited by asivi (Oct. 4, 2017 07:21:50)
- InkNimations
-
Scratcher
11 posts
Super Pac-Man engine
It is kinda glitchy, sometimes PAC-MAN glitches into the walls.Oh, I was doing the script wrong. I wanted him to move no matter how long you hold the arrow keys, like how it is in the arcade version. Here's the old script.
Here's a video on Super PAC-MAN.
when [ left arrow v] key pressed
repeat until <touching [walls v]?>
change x by (-2)
end
change x by (2)
That was wrong.
I updated it to repeat until touching the walls, or pressing any other arrow key except the direction PAC-MAN is going.
I can't show that script because it's a little too difficult to write on forums.
- InkNimations
-
Scratcher
11 posts
Super Pac-Man engine
Hello!
Some tips for making your Pac-Man Game (Try to be more specific on what you need help on, though):
1. For the stage, draw out all the walls Pac-Man cannot pass through, and attach a script to Pac-Man like so:when [up arrow] key pressed2. Think out the game a bit- and try not to use a ton of sprites! The clone function works pretty well and is useful for games requiring a lot of the same Item in a game! For placing the apples/ghosts/keys/etc., clones will help save space in the project. This can also be used for creating buttons without needing a button for each
repeat until <not <key [up arrow] pressed>>
change y by [5]
if <touching [wall]> then
change y by [-6]
end
end
3. …I'm going to need a little more specification here about what you need.
1. I used a sprite sheet for the maze, and I drew PAC-MAN pixel by pixel. It looks pretty accurate.
2. I'm not very good at clones.
3. The keys are used for unlocking the doors, the super pellets (green pellets) turn PAC-MAN into Super PAC-MAN, they make PAC-MAN bigger and invulnerable, thus squashing the ghosts. Super PAC-MAN can even bust through doors without having to eat keys. But the super pellets can wear off, similar to the power pellets.
- zeldafanbigtime
-
Scratcher
30 posts
Super Pac-Man engine
Hello!
Some tips for making your Pac-Man Game (Try to be more specific on what you need help on, though):
1. For the stage, draw out all the walls Pac-Man cannot pass through, and attach a script to Pac-Man like so:when [up arrow] key pressed2. Think out the game a bit- and try not to use a ton of sprites! The clone function works pretty well and is useful for games requiring a lot of the same Item in a game! For placing the apples/ghosts/keys/etc., clones will help save space in the project. This can also be used for creating buttons without needing a button for each
repeat until <not <key [up arrow] pressed>>
change y by [5]
if <touching [wall]> then
change y by [-6]
end
end
3. …I'm going to need a little more specification here about what you need.
1. I used a sprite sheet for the maze, and I drew PAC-MAN pixel by pixel. It looks pretty accurate.
2. I'm not very good at clones.
3. The keys are used for unlocking the doors, the super pellets (green pellets) turn PAC-MAN into Super PAC-MAN, they make PAC-MAN bigger and invulnerable, thus squashing the ghosts. Super PAC-MAN can even bust through doors without having to eat keys. But the super pellets can wear off, similar to the power pellets.
For clones, try this:
make a list with the Xs and Ys for each pellet, and put the cloning script into a custom block that has “run without screen refresh” checked:
When flag clicked
set [next] to [1]
repeat (Number of pellets)
Go to x:(item (next) of [X]) y:(item (next) of [Y])
create clone of [myself]
change [next] by [1]
end
When I start as a clone
forever
if <touching [Pac-Man]> then
change [score] by [1]
delete this clone
end
end
- InkNimations
-
Scratcher
11 posts
Super Pac-Man engine
Put the cloning script into a custom block that has “run without screen refresh” checked.That part kinda confuses me.
Last edited by InkNimations (Oct. 14, 2017 00:22:59)
- zeldafanbigtime
-
Scratcher
30 posts
Super Pac-Man engine
That just means you go to the Make a Block tab, click create a block, select more options, and check “run without screen refresh.”Put the cloning script into a custom block that has “run without screen refresh” checked.That part kinda confuses me.
This just makes it (try to) do the commands instantly.
BTW, custom blocks look like this if you didn't know:
define walk
walk
Last edited by zeldafanbigtime (Oct. 16, 2017 20:29:53)
- InkNimations
-
Scratcher
11 posts
Super Pac-Man engine
I already know what custom blocks look like, but I'm still kinda confused, like what certain cloning blocks to put in.That just means you go to the Make a Block tab, click create a block, select more options, and check “run without screen refresh.”Put the cloning script into a custom block that has “run without screen refresh” checked.That part kinda confuses me.
This just makes it (try to) do the commands instantly.
BTW, custom blocks look like this if you didn't know:define walk
walk
Last edited by InkNimations (Oct. 16, 2017 23:28:04)
- InkNimations
-
Scratcher
11 posts
Super Pac-Man engine
Nevermind, I think I just realized what to do.That just means you go to the Make a Block tab, click create a block, select more options, and check “run without screen refresh.”Put the cloning script into a custom block that has “run without screen refresh” checked.That part kinda confuses me.
This just makes it (try to) do the commands instantly.
BTW, custom blocks look like this if you didn't know:define walk
walk
I'm also getting used to the cloning, and now I think I'm doing it right.
- InkNimations
-
Scratcher
11 posts
Super Pac-Man engine
OK, I've placed the apples, now I need to program the ghosts, the keys, the constantly appearing bonus, the power pellets, the super pellets, the levels, and the intermission(s).
- InkNimations
-
Scratcher
11 posts
Super Pac-Man engine
First, I'll program the ghosts. How can I program the ghosts' AI without any of those
glide () secs to x: (0) y: (0)scripts?
- zeldafanbigtime
-
Scratcher
30 posts
Super Pac-Man engine
First, I'll program the ghosts. How can I program the ghosts' AI without any of thoseglide () secs to x: (0) y: (0)scripts?
Maybe something like this?
When [game started]
set [split found] to [0]
if <(ghost)=[1 (red)]> then
repeat until <<game won>or<touching [Pac-Man]>>
repeat until <not <(choose way)=(Da Way)>>
set [choose way] to (pick random [1] to [4]) // This chooses a random direction for the ghost to try
end
set [Da Way] to (choose way)
if <(Da Way)=[1]> then // It keeps moving until it hits a wall or finds a split. Clone this script and change the direction and number for left, up, and down
point in direction [90 (right)]
repeat until <<touching [maze]>or<(Split found?)=[1]>>
move [5] steps
CHECK FOR SPLITS ::custom //Makes sure there are no turns in the road
end
move [-5] steps
end
end
define CHECK FOR SPLITS //Be sure to check the box for "do without screen refresh"
turn right (90) degrees
move [lenth of maze passageways] steps
if <not <touching [maze]>> then
set [Split found?] to [1]
end
move [-lenth of maze passageways] steps
turn left (180) degrees
move [lenth of maze passageways] steps
if <not <touching [maze]>> then
set [Split found?] to [1]
end
move [-lenth of maze passageways] steps
turn right (90) degrees
- sevpeoples_PUREFURY
-
Scratcher
15 posts
Super Pac-Man engine
add super pellets and power pellets, oh and add music, sounds, intermissions, and a credit system.
- Discussion Forums
- » Help with Scripts
-
» Super Pac-Man engine



