At 2/20/25 05:42 PM, coolCartz427 wrote:At 2/20/25 09:48 AM, detergent1 wrote:At 2/19/25 06:53 PM, coolCartz427 wrote:At 2/19/25 06:44 PM, detergent1 wrote:At 2/19/25 05:17 PM, coolCartz427 wrote:okay okay.
@everyone!!!!! <---(if that even works for these)
pacman might be something i can save for later or i can redo it. but i wanna say i want ppl here who can teach me sometimes of what somethings means. at least when i am asking for some.
does anyone think that me, a very big starter of a programmer should stick with pacman for simplicity but this time get more informed, or should i think of a different original game for me to make while still getting help from you guys?
yes i dont wanna decide myself because i want opinions from pros and not my peabrain :P
hmmmm.
try these, in order of difficulty:
to some extent, try not following tutorials, see if you can figure out all the parts on your own ;)
DUDE YOU ARE A MIND READER I TRIED MAKING A PONG REPLICA AND IT WORKED WELL AND THEN I DELETED IT CUZ I HAD LOW HOPES FOR IT AND THENI TIRED MAKING A SPACE INVADERS GAME BUT THEN STOPPED ON THAT TOO! zamn thats alot of yelling. sry. but srsly thats crazy how you somehow knew where my head was at then lol
what are the odds huh
yeah. hey i just thoguht of a way that might make the pacman controls work well. is there a way that pacman could be set on a line path that goes throughout the maze that he is always connected to so for instance he cont go left or right going down a passage? kinda like a train track. i came up with it and thought it was very inovative! could it work?
it is actually better.
instead of line paths, you will view the maze as a square grid. each square informs the available directions either the ghost or the player can go, and then you simply call "glide () secs to x: () y: ()" block accordingly. this is widely used for agent artificial intelligence, and will certainly prove essential to make the ghosts work.
one smart way to encode this grid is using colors, then the player or the ghost can test available directions in the current square using the block "touching color ()?". you define that e.g. color green means up, red means down, blue means left and orange means right, then you have to paint little dots with these colors in the maze and test them in code.
if this doesn't work, the traditional way of expressing this square grid is using a matrix. Scratch doesn't have matrix, so you'd need to emulate one using an array. the most common convention is called row major, which means that if your matrix is e.g. 5 units high and 3 units wide, then the first 3 elements belongs to the first row, and the elements 4-6 belongs to the second row etc. each element of the array would contain a text like "ul" or "dl" or "udlr" or "rul". each letter means a direction available, so u=up, d=down, l=left and r=right. you use the block "() contains ()?" to check them. filling this array will be very bothersome and error-prone, so I really recommend to try the color approach.