Share your repls and programming experiences

← Back to all posts
World's Simples Pac-Man
sojs (198)

All you can do is eat the "+" to increase your score. There is a small bug where if you go over a +, you disappear, but you can still move around and eat pluses. You will reappear when you go off of a plus. Your character is "ᗤ"
You have 25 moves, whoever can prove that they have the highest score will get an upvote. Have fun!
Winners:

  • No one yet

Have fun!

Everything now works fine.
Thanks to @Bookie0 for the idea of coloring the pac-man
Thanks to @Theboys619 for fixing colors

Commentshotnewtop
Theboys619 (13)

I think I made a fix so you can add colors. Here FIX.

Ik that escaped characters didn't work. So I made a function to convert [COLOR=<ANSI-COLOR-CODE>] to a the \033[38;5;<ANSI-COLOR-CODE>

sojs (198)

@Theboys619 This works well, but it has an error. Try going left but it does not matter that much. THANK YOU

Theboys619 (13)

You are welcome! Also I don't know how I did not notice that error @sojs

Theboys619 (13)

Ok, I fixed going left so it doesn't do [ OLOR=11]D.
Its on the same repl
@sojs

JadenGarcia (37)

I believe you can use require(readline-sync) to get a character instantly, without pressing enter. You ought to read their documentation.

[deleted]

I love it!

Wilke000 (347)

When I press w this happens:

sojs (198)

@IndyCarter I know, I have almost fixed it. Give me a couple minutes...

sojs (198)

@IndyCarter Okay, here is the scoop. The colors do not work because of the way the software it built, and how escape characters are, I have fixed everything, so it is how it was before, with a minor change:
1: you can now see pac-man even when he is eating.

Bookie0 (2848)

Nice! I like it maybe you can add some ghosts than move around randomly or even follow the Pac-Man dude.
Also maybe add some colors to the Pac-Man so we can see him more often!

Bookie0 (2848)

Thanks! Can u mention me tho pleas? :)@sojs

Bookie0 (2848)

Thank you so much! Looking forward to the new cool version! :[email protected]

Bookie0 (2848)

Wait there is a bug @sojs

sojs (198)

@Bookie0 I am trying to figure that out. No clue why it is happening. I can not even find "[32m" in my code.

Bookie0 (2848)

Yeah maybe it’s the color? Oh maybe it’s 16 * 2 Are you sure you didn’t accidentally do an equation , with all the + in your [email protected]

Bookie0 (2848)

Oh there’s no more colors now and it’s working @sojs

sojs (198)

@Bookie0 Actually, I think your right

Bookie0 (2848)

wait I’m right about what? @sojs

Bookie0 (2848)

By the way still bugging, good luck! 👍 @sojs

sojs (198)

@Bookie0 Okay, here is the scoop. The colors do not work because of the way the software it built, and how escape characters are, I have fixed everything, so it is how it was before, with a minor change:
1: you can now see pac-man even when he is eating.

Bookie0 (2848)

Ok cool! Thanks for the scoop! @sojs

sojs (198)

@Bookie0 I'm going to try and make ghosts

Bookie0 (2848)

Nice! Hope they work! Tell me when you’re [email protected]

sojs (198)

@Bookie0 I am going to sign of for the week

Codemonkey51 (771)

setTimeout is not defined (pls fix)

sojs (198)

@Codemonkey51 Spelled it wrong. Now you can enjoy this amazing game :).

sojs (198)

Do NOT go off the map, otherwise the game will crash