Simon built this game inspired by a Numberphile video (he had never seen or played the actual puzzle before, but I have as a kid). The code is Simon’s own, here is a link to the code on GitHub: https://github.com/simon-tiger/15s_puzzle
Simon invented this fun game in Processing after he and his little sister had some proper winter fun outdoors in the fresh December snow (quite rare for the local climate and thus immensely cherished by the little people). The game is about throwing snowballs in such a trajectory that they stick to one another, forming a super-snowball. After I finished filming this, the two snowball throwers had such a great time with the game that I dare say the giggling effect from of this 2D simulation overshadowed the real snowball fight that had originally inspired it. They did love playing in the real snow on the next day though, until it melted away.
Simon shows the Cannon game he created in Processing (Java). He says he was inspired by the Stackoverflow forum, where he saw an example of the game and later wrote the code for a similar game himself. I saw him quickly write the code in a matter of perhaps two hours. Simon will post his code on GitHub once he has added a couple extra features.
Simon has created a great new game in Processing: The Hero Game! It is somewhat like the good old Mario, except that Simon has no idea what Mario is and came up with the concept himself. The game is based upon Circle-Rectangle Intersection, something that he was studying for the past several days. It was impressive to see how quickly he wrote the program for the game, I think it took him something like an hour, while waiting for dinner. The game has a hero (Simon), represented by the yellow circle, obstacles (from below and above) and money that the hero collects to get points. The game stops once the hero hits an obstacle. Simon is planning to add extra random obstacles and maybe also create a winning score threshold (around 50 or 65, he says). His own highest score so far has been 35.
Below are the making-of videos, step by step:
Update: Simon added trees!
Note: See the update at the bottom of this post!
Simon’s game is online at: https://simon-tiger.github.io/Game_SteeringBehaviorsEvolution/SteeringBehaviours_EvolutionGame_p5/
In the videos below Simon shows how he made the game. It’s an ecosystem type of genetic algorithm (with no generations), where the organisms (autonomous steering agents) clone themselves. The autonomous steering agents evolve the behavior of eating food (green dots) and avoiding poison (red dots). Simon added two invaders into the game, one giving food and the other randomly spreading poison. The player can control the “good” invader by moving him and making new food. The goal of the game is to make the agents survive for as long as possible.
The Processing (Java) version:
The thinking behind the game (Simon explains everything at the whiteboard):
In the last video, Simon talks about his problem with the p5 element.
Evolutionary Steering Behaviors game seek algorithm part 1. DESIRED equals TARGET minus POSITION:
Evolutionary Steering Behaviors game seek algorithm part 2. STEERING equals DESIRED minus VELOCITY:
UPDATE: When Simon saw Daniel Shiffman’s comment on Slack this morning (Daniel saying Simon did a fantastic job and that he might even include Simon’s game in the next Live Stream), he sat down and applied the bind function as suggested by his older peers above – without any incentive on my behalf! And it worked! I think we’ve hit a true milestone again. Simon has this growing feeling that he’s got friends out there, his tribe, who understand and who are ready to help.
One day later: Simon had another chat with his friends on Slack and got a lot of help with the last remaining small bug in his game (the New Game button didn’t start a new game if the player had chosen to play with no timer but jumped to Game Over instead). In the video below, Simon shows how that problem got solved:
Simon adds that he didn’t actually do part 4 of the coding challenge, because part 3 is recorded after part 4.
Simon loved Daniel Shiffman’s simulation of the Plinko game and added some extra features to Daniel’s code, like a button to make new chips appear. He also saw a television version of Plinko where people were trying to win money, so he added the figures below to indicate your score.
Simon put this project on GitHub, too!
Direct link to the game: https://simon-tiger.github.io/plinko/
You can also both the code and play with the animation via the p5.js web editor (hit Download to get the animation on your computer): http://alpha.editor.p5js.org/simontiger/sketches/Sk23OkW6x
The code in online in the p5.js web editor. You can run it and play the game, you can also hit the Download button and play on a big screen!