Its worse than that at rotating them. Some sprites will "tear" as the are rotated so they no longer look much like the original. I'm sure all the bugs will be ironed out eventually though. I do like the product and think it has the makings of a fun little environment for people to play in.
"For some reason scratch cannot successfully rotate a symmetrical sprite through 90 or 180 degrees!"
Are your sprites an odd or even number wide?
Since sprites are centered around a specific pixel, a sprite that is (eg) exactly 20 wide will have have its rotational center offset horizontally and vertically from the actual center of the sprite by 1/2 a pixel. This leads to innacurate rotation.
1 solution is to make all your sprites (and coridors) an odd numer wide - 21 instead of 20, for example. Then the centre of the sprite can actually be its literal center.
Hmm. It appears that once the ghosts are running along a line with either x position or y position equal to zero they stop looking for junctions! I wonder if there is a bug in the "mod" code that makes '0 mod 30' not equal '0'?
Heh. That's the problem. Its the same sprite rotated whatever direction it is going. For some reason scratch cannot successfully rotate a symmetrical sprite through 90 or 180 degrees! Next version should be here soon though and then this conversation won't make any sense :)
See what I mean about odd behaviour. In this version (2.0) you can see that pacman can go through walls when travelling up or right because the "feeler" is missing. It must be a defect in the aliasing/compression done when the project is "shared". I'll probably have to put much larger blocks of colour in to compensate for this. Maybe version 2.1, maybe version 3....
See what I mean about odd behaviour. In this version (2.0) you can see that pacman can go through walls when travelling up or right because the "feeler" is missing. It must be a defect in the aliasing/compression done when the project is "shared"
Beautiful rendition of the original classic.
[hr]
With regard to adding dots, may I invite you to take a look at my own pacman game (Pacman Experiment V2)? I used dots drawn on the background that pacman actually paints over, rather than trying to make every dot a sprite which would have taken hours!
[hr]
I may have to take a look at your code as my own pacman is a bit of a pain when it comes to turning - needing to be really accurate on the junctions. Yours seems much smoother.
Download "pacman"(9 sprites and 21 scripts) and open it in Scratch
Project Notes
version 3.0 ----------- Added 4 ghosts and made them move randomly through the maze. Also tried to make the color-over checking better with the addition of ugly markers but that doesn't work once its uploaded either. How they get into an infinite line through the tunnel I don't know either. Try downloading it and running it locally if you wish.
Even pacman himself got worse in this release and if you look at the sprite I added a hefty "sensor bar".
version 2.0 ----------- Added a randomly moving ghost that can travel throughteh tunnel. In fact due to compression defects he seems to be able to go through walls too!
version 1.0 ----------- Basic maze and movement working. Stopping you from being able to turn into a wall at junctions is not going to be fixed for a while. Next up is to add some pills to eat I think.
Comments
You need to be logged in to post comments
Add a Comment
I've added this project to the Gallery of Magical Quality***
(view all replies)Comment Reply
Nice!
(view all replies)Comment Reply
put this in my gallery
(view all replies)Comment Reply
You don't lose lives
(view all replies)Comment Reply
Nice!
(view all replies)Comment Reply
Its worse than that at rotating them. Some sprites will "tear" as the are rotated so they no longer look much like the original. I'm sure all the bugs will be ironed out eventually though. I do like the product and think it has the makings of a fun little environment for people to play in.
(view all replies)Comment Reply
"For some reason scratch cannot successfully rotate a symmetrical sprite through 90 or 180 degrees!" Are your sprites an odd or even number wide? Since sprites are centered around a specific pixel, a sprite that is (eg) exactly 20 wide will have have its rotational center offset horizontally and vertically from the actual center of the sprite by 1/2 a pixel. This leads to innacurate rotation. 1 solution is to make all your sprites (and coridors) an odd numer wide - 21 instead of 20, for example. Then the centre of the sprite can actually be its literal center.
(view all replies)Comment Reply
Hmm. It appears that once the ghosts are running along a line with either x position or y position equal to zero they stop looking for junctions! I wonder if there is a bug in the "mod" code that makes '0 mod 30' not equal '0'?
(view all replies)Comment Reply
Heh. That's the problem. Its the same sprite rotated whatever direction it is going. For some reason scratch cannot successfully rotate a symmetrical sprite through 90 or 180 degrees! Next version should be here soon though and then this conversation won't make any sense :)
(view all replies)Comment Reply
you need one of the little dots for when the pac-man goes up
(view all replies)Comment Reply
Looking forward for the next version!
(view all replies)Comment Reply
In the short term you could try flood-filling the walls.
(view all replies)Comment Reply
See what I mean about odd behaviour. In this version (2.0) you can see that pacman can go through walls when travelling up or right because the "feeler" is missing. It must be a defect in the aliasing/compression done when the project is "shared". I'll probably have to put much larger blocks of colour in to compensate for this. Maybe version 2.1, maybe version 3....
(view all replies)Comment Reply
See what I mean about odd behaviour. In this version (2.0) you can see that pacman can go through walls when travelling up or right because the "feeler" is missing. It must be a defect in the aliasing/compression done when the project is "shared"
(view all replies)Comment Reply
For the turn limiting, you could try adding "feelers" to the top and bottom of pacman.
(view all replies)Comment Reply
Beautiful rendition of the original classic. [hr] With regard to adding dots, may I invite you to take a look at my own pacman game (Pacman Experiment V2)? I used dots drawn on the background that pacman actually paints over, rather than trying to make every dot a sprite which would have taken hours! [hr] I may have to take a look at your code as my own pacman is a bit of a pain when it comes to turning - needing to be really accurate on the junctions. Yours seems much smoother.
(view all replies)Comment Reply
it works just fine
(view all replies)Comment Reply
Okay, after some odd behaviour with differences between running it in scratch and here in a browser I think the basics are now working.
(view all replies)Comment Reply