1. #creativePact This Weekend

    So…yeah…I’m totally failing at #creativePact this weekend, sorry! When I get back to it, I’m gonna add in some walls, then stop PacMan running into those walls. Then add some dots for him to munch on, get his mouth animating as he moves about, and then I’ll worry about the ghosts…

  2. #creativePact Day 6

    Hey PacMan, stop running off the screen where I can’t see you, ma bitch!

    /* Pac-Man */

    Pacman pacMan = new Pacman(8, 10, 10, 20, 20, radians(45), radians(315));

    Redguy redGuy;

    Pinkguy pinkGuy;

    Blueguy blueGuy;

    Slowguy slowGuy;

    void setup() {

      redGuy = new Redguy();

      pinkGuy = new Pinkguy();

      blueGuy = new Blueguy();

      slowGuy = new Slowguy();

      size(620, 560);

      background(0);

      frameRate(30);

    }

    void draw() {

      pacMan.drawPM();

      pacMan.update();

    }

    class Pacman {

      int PacmanRadius, PMXpos, PMYpos, PMWidth, PMHeight;

      float PMStart, PMStop;

      Pacman(int a, int b, int c, int d, int e, float f, float g) {

        // PacManRadius = a;

        PMXpos = b;

        PMYpos = c;

        PMWidth = d;

        PMHeight = e;

        PMStart = f;

        PMStop = g;

      }

      void update() {

        arc(PMXpos, PMYpos, PMWidth, PMHeight, radians(PMStart), radians(PMStop));

        fill(255, 255, 0);

      }

      void drawPM() {

        if (keyPressed) {

          if (key == ‘a’ || key == ‘A’) {

            PMStart = 225;

            PMStop = 495;

            background(0);

            if (PMXpos > PMWidth/2){

            PMXpos -= 10;} else {

            }

          } 

          if (key == ‘d’ || key == ‘D’) {

            PMStart = 45;

            PMStop = 315;

            background(0);

            if (PMXpos < width-(PMWidth/2)){

            PMXpos += 10;} else {

            }

          }

          if (key == ‘w’ || key == ‘W’) {

            PMStart = 315;

            PMStop = 585;

            background(0);

            if (PMYpos > PMHeight/2){

            PMYpos -= 10;} else {

            }

          }

          if (key == ‘s’ || key == ‘S’) {

            PMStart = 135;

            PMStop = 405;

            background(0);

            if (PMYpos < height-(PMHeight/2)){

            PMYpos += 10;} else {

            }

          } 

          else {

          }

        }

      }

    }

    class Redguy extends Ghost {

    }

    class Pinkguy extends Ghost {

    }

    class Blueguy extends Ghost {

    }

    class Slowguy extends Ghost {

    }

    class Ghost {

    }

  3. #creativePact Day 5

    So, it would be really nice if when he changed direction his mouth would face in that direction too, so he can eat all the…uh…dot things? Whatever, here:

    /* Pac-Man */

    Pacman pacMan = new Pacman(8, 10, 10, 20, 20, radians(45), radians(315));

    ;

    Redguy redGuy;

    Pinkguy pinkGuy;

    Blueguy blueGuy;

    Slowguy slowGuy;

    void setup() {

      redGuy = new Redguy();

      pinkGuy = new Pinkguy();

      blueGuy = new Blueguy();

      slowGuy = new Slowguy();

      size(620, 560);

      background(0);

      frameRate(30);

    }

    void draw() {

      pacMan.drawPM();

      pacMan.update();

    }

    class Pacman {

      int PacmanRadius, PMXpos, PMYpos, PMWidth, PMHeight;

      float PMStart, PMStop;

      Pacman(int a, int b, int c, int d, int e, float f, float g) {

        // PacManRadius = a;

        PMXpos = b;

        PMYpos = c;

        PMWidth = d;

        PMHeight = e;

        PMStart = f;

        PMStop = g;

      }

      void update() {

        arc(PMXpos, PMYpos, PMWidth, PMHeight, radians(PMStart), radians(PMStop));

        fill(255, 255, 0);

      }

      void drawPM() {

        if (keyPressed) {

          if (key == ‘a’ || key == ‘A’) {

            PMStart = 225;

            PMStop = 495;

            background(0);

            PMXpos -= 10;

          } 

          if (key == ‘d’ || key == ‘D’) {

            PMStart = 45;

            PMStop = 315;

            background(0);

            PMXpos += 10;

          }

          if (key == ‘w’ || key == ‘W’) {

            PMStart = 315;

            PMStop = 585;

            background(0);

            PMYpos -= 10;

          }

          if (key == ‘s’ || key == ‘S’) {

            PMStart = 135;

            PMStop = 405;

            background(0);

            PMYpos += 10;

          } 

          else {

          }

        }

      }

    }

    class Redguy extends Ghost {

    }

    class Pinkguy extends Ghost {

    }

    class Blueguy extends Ghost {

    }

    class Slowguy extends Ghost {

    }

    class Ghost {

    }

  4. meeting-people-is-easy said: I literally have no idea what your blog is about...

    All about #creativePact http://creativepact.co.uk/ 

    Mine is all written for the Processing language: http://processing.org/

    wakawakawaka

  5. #creativePact Day 4

    So, my PacMan can now move around a bit but, only really works with single keystrokes, and he can fly off the screen too - bad PacMan…wakawakawakawaka

    /* Pac-Man */

    Pacman pacMan = new Pacman(8, 10, 10, 20, 20, radians(45), radians(315));

    ;

    Redguy redGuy;

    Pinkguy pinkGuy;

    Blueguy blueGuy;

    Slowguy slowGuy;

    void setup() {

      redGuy = new Redguy();

      pinkGuy = new Pinkguy();

      blueGuy = new Blueguy();

      slowGuy = new Slowguy();

      size(620, 560);

      background(0);

      frameRate(30);

    }

    void draw() {

      pacMan.update();

      pacMan.draw();

    }

    void update() {

    }

    class Pacman {

      int PacmanRadius, PMXpos, PMYpos, PMWidth, PMHeight;

      float PMStart, PMStop;

      Pacman(int a, int b, int c, int d, int e, float f, float g) {

        // PacManRadius = a;

        PMXpos = b;

        PMYpos = c;

        PMWidth = d;

        PMHeight = e;

        PMStart = f;

        PMStop = g;

      }

      void update() {

        fill(255, 255, 0);

        arc(PMXpos, PMYpos, PMWidth, PMHeight, PMStart, PMStop);

      }

      void draw() {

        if (keyPressed) {

          if (key == ‘a’ || key == ‘A’) {

            background(0);

            PMXpos -= 10;

          } 

          if (key == ‘d’ || key == ‘D’) {

            background(0);

            PMXpos += 10;

          }

          if (key == ‘w’ || key == ‘W’) {

            background(0);

            PMYpos -= 10;

          }

          if (key == ‘s’ || key == ‘S’) {

            background(0);

            PMYpos += 10;

          } 

          else {

          }

        }

      }

    }

      class Redguy extends Ghost {

      }

      class Pinkguy extends Ghost {

      }

      class Blueguy extends Ghost {

      }

      class Slowguy extends Ghost {

      }

      class Ghost {

      }

  6. #creativePact Day 3

    I’m just gonna drop in a little PacMan here, wakawakawaka: 

    /* Pac-Man */

    Pacman pacMan = new Pacman(8, 10, 10, 20, 20, radians(45), radians(315));;

    Redguy redGuy;

    Pinkguy pinkGuy;

    Blueguy blueGuy;

    Slowguy slowGuy;

    void setup(){

      redGuy = new Redguy();

      pinkGuy = new Pinkguy();

      blueGuy = new Blueguy();

      slowGuy = new Slowguy();

      size(620, 560);

      background(0);

    }

    void draw(){

    pacMan.update();

    }

    void update(){}

    class Pacman {

      int PacmanRadius, PMXpos, PMYpos, PMWidth, PMHeight;

      float PMStart, PMStop;

      Pacman(int a, int b, int c, int d, int e, float f, float g){

      // PacManRadius = a;

       PMXpos = b;

       PMYpos = c;

       PMWidth = d;

       PMHeight = e;

       PMStart = f;

       PMStop = g;

      }

      void update(){

        fill(255, 255, 0);

        arc(PMXpos, PMYpos, PMWidth, PMHeight, PMStart, PMStop);

    }

    }

    class Redguy extends Ghost {

    }

    class Pinkguy extends Ghost {

    }

    class Blueguy extends Ghost {

    }

    class Slowguy extends Ghost {

    }

    class Ghost {

    }

  7. #creativePact Day 2

    This is my post for September 2nd, unless I don’t make one tomorrow…in which case it’s for tomorrow instead…whatever.

    Here’s some code which doesn’t do anything - it’s more just a skeleton:

    /* Pac-Man */

    Pacman pacMan;

    Redguy redGuy;

    Pinkguy pinkGuy;

    Blueguy blueGuy;

    Slowguy slowGuy;

    void setup(){

    }

    void draw(){

    }

    class Pacman {

    }

    class Redguy extends Ghost {

    }

    class Pinkguy extends Ghost {

    }

    class Blueguy extends Ghost {

    }

    class Slowguy extends Ghost {

    }

    class Ghost {

    }

  8. #creativePact Day 1

    I’m gonna try and make PacMan in Processing - code and stuff to follow, for sure. Thanks!

  9. #creativePact 2011 Day 4

    This is now in Stereo but the Delay is half as loud as the original sound. Maybe tomorrow I’ll look at having multiple repeats or something - I would have done it today but was Dancing with Gerry til 5am :/


    ~gate = Bus.audio(s, 2);

    ~delay = Bus.audio(s, 2);

    {Out.ar([0, 1], DelayN.ar(In.ar(~delay, 2), 5, 2, 0.5))}.play

    {Out.ar([0, 1, ~delay], In.ar(~gate, 2))}.play;

    {Out.ar(~gate, SoundIn.ar)}.play;

  10. #creativePact 2011

    This now has a Delay effect added, providing a two second delay coming out of the Right Hand channel. Lovely.


    ~gate = Bus.audio(s, 2);

    ~delay = Bus.audio(s, 2);

    {Out.ar(1, DelayN.ar(In.ar(~delay, 2), 5, 2))}.play

    {Out.ar([0, ~delay], In.ar(~gate, 2))}.play;

    {Out.ar(~gate, SoundIn.ar)}.play;