SuperCollider PacMan

If anyone cares, I have recreated the game PacMan in SuperCollider. Still updating the ghost AI, adding a few more sound effects, and doing a few other GUI updates (adding the score tracker, etc). I had no idea where to put this post and I’m not even sure if it’s particularly useful information.

I have no idea if I’m allowed to put it on GitHub for educational purposes, but in case anyone was wondering if it’s possible to code Pac-Man in SC, the answer is “yes” and also without using any quarks or other externals.

It is almost fully functional, I’m mostly just finishing up the ghost AIs at this point. None of the sounds are from BufPlay either, I recreated the Namco wavetable in Ugen functions.


Wow. I want to check it out, and I definitely want to be able to show this to my students. I have no idea about the legality of sharing it though.


1 Like

I’ll show you it when I get to Baltimore! I’m one of the incoming comp DMA students.

Oh awesome. I look forward to hanging out for the next couple of years!



Impressive! I think it would be totally legit to post if you changed the artwork ? I’d love to see how you did the logic, how you broke the code down, etc.

Sure, let me think of a way to do this once it’s complete. I expect it should be within a week or two

@john-d-murphy :stuck_out_tongue_winking_eye:

	var sigs, bufSize=32, waveSamples=32;
	var waka, powerSound, deathSound, ghostDeathSound, siren, fruit;
	t = TempoClock(105/60);
	sigs = ([

	a = sigs.collect({
		arg item, i;
		b = Env(item, (1!32));
		c = b.asSignal(1024);
		d = c.asWavetable;
		e = Buffer.loadCollection(s, d);

	SynthDef(\wt, {
		arg amp=0.5, out=0, freq=261.63, bufNum=0, dur;
		var sig, env;
		sig =, freq);
		env =
			Env([0,1,0], [0.01,0.8],\lin), timeScale:dur*(105/60),
		sig =;
		sig = (sig * amp * env)!2;, sig)
	~themeTreble = PmonoArtic(\wt,
		\bufNum, 6,
		\dur, Pseq((0.25!4)++[1/8,3/8,1/2],3)++Pseq((0.125!2)++[0.25],3)++Pseq([0.5]),
		\root, Pseq((-1!7)++(0!7)++(-1!7)++[3,4,5,5,6,7,7,8,9,11]),
		\octave, 6,
		\degree, Pseq([0,7,4,2,7,4,2],3)++Pseq((0!10)),
		\amp, 0.5,
		\legato, 0.5

	~themeBass = PmonoArtic(\wt,
		\bufNum, 1,
		\dur, Pseq([3/4,1/4],6)++Pseq([1/2],4),
		\root, Pseq((-1!4)++(0!4)++(-1!4)++[6,8,10,11]),
		\octave, 3,
		\degree, Pseq([0,7],6)++Pseq([0,0,0,0]),
		\amp, 0.25,
		\legato, 0.6

	~theme = Ppar([


	~waka = {, (, mul:2) * 60.midicps))) * 0.18!2 *,doneAction:2);

Super cool !!! I would be great play it!

This is incredible important work you’re doing :))))))))