Category Archives: iphone

NetHack 4 on iPhone 4

[update 2014-01-03]
Hi Kevin, sorry, I inadvertently deleted your comment and I can’t comment on this blog anymore 🙁 That’s probably a bug you mentioned, though iNetHack is no longer maintained (by me).
[/update]

How to export SMS conversations from your iPhone into text

You probably know this. There are some very precious SMS conversations on your iPhone, maybe with that special someone, and you want to archive them. You know that they are backed up regularly by iTunes, but what if you want to view them on your desktop machine? Or send them to that special someone? If you don’t have your iPhone backups encrypted and know your way about sqlite it’s actually very easy.

sqlite3 "/Users/dirk/Library/Application Support/MobileSync/Backup/<UDID>/3d0d7e5fb2ce288813306e4d4636395e047a3d28"
.mode list
.separator ' '
.output <absolutefilename.txt>
select strftime('%Y-%m-%d %H:%M',date,'unixepoch'),case when flags=3
 then '<yourname>:' else '<othername>' end,text from message
 where address='<phonenumber>' order by date;

Obviously you’ve got to find out the phone number (which is called address in the SMS database) of your conversation partner first and replace it for <phonenumber>. You also have to make sure the flags are associated correctly and replace <yourname> and <othername> with the names you want t. In my database (iOS 4.3.1) it seems that all incoming texts have flags=2, and my responses have flags=3 but this might not be universally true. Your conversation will be saved to <absolutefilename.txt>, which should be absolute as the naming implies.

You might have to start from the top and drill down first a little to find out the address / phone number of your conversation partner, and whether the above assumption about flags is correct:

select date,address,flags,text from message order by date;

If you don’t know the UDID of your iPhone, plug it into iTunes and Cmd-LeftClick in the serial number field on the device summary.

New UI (with all its bugs) or iNetHack-like shortcuts?

So you’ve played the Slash’EM iPhone port. Some have noticed that it contains bugs 🙂 Many of them are very hard to get rid of. It’s certainly not impossible but maybe a little impractical for a port. The reason is that the UI builds and sends keyboard macros to the core, like ‘Tc’ to take off ‘c’. Can lead to weird behavior if you’re not wearing anything else and ‘c’ is uncursed. Or if you die just after the core has processed ‘T’ you just skipped the DYWYPI prompt (I can’t thoroughly explain it but I’ve experienced similar situations).

The alternative is to get back to a shortcut system. Maybe refine the way to build your own on-the-fly (which would then be subject to the bugs just mentioned though). Maybe even leave that out to avoid those bugs. Some Slash’EM features can remain (e.g. the context menu seems quite stable if you omit direct item interaction).

What would you prefer? Please leave your vote in the poll to-left!

Performance issues in iOS 4, especially for iNetHack

Just wanted to say that I’m aware of iNetHack’s performance issues on iOS 4. This forces me to change plans and port it to iHack as soon as possible. Before that I will release some Slash’EM bugfixes, which will hopefully add iOS 4 fast app switching (at this stage there are still major problems with it, but I don’t want to give it up yet), since Slash’EM and iNetHack will (hopefully) soon share the same exact iHack UI code.

(Universal) iPad support will have to wait a little bit longer :(. My original plan was to address this first with Slash’EM (since this is what I currently play, vampiric necromancers ftw!)

Current state of iNetHack, Slash’EM, NetHack HD, NetHack Cocoa

Update: To clarify things:
Eventually there will be both a Slash’EM and iNetHack in the app store, both universal, with a very similar UI. iNetHack will remain vanilla NetHack, Slash’EM is based on the latest stable release (Vampire) with the force-patch. Once that is done NetHack HD will be removed.

I just realized that the current situation of the NetHack and Slash’EM ports might be a little confusing 🙂 So here’s some detailed information:

Slash’EM (iPhone/iPad | Source)
Has been in development on and off for about five months (eternal beta?) and is nearing a release. The UI is different from iNetHack, there are no shortcuts, and the consensus from the beta forum seems to be that it’s a more efficient UI. A public release for iPhone is in sight. After that I have plans to modify it into a universal app (with basic UI changes) so it will make use of the iPad’s screen estate and special controllers.

iNetHack (iPhone/iPad | Source)
I consider its current codebase obsolete and it will get replaced by the Slash’EM UI. I don’t fix iNetHack bugs because most of them are already fixed in Slash’EM or a non-issue there due to the different UI. I accept them though for the time being and will address them one by one as soon as it gets its new codebase.

NetHack HD (iPad)
Developed completely in the dark without device or beta testers, it has quite some issues, including UI and performance (I only ran it shortly last week on an actual iPad and I wasn’t thrilled). It will be pulled from the store as soon as Slash’EM and iNetHack go universal. It currently has no public source distribution and there won’t ever be one since it’s already obsolete.

NetHack Cocoa (Mac OS X 10.5 and 10.6)
Has (minor) issues of its own which will get addressed but has low priority for me since I’m focusing on iDevices.

I hope this clarifies some things. The google code repositories will very likely be moved to github. Well-done patches are always welcome.

Check! A simple Task/Todo Manager

In the middle of preparing NetHack for the iPad I felt the need for a simple todo manager. My spiral notebook that I’ve been using for that kind of thing simply didn’t cut it for me anymore, it was too much hassle to move tasks between projects. So I looked online but I didn’t find exactly what I needed, so I made an app for that.

Check! is pretty simple. You can add tasks, and every task can have subtasks, and since a subtask is a task as well it can have subtasks. Repeat until your memory is exhausted.

The tasks on the main screen can serve as categories and important projects, as in the screenshot. This organization has proven to be working quite well for me, but Check! is flexible enough for other models.

There are no due dates and no explicit use of priorities, though you can certainly change the order of tasks to indicate priorities. If you are done with something simply swipe-delete it. In 1.0 you can shake your iPhone/iPod to enter edit mode, in 1.1 (not yet approved) there is a button for that.

If you want to support further iHack* development and/or need a simple task manager download it here. If you want to write a review let me know so I can send you a promo code.

The mythical Apple tablet

I know there’s a chance there won’t even be a tablet, but if the folks at Apple are indeed planning to unveil one at the end of the month, please don’t let it just be an iPhone on steroids. I know it’s very tempting, they are making quite a lot of money with their closed eco system, but please let the tablet OS be open in the same way Mac OS X is, meaning I can run whatever software I choose in whatever way I’ve chosen. The overwhelming factor that let me even contemplate switching to Mac OS X (after a friend started exposing me to it, repeatedly) was that it was essentially a (free)BSD with a nice desktop and all needed drivers preinstalled. I was basically in heaven, and to this day I view it in that way.

That said, even if the new OS is closed like the iPhone OS, the prospect of playing some good old *Hacks on a bigger screen with an efficient UI is so tempting that I feel compelled to port as much and many as I can. The new SlashEM is my first step in that direction, and I’d love to have a playable version by the time the (possibly mythical) tablet gets announced.

Slash’EM for the iPhone queued for a possible Q1 2010 release

That’s what I’ve been working on since iNetHack 1.3 hit the app store.

I’m rewriting the window engine from scratch, taking only general purpose classes and header stubs from iNetHack. The goal is to make it much more modular, maintainable, reusable etc. (attributes which quite frankly weren’t on the top of my design goals for iNetHack). This will also leed to some UI experiments in collaboration with the test team and hopefully come back as the base for the next iNetHack and more to come.

NetHack 64 bit vs iNetHack 32 bit

As we all know, NetHack needs a 64 bit environment to run properly 😉 I just spent two days trying to bootstrap some files for iNetHack on my only recently upgraded snow leopard machine (a process which was working fine with leopard) when in my desperation I started to compare struct sizes:


struct version_info {
unsigned long incarnation; /* actual version number */
unsigned long feature_set; /* bitmask of config settings */
unsigned long entity_count; /* # of monsters and objects */
unsigned long struct_sizes; /* size of key structs */
};

iPhone Sim: 16 bytes
iPod Touch: 16 bytes
Snow Leopard: 32 bytes

Yeah, told you so 🙂

This very probably still leaves some structure alignment differences between sim and device, since they don’t share bones very well, though they both operate on the same byte alignment (little endian).