Coding, Java, Simon makes gamez, Simon's Own Code

The Sea Game. Simon’s First Own Game.

Simon created his very first video game completely on his own. Everything in this game he came up with by himself – from the original idea and design to the final code. The game is about a little man (actually, Simon himself) jumping over the waves in the sea. Every time he lands on an actual wave it’s game over.

Simon used collision detection (point-rectangle instead of rectangle-circle collision detection) and array lists to duplicate the waves. He created an illusion of 3D by choosing the viewing angle “almost as if it were an orthographic camera”, he explains.

The code for this game (in Processing i.e. Java) is available on GitHub at

https://github.com/simon-tiger/video-games

 

The making of, step by step:

 

 

Simon had trouble with the game over function. Originally, it was only triggered once the player clicked the mouse to jump again while on a wave, instead of reading to the circle-rectangle (little man-wave) collision. Simon asked about this problem in the Coding Train slack channel and got some great responses. Eventually he solved the problem is his own way (see the “Debugged” video):

 

 

Coding, Geometry Joys, JavaScript, Physics, Simon's Own Code

Soft Springs (Simon’s own code)

Simon used Chapter 3 (Oscillation) of Daniel Shiffman’s book The Nature of Code as the theoretical basis for creating his own code. First, he played around with what he calls “soft springs” – multiple spring arrays connecting multiple particles (some of them locked but most of them moving) – allowing for most interesting designs thanks to spring force.

Simon called the video below “a mess” that “doesn’t look promising”, but to me it’s my favourite pattern. To me it resembles a constructivist poster turned alive, something like an El Lissitzky animation:

Other soft springs step by step (Simon explains what soft springs are in the first video):

Simon eventually stepped over t trying to create sets of springs and particles that unfold into certain geometrical shapes, like a trapezoid here:

And finally, a hexagon: