The WOPR running on Adobe AIR 2

I don’t know about you guys, but one of my favorite movies of all time is WarGames with Matthew Broderick.

If you haven’t seen it, Netflix has it available on instant watch… go now… watch it… I’ll wait.

Alright, awesome movie huh?!

One of the characters in the movie is Joshua, also known as the WOPR or War Operations Plan Response.

WOPR

With the release of Adobe AIR 2.0, Adobe has given us a new fun class to play with, ServerSocket.

The ServerSocket class allows code to act as a server for Transport Control Protocol (TCP) connections.

So I decided to combine my love of WarGames and the WOPR and create a WOPR emulator in Adobe AIR 2 that can be accessed using Telnet.

How to use the WOPR

Install using the badge installer here:

[kml_flashembed publishmethod="dynamic" movie="http://zaalabs.com/demo/wopr/AIRInstallBadge.swf" width="215" height="180" targetclass="flashmovie" fvars="airversion=2.0&appname=WOPR&appurl=http://zaalabs.com/demo/wopr/WOPR.air&image=http://zaalabs.com/demo/wopr/woprbadge.jpeg"]

Get Adobe Flash player

[/kml_flashembed]

When you open the WOPR application it attempts to connect to 127.0.0.1 (localhost) on port 9999. If the console doesn’t show an error, you’re good to go.

On the Mac, open up Terminal (Applications > Utilities > Terminal)… if you’re on the PC, you should go and download PuTTY.

Once you’re in Terminal enter this command (if you change to a different port number, use that number instead of 9999):

telnet 127.0.0.1 9999

Once you’re in, you can have fun with Joshua. For example:

LOGON: Joshua
GREETINGS PROFESSOR FALKEN.
Hello
HOW ARE YOU FEELING TODAY?
I am fine. How are you?
EXCELLENT. IT'S BEEN A LONG TIME.
CAN YOU EXPLAIN THE REMOVAL OF YOUR USER ACCOUNT ON 6/23/73?
People sometimes make mistakes
YES THEY DO. SHALL WE PLAY A GAME?
Love to. How about Global Thermonuclear War
WOULDN'T YOU PREFER A GOOD GAME OF CHESS?
Later. Let's play Global Thermonuclear War
FINE

It’s a lot of fun! I haven’t implemented any of the games yet… but this shows what kind of cool stuff you can write with the new Adobe AIR 2 features.

Download Full Source Code here.

Enjoy!

Tags: , , ,

8 Responses to “The WOPR running on Adobe AIR 2”

  1. Chad June 14, 2010 at 4:35 pm #

    Love this! Haha. So fun.

  2. Eric Fickes June 15, 2010 at 11:27 am #

    Seriously cool

  3. Amanda July 28, 2010 at 11:31 am #

    Looks like fun, but when I tried using it the moment I type a character at the LOGON prompt, I get kicked out with “IDENTIFICATION NOT RECOGNIZED BY THE SYSTEM –CONNECTION TERMINATED–“. Do I have to watch the movie to get past this part? ;0)

  4. manesag July 20, 2011 at 1:56 pm #

    why does this disconnect me putty windows 7

  5. SnidleyWhiplash February 1, 2012 at 6:47 am #

    Awesome emulator, I am trying to get it to trigger the sound bite files from the movie as it is displayed..

  6. Joe May 15, 2012 at 9:41 pm #

    I can’t run it! please make one that runs on windows 7!

  7. Joe May 15, 2012 at 9:46 pm #

    It’s got to be broken. adobe air says that an error has occeured.

  8. Cody August 27, 2013 at 5:42 am #

    Use Raw 127.0.0.1 9999, it should war everytime. Note it does not have the voice.

Leave a Reply