Discuss Scratch

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.
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:
whenup arrowkeypressedrepeatuntilnotkeyup arrowpressedchangeyby5iftouchingwallthenchangeyby-6
2. 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
3. …I'm going to need a little more specification here about what you need.
InkNimations
Scratcher
11 posts

Super Pac-Man engine

It is kinda glitchy, sometimes PAC-MAN glitches into the walls.

Here's a video on Super PAC-MAN.
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

asivi wrote:

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

InkNimations wrote:

asivi wrote:

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

asivi wrote:

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

InkNimations wrote:

It is kinda glitchy, sometimes PAC-MAN glitches into the walls.

Here's a video on Super PAC-MAN.
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.
when left arrowkeypressedrepeatuntiltouchingwalls?changexby-2changexby2

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

zeldafanbigtime wrote:

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:
whenup arrowkeypressedrepeatuntilnotkeyup arrowpressedchangeyby5iftouchingwallthenchangeyby-6
2. 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
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

InkNimations wrote:

zeldafanbigtime wrote:

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:
whenup arrowkeypressedrepeatuntilnotkeyup arrowpressedchangeyby5iftouchingwallthenchangeyby-6
2. 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
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:
whenclickedsetnextto1repeatNumberofpelletsGotox:itemnextofXy:itemnextofYcreatecloneofmyselfchangenextby1WhenIstartasacloneforeveriftouchingPac-Manthenchangescoreby1deletethisclone
InkNimations
Scratcher
11 posts

Super Pac-Man engine

zeldafanbigtime wrote:

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)

InkNimations
Scratcher
11 posts

Super Pac-Man engine

Is anybody there?
zeldafanbigtime
Scratcher
30 posts

Super Pac-Man engine

InkNimations wrote:

zeldafanbigtime wrote:

Put the cloning script into a custom block that has “run without screen refresh” checked.
That part kinda confuses me.
That just means you go to the Make a Block tab, click create a block, select more options, and check “run without screen refresh.”
This just makes it (try to) do the commands instantly.
BTW, custom blocks look like this if you didn't know:
definewalkwalk

Last edited by zeldafanbigtime (Oct. 16, 2017 20:29:53)

InkNimations
Scratcher
11 posts

Super Pac-Man engine

zeldafanbigtime wrote:

InkNimations wrote:

zeldafanbigtime wrote:

Put the cloning script into a custom block that has “run without screen refresh” checked.
That part kinda confuses me.
That just means you go to the Make a Block tab, click create a block, select more options, and check “run without screen refresh.”
This just makes it (try to) do the commands instantly.
BTW, custom blocks look like this if you didn't know:
definewalkwalk
I already know what custom blocks look like, but I'm still kinda confused, like what certain cloning blocks to put in.

Last edited by InkNimations (Oct. 16, 2017 23:28:04)

InkNimations
Scratcher
11 posts

Super Pac-Man engine

zeldafanbigtime wrote:

InkNimations wrote:

zeldafanbigtime wrote:

Put the cloning script into a custom block that has “run without screen refresh” checked.
That part kinda confuses me.
That just means you go to the Make a Block tab, click create a block, select more options, and check “run without screen refresh.”
This just makes it (try to) do the commands instantly.
BTW, custom blocks look like this if you didn't know:
definewalkwalk
Nevermind, I think I just realized what to do.
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
glidesecstox:0y:0
scripts?
zeldafanbigtime
Scratcher
30 posts

Super Pac-Man engine

InkNimations wrote:

First, I'll program the ghosts. How can I program the ghosts' AI without any of those
glidesecstox:0y:0
scripts?

Maybe something like this?
Whengame startedsetsplit foundto0ifghost=1 (red)thenrepeatuntilgamewonortouchingPac-Manrepeatuntilnotchooseway=DaWaysetchoose waytopickrandom1to4 This chooses a random direction for the ghost to trysetDa WaytochoosewayifDaWay=1thenpointindirection90 (right)repeatuntiltouchingmazeorSplitfound?=1move5stepsCHECKFORSPLITSMakes sure there are no turns in the roadmove-5steps 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 downdefineCHECKFORSPLITSBe sure to check the box for "do without screen refresh"turn90degreesmovelenth of maze passagewaysstepsifnottouchingmazethensetSplit found?to1move-lenth of maze passagewaysstepsturn180degreesmovelenth of maze passagewaysstepsifnottouchingmazethensetSplit found?to1move-lenth of maze passagewaysstepsturn90degrees
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.

Powered by DjangoBB