Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Pac-Man game idea but no execution :(
- cool_cartz427
-
New Scratcher
2 posts
Pac-Man game idea but no execution :(
Hi!
I'm quite a fan of Pac-Man and want to make a game like the original. However I looked at alot of tutorials on YouTube and their either too complicated, or the code they use is very faulty. I have though had some logical ideas of my own to create it myself. But of course, I'm a VERY big novice so I'm going to need some help.
Here's my first plan of action:
A deal that I've had while attempting to make this one game is how Pac moves. In the real game, when he's in a tunnel for example, he cant go up or down and keeps moving in the x axis. No tutorial really knows this and it kinda bugs tbh.
So I had the idea of Pac being on a trail that he cant ever get off from. Its sort of like a train on a railroad. Hopefully there is a way to make Pac-Man move in any desired direction but the requirements are that
1. He cant leave the path
2. He shall not face onto the walls that are to the sides of him if he's MOVING in the x or y axis.
I'm hoping this makes sense and that any of y'all can help me. Huge thanks!
I'm quite a fan of Pac-Man and want to make a game like the original. However I looked at alot of tutorials on YouTube and their either too complicated, or the code they use is very faulty. I have though had some logical ideas of my own to create it myself. But of course, I'm a VERY big novice so I'm going to need some help.
Here's my first plan of action:
A deal that I've had while attempting to make this one game is how Pac moves. In the real game, when he's in a tunnel for example, he cant go up or down and keeps moving in the x axis. No tutorial really knows this and it kinda bugs tbh.
So I had the idea of Pac being on a trail that he cant ever get off from. Its sort of like a train on a railroad. Hopefully there is a way to make Pac-Man move in any desired direction but the requirements are that
1. He cant leave the path
2. He shall not face onto the walls that are to the sides of him if he's MOVING in the x or y axis.
I'm hoping this makes sense and that any of y'all can help me. Huge thanks!

- DragonBeast829
-
Scratcher
100+ posts
Pac-Man game idea but no execution :(
If you store the map on a grid, you should be able to know which directions Pac-Man can move in based on what tiles are up, down, right, and left compared to Pac-Man's position.
If you don't know how to store a grid, I can help explain that too.
If you don't know how to store a grid, I can help explain that too.
- cool_cartz427
-
New Scratcher
2 posts
Pac-Man game idea but no execution :(
If you store the map on a grid, you should be able to know which directions Pac-Man can move in based on what tiles are up, down, right, and left compared to Pac-Man's position.yeah that works well. I just hope the code can be simplified if that's possible. Those tutorials on YT did this and it didnt really make sense :[
If you don't know how to store a grid, I can help explain that too.
also if its possible to use clones instead of the pen tool since that just adds more stuff which I don't really want. But if it's required, then ill roll with it
- DragonBeast829
-
Scratcher
100+ posts
Pac-Man game idea but no execution :(
It's good that you want simplicity. Some people will tell you that sometimes things are just complicated, but a quote I really like is “An idiot admires complexity, a genius admires simplicity.”
You can probably simplify it any further, but in this case there's no need to. The Pac-Man board is inherently a grid of tiles, so there's no reason to store it as anything other than that: a grid of tiles.
You asked if you can use clones. Scratch has a limit of 300 clones, so you might hit that limit before you can draw everything you want.
I can explain the grid if you want, since you said it didn't make sense.
You can probably simplify it any further, but in this case there's no need to. The Pac-Man board is inherently a grid of tiles, so there's no reason to store it as anything other than that: a grid of tiles.
You asked if you can use clones. Scratch has a limit of 300 clones, so you might hit that limit before you can draw everything you want.
I can explain the grid if you want, since you said it didn't make sense.
Last edited by DragonBeast829 (Yesterday 19:08:38)
- Discussion Forums
- » Help with Scripts
-
» Pac-Man game idea but no execution :(