WebAssembly: What Is It And Why Should You Care?

If you keep up with the field of web development, you may have heard of WebAssembly. A relatively new kid on the block, it was announced in 2015, and managed to garner standardised support from all major browsers by 2017 – an impressive feat. However, it’s only more recently that the developer community has started to catch up with adoption and support.

So, what is it? What use case is so compelling that causes such quick browser adoption? This post aims to explain the need for WebAssembly, a conceptual overview of the technical side, as well as a small hands-on example for context.

Continue reading “WebAssembly: What Is It And Why Should You Care?”

Death Generator Makes Game Over More Personal

“Game over”. In this day and age of complex games with storylines and career modes that last for tens of hours, it’s not really a concept that has a lot of relevance. However, in the golden age of the arcade, those two words made it very clear that your time was up and it was time to find another quarter. Home games of this era were similarly blunt, and if you couldn’t rise to the challenge, you’d be seeing the death screen more often than not.

[foone] was a fan of Sierra’s classic adventure games, and decided to create a tool to generate custom versions of these Game Over/YOU DIED screens. Aptly named Death Generator, the tool is programmed in JavaScript and quickly expanded to cover a wide realm of classic titles. There are King’s Quest IV and V, Gold Rush!, and even modern titles like Cave Story+ and Undertale. There’s plenty of fun to be had typing in completely ridiculous quotes for various screens; our personal favourite is Skate or Die, though Police Quest comes a close second.

[foone] continues to maintain the site, and adds new games from time to time. Animated GIF support has been a recent addition for screens like Metroid and Bad Dudes, and there are even character choices for Super Mario Bros. The code is available on Github if you feel the need to tinker yourself.

Arduino Enters The Cloud

Love it or hate it, for many people embedded systems means Arduino. Now Arduino is leveraging its more powerful MKR boards and introducing a cloud service, the Arduino IoT Cloud. The goal is to make it simple for Arduino programs to record data and control actions from the cloud.

The program is in beta and features a variety of both human and machine interaction styles. At the simple end, you can assemble a dashboard of controls and have the IoT Cloud generate your code and download it to your Arduino itself with no user programming required. More advanced users can use HTTP REST, MQTT, Javascript, Websockets, or a suite of command line tools.

Continue reading “Arduino Enters The Cloud”

Build Retro Games With Script-8

A whole generation of programmers learned to program by writing — or at least typing in — game programs for relatively simple computers like a TRS-80, a Commodore 64, or any of a handful of similar machines. These days, games are way more complicated and so are computers. Sure, it is more fun to play Skyrim than Snake, but for learning, you are probably going to get more out of starting with a simple game. If you want to learn programming today — or maybe start someone else on that same journey, you should check out Script-8, a project by [Gabriel Florit]. You can get a taste of how it looks in the video below, or just surf over to the site and play or modify a game (hint: press “a” to launch the ball).

Instead of paraphrasing, here’s the excellent elevator speech from the web site:

SCRIPT-8 is a fantasy computer for making, sharing, and playing tiny retro-looking games (called cassettes). It’s free, browser-based, and open-source. Cassettes are written in JavaScript.

Continue reading “Build Retro Games With Script-8”

Hack Your Gmail: A Quick Start For Google App Scripting

For many people, Gmail is synonymous with e-mail. Some people like having cloud access to everything and some people hate having any personal data in the cloud. However you feel about it, one thing that was nice about having desktop software is that you could hack it relatively easily. If you didn’t like how your desktop mail client worked, you had a lot of options: use a different program, write your own, hack the executable of your current program, or in the case of open source just fork it and make any changes you are smart enough to make.

Google provides a lot of features with all of its products, but however you slice it, all the code runs on their servers out of your reach. Sort of. If you know JavaScript, you can use Google Apps Script to add features to many Google products including Gmail. If you’ve used Office scripting, the idea is the same, although obviously the implementation is very different.

With scripting you can make sophisticated filters that would be very hard to do otherwise. For example,  monitor for suspicious messages like those with more than 4 attachments, or that appear to come from a contact between the hours of 2AM and 5AM.

For our example today, I’m going to show you something that is easy but also highly useful.

Continue reading “Hack Your Gmail: A Quick Start For Google App Scripting”

Delicious Vector Game Console Runs Pac-Man, Tetris, And Mario

The only question we have about [mitxela]’s DIY vector graphics game console is: Why did he wait five years to tell the world about it?

Judging by the projects we’ve seen before, from his tiny LED earrings to cramming a MIDI synthesizer into both a DIN plug and later a USB plug, [mitxela] likes a challenge. And while those projects were underway, the game console you’ll see in the video below was sitting on the shelf, hidden away from the world. That’s a shame, because this is quite a build.

Using a CRT oscilloscope in X-Y mode as a vector display, the console faithfully reproduces some classic games, most of which, curiously enough, were not originally vector games. There are implementations of the Anaconda, RetroRacer, and AstroLander minigames from Timesplitter 2. There are also versions of Pac-Man, Tetris, and even Super Mario Brothers. Most of the games were prototyped in JavaScript before being translated into assembly and placed onto EEPROM external cartridges, to be read by the ATMega128 inside the console. Sound and music are generated using the ATMega’s hardware timers, with a little help from a reverse-biased transistor for white noise and a few op-amps.

From someone who claims to have known little about electronics at the beginning of the project, this is pretty impressive stuff. Our only quibbles are the delay in telling us about it, and the lack of an Asteroids implementation. The former is forgivable, though, because the documentation is so thorough and the project is so cool. The latter? Well, one can hope.

Continue reading “Delicious Vector Game Console Runs Pac-Man, Tetris, And Mario”

Nim Writes C Code — And More — For You

When we first heard Nim, we thought about the game. In this case, though, nim is a programming language. Sure, we need another programming language, right? But Nim is a bit different. It is not only cross-platform, but instead of targeting assembly language or machine code, it targets other languages. So a Nim program can wind up compiled by C or interpreted by JavaScript or even compiled by Objective C. On top of that, it generates very efficient code with — at least potentially — low overhead. Check out [Steve Kellock’s] quick introduction to the language.

The fact that it can target different compiler backends means it can support your PC or your Mac or your Raspberry Pi. Thanks to the JavaScript option, it can even target your browser. If you read [Steve’s] post he shows how a simple Hello World program can wind up at under 50K. Of course, that’s nothing the C compiler can’t do which makes sense because the C compiler is actually generating the finished executable, It is a bit harder though to strip out all the overhead yourself.

Continue reading “Nim Writes C Code — And More — For You”