Cannon Game in Processing

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.

Advertisements

Wikipedia Crawler

Simon has made his version of Daniel Shiffman’s Wikipedia Crawler, graphing the relatedness between Wikipedia articles.

Play with it yourself online at: https://simon-tiger.github.io/wikipedia-crawler/wikipedia/

Code: https://github.com/simon-tiger/wikipedia-crawler/

Simon writes:

How it Works

Enter a query (e. g. apple) and either hit Enter or press the button “Query the API”. If an article called “Apple” exists, a circle will pop up with th word “Apple” in it. If an article called “Apple” doesn’t exist, a circle with something alse will pop up. Click the circle (or article) to reveal its related articles. As you might expect, you can click any of those articles to reveal its related articles.

Inspiration

The inspiration comes from Daniel Shiffman and its Coding Train. Link to Daniel’s version here.

Simon’s Acrostic Machine

Last Friday Daniel Shiffman was finally back with his weekly livestreams! Simon was delirious with joy that he could be part of the team again and weeping and panicking every time Daniel experienced technical difficulties. During the days that followed, Simon made his own two versions of the coding challenge Daniel presented in the livestream and shared those with his colleagues on GitHub and the Slack channel: “I made *two* versions of the acrostic coding challenge. Link to a github repo: https://github.com/simon-tiger/acrostics (Links to both of the versions in the README).

The coding challenge was part of Daniel Shiffman’s Programming A to Ze course at NYU (a course focusing on analysis and generation of text-based data) and was about creating an Acrostic machine – an algorithm that would use a source text to create a “poem”. Every word in the poem would begin with the consecutive letter from a word one enters.

One version that Simon created uses an API as the source text:

https://simon-tiger.github.io/acrostics/00_acrostic_api/

In the second version, the user can type the source text (like in the screenshot below), use a text sample or drag a source text file into a special dropbox:

https://simon-tiger.github.io/acrostics/01_acrostic_userinput/

Screenshot of the second version (with drag and drop):

Acrostic 11 sep 2017

Simon making his versions of the Acrostic machine:

Coding everywhere, swimming and popping giant balloons

A few more pics from the coding everywhere series:

DSC_0618

wp-image-630951689

wp-image-1094961898

wp-image-1337992596

Here Simon made a game especially for his sister:

wp-image-2011983519

wp-image-1696618370

wp-image-1067236208

wp-image-872329122

wp-image-42781354

Among the remaining favorites were reading (see an earlier post), swimming (and playing in the water) and, surprisingly still very high up on the list, popping giant balloons. City trips, walking and museums were way down below or even cancelled all together, even though the visit to Park Güell can be rated as successful.

DSC_0711

DSC_0613

wp-image-1963826101

wp-image-240956575

wp-image-983415705

wp-image-1829492110

wp-image-899124593

Homeschooling reversed

Homeschooling reversed. Every day during our vacation, Simon was pushing me through a crash course in JavaScript. He had lessons meticulously planned way ahead, with all the examples, and insisted I take at least two lessons a day and complete at least two exercises. We had such great fun playing with the simple code I wrote, Simon making it more complex and animated. I’ve heard someone say that making music together was the greatest pleasure of all. Unfortunately, I will never be able to play music together with Simon (or anyone, simply because of the drawbacks in my education). But I thing writing code together comes close.

Now that we are back home, Simon may be too busy to continue teaching me on a regular basis, but I am very happy with what he has taught me so far and I think I’ll be able to understand his projects at a deeper level now.

wp-image-1232618776

wp-image-326582236

wp-image-421229360

 

wp-image-247181306

wp-image-1633589861

Circle Intersection with Perlin Noise in Processing (Interactive)

Simon built a beautiful interactive circle intersection program in Processing, in which the circles detect intersection and change colors (according to Perlin Noise) once it occurs. The player can control the number of circles by adding and removing them in two modes (mouth clicked and mouth dragged). Simon added a button to switch between the two modes. (Loosely based upon Daniel Shiffman’s tutorials on checking object intersection).

 

 

Automatic Magformers Table

Magformers (magnetic building sets involving maths) used to be Simon’s greatest passion when he was six (just a year ago!) and this week he has been travelling in time to revisit this old love, after his little sis received a new Magformers set as a present. What Simon did next was to combine Magformers and programming: he created an automatic table listing various Magformers models (in HTML/ JavaScript). The sets that can be used to build those models were to get filled in automatically, depending on the number of specific shapes needed for every model and the number of such shapes available in every set. As you might imagine, this involved many lines of code and a whole lot of computational thinking. At one point, when Simon was nearly done, he realized that the column listing the sets wouldn’t get filled in properly. He had a bug in his program that he couldn’t find, so he turned to his older friends in Slack for help. It’s such a pleasure to see him communicate with these experienced programmers on a regular basis now and unbelievable how eager and resourceful they are. One of Simon’s friends from Slack even created his own version of Simon’s program in CodePen! What makes it even more wonderful is that Simon no longer hesitates to apply the good advice he gets. The next day he wrote some “helper functions” and the table worked!

Simon hasn’t put this project online yet, as he wanted to make it more interactive and hasn’t managed to do that so far.

 

 

 

 

 

 

Maze Generator Game in Processing

Simon has turned Daniel Shiffman’s Maze Generator Coding Challenge (generating a maze using the Depth-First Search Recursive algorithm) into a game in Processing (Java). It’s not fully operative yet, as the player can partially walk through walls, but Simon did get quite far and even received positive comments from Daniel Shiffman.

Hero Game in Processing. Simon’s Own Code.

Hero Game 24 Jul 2017 High Score

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!

Hero Game 24 Jul 2017 Tree 2