You mission, should you choose to accept it*, is to make a simple game prototype!Source: http://www.openprocessing.org/classrooms/?classroomID=1197
Using your new found code skills, like animation, collision detection, basic logic and managing arrays of custom classes, I want you to create a fun game.
It doesn't need an intro page or instructions, it only requires a game play element, and a game over state.
The focus should be on fun and simplicity. There's no point in making a really complicated game if it's not fun!
In order to achieve fun, adjust the speed that things move, how the game is controlled, and how it looks.
It can be abstract, so shapes and lines are OK. Just try to pick nice colours, and have other graphical niceties, like trails and particle effects. Sound effects can also help. (hint : http://thirdcog.eu/apps/cfxr )
Good luck!
* you don't really have a choice :)
The Lesson
In todays lesson we brushed up on some fundaments and had a look at translate; in doing so, we covered stacks and push/pop methodologies. I've embedded a video below which explains this well.
Stacks
From the example below, we can learn how both stacks and translate are used. The colour gradient helps us understand, visually, what's going on behind the scenes.
Result
First, we use pushMatrix, this is good practice when using translate as it allows us to revert to the previous matrix, simply, by using popMatrix. With that in mind, we translate X-0 and Y-0 to the center using translate(width / 2, height / 2). Now we can work from, what's known as, the Cartesian Coordinate System.
Source: http://quibb.blogspot.com/2011/03/manifolds-coordinates.html
Every square now drawn at X-0, Y-0 now spawns in the center instead of the upper-left-hand corner. All that's required now is to push another matrix to the stack and draw a number of squares using a loop, rotating them each 5 degrees (in this example) and reduce their scale by 5 percent per iteration. Afterwards, we pop the stack, returning to our previous matrix, the Cartesian Coordinate System and pop again to return to the default matrix. The colours of each square are changed upon each iteration of the loop giving us the nice effect seen below!