Tag Archives: games

Finding Collisions of Circles and Line Segments in Javascript

The JavaScript program below creates a field full of circles and line segments of random size, position, and velocity, and calculates and displays the collisions between them. To see the code in action, copy it into an .html file and … Continue reading

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

Finding Collisions of Circles in JavaScript

The JavaScript program below creates a field full of circles of random size, position, and velocity, and calculates and displays the collisions between them. To see the code in action, open it in a web browser that runs JavaScript.

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

Running the Unity Game Editor on Linux Mint

Follow the instructions below to download, install, register, and run the editor for the Unity game engine in Linux Mint. 1. Open a web browser and navigate to the URL “https://blogs.unity3d.com/2015/08/26/unity-comes-to-linux-experimental-build-now-available/“, then click the link labelled “Official 64-bit .deb Package” … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

A Graphical Inventory for a Video Game in JavaScript

The JavaScript code below implements a inventory session for a video game. To see it in action, copy it into an .html file and open that file in a web browser that runs JavaScript. Use the arrow keys and the … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

Getting Input from Gamepads with HTML5 and JavaScript

The JavaScript program below, when run, will display the current state of all gamepads connected to the user’s system. To see it in action, copy it into an .html file and open that file in a web browser that runs … Continue reading

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

An Aerial Combat Game in JavaScript

The JavaScript code below implements a simple 3D aerial combat (“dogfight”) game. To see it in action, copy it into an .html file and open that file in a web browser that runs JavaScript. Use the W, A, S, D … Continue reading

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

Detecting Collisions of Shapes in JavaScript

The JavaScript program below, when run, displays a wraparound playfield filled with squares moving in random directions at random speeds and rotating at random rates. When two squares overlap, the collisions between them are highlighted with small circles. The program … Continue reading

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