Tag Archives: programming

A Brick-Breaking Game in JavaScript

Below is a simple brick-breaking game implemented in JavaScript. Its gameplay is similar to the classic games Breakout and Arkanoid. To see it in action, copy it into an .html file and open that file in a web browser that … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

An Asteroids Clone in JavaScript

Below is a simple clone of the classic video game Asteroids implemented in JavaScript. To see it in action, copy it into an .html file and open that file in a web browser that runs JavaScript.

Posted in Uncategorized | Tagged , , | Leave a comment

An Adding Machine in JavaScript

The JavaScript code below implements a simple adding machine. To see it in action, copy it into a .html file and open that file in a web browser that runs JavaScript. Or, for an online version, visit https://thiscouldbebetter.neocities.org/addingmachine.html.

Posted in Uncategorized | Tagged , , , , , , | Leave a comment

A Simulation of Pest Eradication in JavaScript

The JavaScript code below, when run, simulates a ecological pest-eradication scenario. An exterminator chooses a target at random, travels over a network of links and nodes to get as close as possible to the target, moves off the network towards … Continue reading

Posted in Uncategorized | Tagged , , , , , | Leave a comment

A Simple Data Transcoder in JavaScript

The JavaScript program below converts data encoded in UTF8, Base64, or hexadecimal format into one of the other encodings. To see the code in action, copy it into a .html file and open that file in a text encoder that … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

Exploring the SVG Vector Image File Format in JavaScript

The JavaScript program below accepts a vector-based “path” in JSON format and converts that path to the SVG format. The output can then be viewed in a program that understands the SVG format, such as most modern web browsers. The … Continue reading

Posted in Uncategorized | Tagged , , , , , , | Leave a comment

Drawing Ellipses (Ovals) to an HTML5 Canvas with JavaScript

The JavaScript code below, when run, prompts the user to input information about an ellipse (oval), and then draws that ellipse to the screen. To see it in action, copy it into an .html file and open that file in … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment