Share your repls and programming experiences

← Back to all posts
Pacman
DynamicSquid (1967)

I made Pacman!

Enjoy :)


Skip this part if you don't want to hear me go on a rant and just want to play the game.

This will be my last Processing game (well, I'll do Processing in like Gam Jams and stuff, but that's about it). Three reasons:

1) The only reason I did Processing was I wanted to create something with graphics, and Processing was the only thing I knew. But recently I found how to get SFML working with C++ now, so I'm using that.

2) I hate Processing. Processing is written in Java, and I hate Java. But SFML is used with C++, and I'm a C++ guy :)

3) Processing's syntax is "blah". Yes, SFML is way more complicated, but that's why I like it! Processing is just too simple, it doesn't feel right. Here's an example:

// rectangle in Processing
fill(0); // black
stroke(255); // white outline
//   x   y   len  height
rect(50, 50, 200, 100);

// rectangle in C++/SFML
// oh, and don't forget to render the window and set up the game loop!
sf::RactangleShape rect(200, 100);
rect.setFillColor(sf::Color::Black);
rect.setOutlineColor(sf::Color::White);
rect.setPosition(50, 50);

See, C++ uses methods and namespaces and classes and all that good C++ stuff!!

But since repl.it doesn't support SFML yet, I'd have to wait before posting stuff here.

I really want to make my own graphics library.... but I'd have to learn OpenGL first - not anytime soon.

And yes, I know, this game isn't the best, it's a little glitchy and stuff, but I tried.

Oh, and I'll be posting this on GitHub, so @johnstev111, that's for you :)


Well, that's it.

Enjoy!

Commentshotnewtop
HahaYes (903)

NOOOOOOOOOOOOOOOOOOOOOOOO I was just about to finish Pac-Man ......... I guess time to do it in HTML, CSS, and JS I guess.

DynamicSquid (1967)

@HahaYes oh lol, sorry about that...

DynamicSquid (1967)

@HahaYes also, why'd you give up on C++?

HahaYes (903)

@DynamicSquid Just for today... I looked at Linus Torvald's "Nothing is better than C" it was pretty funny.

DannyIsCoding (484)

You're almost at 1000 cycles congrats! This game is really fun!

ZDev1 (190)

wow!
can you help me with javascript? (localStorage especially)

DynamicSquid (1967)

@ZDev1 sorry, I don't do js :(

Crcoli7307 (28)

@DynamicSquid I know you don’t that’s why I was giving him a link to learn JS

DynamicSquid (1967)

@Crcoli7307 yeah, but I don't really wanna learn js

Crcoli7307 (28)

@DynamicSquid Right... So I gave him a link so that he could learn JS

DynamicSquid (1967)

@Crcoli7307 but I don't wanna learn js, I actually hate js, I'm a C++ guy

ZDev1 (190)

@Crcoli7307 dude ik JavaScript but localStorage no

syflexer (467)

its a little bit hard to turn but its still fun

000022 (8)

It is so cool!!!!!!

CodeLongAndPros (875)

I would make it so the mouth only chomps when you are moving.

DynamicSquid (1967)

@CodeLongAndPros I literally spent 2 hours trying to get the mouth to work (it's actually insane), that's the best I can do sorry :(

CodeLongAndPros (875)

@DynamicSquid I feel you. I had to make a game loop in TI-Basic. There's only stuff to add text, add shapes and cls

You have to press a button to redraw the screen because clear lags.

DynamicSquid (1967)

@CodeLongAndPros oof... yeah more control in my opinion is better

CodeLongAndPros (875)

@DynamicSquid The sad part is that even though the language is terrible and the code is
,
I still wasted so much time programming in the konmani code in, and playing it.

CodeLongAndPros (875)

@DynamicSquid I can try to make a demo video.

The Nspire ships sans internet and camera.

DynamicSquid (1967)

@CodeLongAndPros oh it's fine, you don't have to

CodeLongAndPros (875)

It can't install packages :( (Arch joke)

DynamicSquid (1967)

@CodeLongAndPros I don't get it :( wait, but is there something wrong with my repl.it though?

CodeLongAndPros (875)

@DynamicSquid pacman is the package manager for Arch Linux.

techgeek680 (65)

@DynamicSquid you are welcome. I am new to repl.it and I'm browsing projects made by other people!

johnstev111 (229)

@DynamicSquid I've been anticipating the realease ever since I starred the repo :)! BTW, great game! And, original pacman has three lives, so maybe three lives then you have to refresh? And I've noticed that the controls can be slightly laggy as well.

DynamicSquid (1967)

@johnstev111 oh thanks! and I'll try to work in your suggestions, but it's going to take some time

johnstev111 (229)

@DynamicSquid Ok! BTW, you have 1000 cycles

Coder100 (2743)

Awww sad to see you go to c++ when you could be using P5 which is honestly way better than processing in my opinion

DynamicSquid (1967)

@Coder100 jj-javascript??? nooooooooooooo. I tried to code on it once, almost threw up. even Java is better than p5.js. Well I guess I classify languages based on their OOP syntax. js's OOP syntax is soooo weird compared to C++. Big no.

thanks for noticing btw :)

Coder100 (2743)

p5.js may be a bit strange, but that's because javascript is strange. Anyways, p5.js actually made the slice function before it got put into the specification! @DynamicSquid

DynamicSquid (1967)

@Coder100 oh that's cool! but I guess that C++ and Js just don't mix

nk1rwc (43)

like it

even if glitchy

JacksonPhilips (45)

If you want to get into game development, I recommend Godot. It's like a mix of JavaScript and Python. ;) Anyways, cool Pacman! +1

For web development, I'd stick to p5.js as there aren't a lot of alternatives to responsive WebGL, but that's all I know.

JBYT27 (104)

Nice!!! kinda laggy though

KeinR (1)

If Processing is too high level for you (I take it that's the problem), then might as well just use OpenGL or DirectX. That's as low level as you can "reasonably" get~

Rani77 (1)

I dont even know how to work it!!!!!

DynamicSquid (1967)

@Rani77 WASD or Arrow keys to move, eat the dots, and if the coloured circles touch you, your die. If you eat the big dot, then the colour circles will turn blue for a couple of seconds, then you can eat them!

VulcanWM (1709)

Nice man, eight more to go until 1000 cycles. You planning anything special for that?

DynamicSquid (1967)

@medcho uh... no, not really. this happened sooner than I though, so I don't have time to plan out something big, but I'm working on a small animation right now...

DaRealDoge (0)

LAGGY TRASH!!!!!!!!

DaRealDoge (0)

@DynamicSquid I am sorry. I just realized I probably don't have enough processing power in the version I'm using. I am very sorry.