by Kieron Murphy

Riddler.Com isn’t just playing around with Java

news
Nov 11, 199610 mins
Core JavaDeveloperJava

Web site's "joint-development" advertising model -- using Java as its core technology -- has users and marketers reading off of the same script

Interactive Imaginations, a 75-person company based in New York City, is on the fast track to making Java pay off by offering Web surfers a deal that sponsors can’t resist: Play Riddler. Get stuff.

The bargain is simple: Members sign up by answering a few demographic questions and then get to play interactive brain-teasers that allow them to collect β€œcaps.” When they collect enough caps they become eligible to win a decent prize from one of the advertisers. Meanwhile, you’re exposed to a little of the sponsors’ hypertext hype and you’ve added your two bits to a valuable marketing database. Sound familiar? Pepsi could roll over and die of envy.

In Riddler’s joint-development scheme, sponsors are both advertisers and investors, as well as providers of the game prizes. Naturally, the prizes are the attraction to users, consisting of such things as a lease on a Ford Explorer, a nine-day Alaskan vacation, an AcerNote Pentium laptop, and a Kodak digital camera. The advertising is sufferable: to enter a game, you must pass through a small page of hyperlinks from the likes of Apple Computer, Microsoft, NBC, and Toyota. The games are challenging β€” the crosswords are written by world-champion puzzler Stan Newman of Random House and the riddles and trivia games are written by Harry Eisenberg, formerly of β€œJeopardy.” Riddler is also in the process of licensing games from sources as disparate as EarthWeb’s applet library and the owners of the classic TV show β€œName That Tune.” The Riddler Web site’s programmers heavily rely on Java.

Addicted to Java

β€œWhen we relaunched earlier this year, we went online with three Java game applets,” said Jon Williams, Riddler’s chief technology officer, a native Australian. β€œWe wrote those games ourselves, and they took a long time β€” about 2,000 lines of code a piece. We chose Java because it provides immediate feedback, compared with CGI. The second reason was that it was an ideal way to develop multiplayer games, where three players can compete against one another at the same time.”

Currently, Riddler’s Java-enabled games include:

  • King of the Hill, a multiplayer trivia contest
  • Checkered Flag, a multiplayer crossword contest
  • Gridlock, a single-player crossword
  • Mental Floss, a single-player trivia game (in a hybrid of Java and CGI)
  • Klondike, a classic solitaire game available to non-registered users as a sort of demo (without the prizes)

All are intuitive and simple in their presentation. The crossword and trivia games offer three levels of difficulty, so they are appropriate to all age groups. To play a game for a possible prize, you begin by paying a β€œRiddlet” entry fee. (Riddlets are like chips at a casino. Upon registering with Riddler, you are issued 2500 Riddlets. Your β€œinventory” of Riddlets allows you to either play new games for a payoff in caps or to trade Riddlets directly for caps in a designated area. Caps are what count for gaining prizes.) If you win a game, you are rewarded with a varying number of prize-specific caps. Amass enough caps for a prize over a designated period and it could be yours. The only trouble is that you are competing with thousands of other players to win the coolest prizes.

β€œWe had data showing users online for 15 or 16 hours at a time originally,” said Jack Bonanni, Interactive Imaginations’ executive vice president for business development. β€œThere are limits to anything. So there are some new rules for game availability now. We’re doing whatever we can to keep things fair.”

More than just fun and games

Interactive Imaginations is using Java for more than just game applets. Riddler’s designers use Java for many of their under-the-hood applications. And the most important of these concerns is security β€” no small matter when you’re handing out cars and cruise-ship vacations.

β€œObviously, a programmer could emulate one of our games and just return a response saying β€˜I won’,” said Williams. β€œAnd they could go on doing this until they had collected enough caps to qualify for a Toyota. So what we did was design an RSA-hybrid encryption algorithm written in a set of Java classes. We took Java RSA, in which we used the ND5 RSA implementation, and…. I guess I better not tell you what we actually did with it. But I can say that we also used some double-encryption, along with another technique I won’t disclose, just in case someone was able to hack the RSA-hybrid code. So we have a normal server and a Java client, and at the beginning of a game we pass encrypted data about the user ID and the user’s status in the game; and at the end of the game the encrypted results are passed back. That can only happen once, because the security keys are passed back and forth. So this prevents a programmer from logging-in and hacking repeated game wins. And this is all connected in Java.”

Williams takes pride in the prowess of his technical staff. β€œThe security code was written by a couple of our in-house programmers,” he said. β€œWe took public-domain RSA code and modified it. Next we took C++ code and converted it into Java, which actually was quite simple.”

Wrapper’s paradise

β€œFor our new solitaire game, which we licensed from an individual who had posted the applet on Gamelan, we wrapped our Java security code around the original game applet,” Williams said. β€œAnd we did this in such a way that with very little engineering we can reproduce this technique as often as we want. So now we can license any applet that strikes our fancy and have it up on our site in almost no time at all. The next thing we’re going to do is take our multiplayer capability and turn that into a wrapper for third-party games, too.”

β€œWe present a unique opportunity for game developers working in Java to have their creations licensed,” said Bonanni. β€œWe encourage them to contact us.”

ActiveX versus Java

Riddler’s newest prize game is a palindrome puzzle called !AHA! β€” collaboration with Microsoft that employs ActiveX for delivery via Internet Explorer 3.0 exclusively. When asked about the differences in working in the two competitive programming languages, Williams was frank. β€œOne of the things I think is missing with Java is the GUI design environment. When we did the ActiveX project, we had that. So we got to use these great screens, and we had things going within minutes. In Java, that’s not quite here today. But it’s coming at about a hundred miles per hour down the pike.” Ironically, though, !AHA! is not written completely in ActiveX.

β€œWe weren’t happy with some of the ActiveX controls, such as the marquee, so we looked at Java,” said Williams. β€œAnd we found a couple of Java classes that we really liked. So we incorporated them and called them from VB Script. So even in !AHA!, some of the controls are written in Java.”

β€œOur games are simple to play, but they were not simple to construct,” added Bonanni. β€œWe use whatever technology fits our needs. Or we will adapt it to improve it for our needs.”

β€œFor example, we used Visual J++ to develop our own applets,” Williams continued. β€œWe started using the JDK, but we switched to using J++. One of our hallmarks is that we are not betting on any one technology.”

A conglomeration of components

Riddler’s next project is a multiplayer version of TV’s β€œName That Tune.” World Wide Web rights to the show were purchased in August. At the time, Michael Paolucci, CEO of Interactive Imaginations, said, β€œThe Net is evolving in the same way that television evolved from radio. We believe that classic game-show programming like β€˜Name That Tune’ will quickly move the Web in the direction of competing directly against television.” The difference, of course, will be that instead of watching the game, users will become the contestants. And the challenge before the Riddler technical team, of course, is to integrate sound into their interactive model.

β€œIt will be handled in the same way we did !AHA!, as a conglomeration of components,” said Williams. β€œReally, what we like to do is use the simplest tool for the most efficient solution. ActiveX has some things that take five minutes to execute, whereas Java takes an hour. So for some [β€œName That Tune”] things we will use ActiveX. But for the really serious coding of the game, like security, we are still going to use Java.”

When asked about future trends for technology development at Riddler, Williams responded, β€œWell, there’s JDBC, there’s ODBC connectors, there’s writing Java servers so that we have Java-to-Java and Java-to-Oracle connections β€” Oracle has Web connectors coming out β€” and our Oracle database is what allows us to keep track of everything that happens on our system, using a program we wrote ourselves, called Ridmark. NSAPI is interesting, ISAPI is interesting, but Java is open. So we’re ready for anything. We do our own testing to see which systems we ought to use. I think we’re as advanced as any other large Web site that I have knowledge of.”

When pressed on the issue of rewriting Riddler’s servers in Java, Williams was realistic in his assessment: β€œMy view is that CGI is really fading into the background,” he said. β€œAs far as what is going to replace CGI on the server side, Java is probably the number-one contender. I say β€˜contender’ because I have reservations β€” it’s not a completely proven technology. So, again, we’re testing it. But we haven’t come to a decision yet. If we did do it, we’d probably be one of the first. So it’s definitely something we’re contemplating β€” if you have the whole server written in Java, it becomes portable. However, you are then left obviously with the issues involved in how long it takes to play a game. By writing your server in Java, you already are hit with a 25 percent performance degradation. So we have to address a lot of issues there. The good news for us is that we haven’t fully committed to any of the technologies we use so far. CGI, ActiveX, Java β€” we’ll take advantage of whatever technology it takes to keep us out in front.”

Bonanni said the Riddler site is attracting partners in the company’s β€œCommonwealth Network” project.

β€œWe deliver interactive banners to affiliated members on the Web,” Bonanni explained. β€œThe advertisers include names like Snapple, Microsoft, Apple, and the Cobb Group. This is where we see our business headed, in working with the booming market of independent Internet entrepreneurs, into generating activity and revenue for their sites.”

A soft machine

The folks at Riddler aren’t fooling around in their efforts to cash in on their success in using cutting edge technology and creating compelling content. This past summer they enlisted Softbank’s Interactive Media Sales Group to represent the Commonwealth Network, and already it has signed up more than 1,000 Web sites as affiliates to its new service. Softbank (a competitor of β€œJavaWorld’s” parent company, International Data Group) offers affiliation free of charge and pays participating sites on an impression-per-time basis. For Interactive Imaginations, Java is more than a programming language, it’s a central ingredient in the company’s innovative business model.

Kieron Murphy is a freelance technology writer based in New York City. He has worked in the past for IEEE Publishing, John Wiley & Sons, Miller-Freeman Publications, SIGS Publications, and Ziff-Davis Publishing.