Taking Sim City 2000 into pieces

SimCity 2000 (Maxis, 1993) is one of my superfavourite games, ever. I’ve been playing it for 20 years and it’s partially responsible of my terrible grades at high school. I have always liked modifying games, but so far I haven’t been serious about decoding the data files of this city simulator. And I have found some quite interesting things!

There were ports in a great number of platforms, from the Macintosh (the original) to GameBoy Advance, but my favourite is MS-DOS, and it’s what this article is about. There are two interesting files: the executable (SC2000.EXE) and the data file (SC2000.DAT). Unfortunately, Windows version didn’t came out in Spanish (my mother language), and Network Edition version works awfully bad (and it is available only in English). Continue reading “Taking Sim City 2000 into pieces”

JSF converter for SelectOneMenu

The main JSF feature (or, at least, the one I like the most) is the ease to link controller bean attributes to xhtml view. However there’s an inherent important limitation: in the HTTP standard keys and values always will be strings, because they are sent that way. Of course you could serialize an object to base64, but a barbaric thing like that should be avoided in almost any circumstance.

Then how can we link a HTTP control to an object? For that, JSF provides converters. Well, it will allow you to program them, of course. Neither PrimeFaces, my library of choice, includes these converters. Thus, I’ve programmed a simple one for SelectOneMenu, the dropdown menus in the like of a combobox. I’ll leave it here for my own reference, and for anyone that could use it.

Continue reading “JSF converter for SelectOneMenu”