Archive for the ‘games’ Category

Paul Krugman would have been a good game designer

Sunday, May 24th, 2009

Back in the 1990s, I enjoyed programming some games for myself and friends to play. Once the game existed, and we’d played it a few times, we’d start asking, “How would the game change if we changed X?”

Via Brad Delong, I stumble upon this oddly simple economic model from Paul Krugman:

But if the money supply is constant, M’ = M; also, C = L. Given the utility function, consumers will spend a share 1-s of their initial wealth on goods, s on money. So we can represent equilibrium either by the condition that demand for goods equal supply,

L = (1-s)(L + M/P)

or by the condition that demand for money equal supply,

M/P = s(L + M/P).

Both ways of looking at it imply the price-level equation

P = [(1-s)/s)](M/L)

so the price level is proportional to the money supply.

If he’d flunked out of economics school, he could have done a lot to improve SimCity.

Where in the world is JavaFX?

Wednesday, March 18th, 2009

So, late last year I started learning JavaFX. I thought this would be a great way to learn about other areas of computer programming (since I mostly do PHP programming for websites). Sun Microsystems seems committed to pushing JavaFX as the next Big Thing. Sun has pulled their best people off of other important projects so that it could maximize its investment in JavaFX:

For almost two years now, Sun has been promoting JavaFX, the centerpiece of its vision for Java as a viable rich-client technology, and an alternative to Adobe’s Flex and Microsoft’s Silverlight. At heart, JavaFX is a JVM-based domain language for constructing rich user interfaces, as well as a set of APIs for that language.

…In spite of a thriving Swing community, and despite Swing’s large user base, Sun has re-focused its efforts around JavaFX over the past year-and-a-half, at the expense of Swing development. The most visible aspects of that change in focus is that many of the most experienced Swing developers left the company, such as Chet Haase (see Artima’s interview with Chet Haase), Hans Muller, or Scott Violet. The important Swing-related JSRs have also been stale for a long time now: the latest JSR 295 and 296 updates occurred in June, 2006, according to the JCP’s Web site.

For all the money that Sun is throwing at JavaFX, I’m surprised at how slowly it is finding a market.

I had assumed that JavaFX might make some progress in two areas:

1.) Online games.

2.) Cell phones.

Of course, online games was always a long shot, since Flash is so deeply entrenched. I was just looking at the games over at Casual Collective, they are all built with Flash. Online game developers are comfortable with Flash, and probably nothing can change that situation in the medium term.

Then there were cell phones. Here I thought JavaFX would make big progress. Jonathan Schwartz emphasized this in his talks at JavaOne. It’s been almost a year now, yet the press still doesn’t mention JavaFX when they talk about cell phones:

Heavyweights in the field include Nokia   and its Symbian operating system, BlackBerry maker Research In Motion, upstart Apple  and a staggering Microsoft  with its Windows Mobile system.

Each bring a special approach to the fight. Nokia has the unmatched size and reach, holding 40% of the smartphone market. RIM’s knockout punch is email. Apple’s iPhone is a showboat that dazzles crowds with media prowess. And Microsoft is fighting to carry an enormous Windows franchise to smartphones.

…Google funded Android, a smartphone operating system that HTC fashioned into a touchscreen phone called G1 sold exclusively by Deutsche Telekom’s   T-Mobile.  And while other phone makers, notably Motorola, have selected Android as its software partner, a new crop of G-phones has yet to arrive.

Meanwhile, Apple continues to advance its platform:

Apple unveiled new software for the iPhone that will support some long-anticipated features, such as copy-and-paste of text and picture messaging, as the company pushes to stay competitive in the phone market.

Apple also gave its vast network of software developers a slew of new options for upcoming applications, such as support for subscription models and automatic alerts, a move applauded by analysts.

“They’ve taken a few more steps ahead of the pack in the race,” said CCS Insight analyst John Jackson, adding that, in spite of the omission of certain features until now, the iPhone was still the most high-profile cell phone.

“Two years on they still have the cool phone and business model that everybody’s talking about and trying to emulate.”

Last year the folks at Sun were pushing the idea that JavaFX was the natural choice for Android. That might happen eventually, but for now, few developers have bought into Sun’s vision. Search for “Android JavaFX” and all you find is propaganda from Sun and some developers griping – you don’t find a single site singing about this idea with enthusiasm.  Search for “JavaFX” and all of the news is for developers – there are still no mentions of any consumer products. Sun seems to be running behind the rest of the pack. Most of the news articles focus on how amazing JavaFX will be when it is finally all done, and “all done” seems to always be a few more releases in the future:

However, some notes casually buried away in the 1.1 release notes suggest otherwise: the javafx.ext.Swing package isn’t available in the common profile so won’t work in mobile applications – this means no standard desktop UI components such as buttons, trees and listboxes. You do get one component, javafx.scene.control.TextBox. But the richness of the desktop component set just isn’t there in the mobile configuration. When you look at the existing mobile demos, you’ll quickly realize the colorful, motion-blurred, willy waving – such as a custom image masquerading as a button – divert attention from the lack of GUI components.

Yes, we’ve known all along that you need to build to the Common profile if you want to run on a mobile device; but if easy-to-use UI components aren’t part of that API, doesn’t that defeat the whole purpose of the very UI-centric JavaFX? More UI controls will be hitting the Common profile before JavaOne 2009, but until then mobile developers might find things a little half-baked. The Register does point out one saving grace: unlike the situation on the desktop, JavaFX mobile does not particularly lag offerings from Adobe (whose Flash Light isn’t in wide use) or Microsoft (which doesn’t even have a real mobile version of Silverlight yet).

It’s easy to want to root for Sun. They’ve been good to the open source community. They’ve donated billions of dollars worth of effort and software (Open Office, Java, etc). A world in which they are thriving seems likely to be a better than one in which Microsoft or Adobe are winning with their proprietary systems. Yet Sun doesn’t seem to have any understanding of how to succeed with consumer level technologies.

I’m still hopeful about JavaFX, mostly because I have faith in Google, and Android will allow Java to run on cell phones. But, damn, I am surprised about how slowly this technology is reaching the market (after all, Sun first announced JavaFX at the JavaOne conference back in 2007).