Category Archives: Organized

Workin’ that cheese…

I want to eventually make a mouse have to catch the cheese and dodge the spinning cat.

VIDEO

 

A paint program?

II really don’t know what this is…..

屏幕快照 2014-03-10 2.38.21 PM

Interactive Screen Saver: NOW WITH 20% MORE INTERACTIVITY

So I just continued to work on my bouncing ball screen saver thingy but I tried to add a new feature. A “stop sign” where if the mouse is in the stop sign the ball would stop bouncing until you move the mouse off of the sign. I got this to work… kinda… but there is one problem. If the ball is moving in a negative direction when it is stopped, then when it begins moving again it moves in the positive direction. I know why this is; however, I have not been able to figure out how to fix it.

Here is the code:

The problem is that to stop the ball xSpeed and ySpeed go to zero. I tried to work around that with the x and y Velocity variables but that didn’t work because they both are positive… So currently I’m lost. Also I think there may be more instances where I could have used functions but I wasn’t sure how to go about that.

Pacman Pt.2 – omnomnom

pacpt2 pacpt2-1

Got pacman to work, kind of – the dots have yet to disappear, although I have tried to use an if statement for it. The trails they’re leaving behind due to the stroke(255) was cool, so I left it there. Pacman trails!

I know that the code can be simplified further if I used for loops for the pellet locations.

Code below.

 

Travolta Bounce

 

Screen Shot 2014-03-10 at 1.21.35 PM

I decided to keep pushing forward with the Travolta Bounce. I cleaned up the code and added a few things ( a cool background and also the ability to click the Travolta ball into place.) What i really wanted to get was a new ball with every click…so I’ll continue to work on that.

Here it is in action.

 

 

$~make it rain~$

 

VIDEO

 

 

Trapped in the Ignition Remix

 

As you may remember from last week, I did the R Kelly bounce. For this version, I made the code for the edges more concise, separated my code into modular functions. Next I added in for loops, and R. Kelly is pretty much synonymous with Trapped in the Closet and peeing on people. Because I want to steer clear of animating the latter, I added in for loops of some of the key characters from the Big Man reveal scene, all chasing each-other at different speeds. All of this comes together to be a rather distracting background for my original rainbow ball bounce/speed change.

Trapped in the For Loop

Screen Shot 2014-03-10 at 3.45.30 AM

Also, I insulated my glue sniffing with push/pop matrices, like we did in class. I got some inspiration for how to do the rotation speeds from the star example in processing.

Yay code!

 

 

Alright Alright Alright

This week I combined my drawing and animation projects.

Muffin + Bouncing Seizure Ball = Bouncing Seizure Muffin

Next steps:

1. Get rid of that stupid line created by the overlap of the two rectangles

2. Get the muffin to bounce when its edge hits a side, as opposed to the x1 & y1 coordinates

3. Give the muffin the eyes, eyebrows, and wrapper that it usually sports

muffin

 

 

 

 

Party in the sky

I organized my last code into three main functions — consumingClouds, confettiTrail, and shootingStar — and added the bouncing ball effect and borrowed Shiffman’s code for a star shape. Can I add some ’80s disco music later on?

Multiply the Rainbow

I tried organizing my code into methods (as best I could) and clean up  what was in the the void draw().

It’s still a pretty intimidating chunk of code, since a lot of my variables are declared globally, and not everything was passed by value in those methods since I kept bugging my program when I tried to make some variables local.