Zarf's packaging of games on iOS

I really like zarf’s packaging of his games into standalone apps for the iPhone (and I assume iPad).

The tabs for maps, and notebooks, plus the size of the type, etc. I prefer it to Frotz (though I also love Frotz and love that Frotz lets me play so many great games).

Has Zarf made any of his — I’m not sure of the word – framework? packaging? — public? I wonder if that was part of his kickstarter. I’m sure I could be remembering/understanding this completely wrong.

I’m asking because I would love to take games I’ve made and package them as stand-alone apps and try to get them published. Perhaps there are problems with this aim (maybe we don’t WANT just anyone to be able to package up games, etc, because the games would be of such low quality maybe?)

github.com/erkyrath/iosglulxe
github.com/erkyrath/iosfizmo

It’s basically just these I think.

Yeah, that’s it. There’s additional code for the game-specific tabs (map, recipe journal, etc) but this is – as you might expect – game-specific.

There are instructions on the wiki pages:
github.com/erkyrath/iosglulxe/w … an-iOS-App (for Glulx)
github.com/erkyrath/iosfizmo/wi … an-iOS-App (for Z-code)

I wrote those a couple of years ago, so Xcode has changed a bit. You may have to do some additional futzing with the project file.

Anyone using this interpreter, though, should probably think about upping the maximum font size. As a user, my favourite font (Baskerville) displays too small on my iPod for my eyes too read comfortably, so I would encourage anyone using these wrappers to give some serious thought to the font max limit.

For what it’s worth.

Thanks zarf! And everyone.

Not sure if anyone else has tried this, but I was able to submit an app to the app store for review. Whether or not it gets accepted is another matter.

This was for a z-code game. I’m going to do another with glulx and perhaps that is even more up to date.

Zarf’s code and instructions are very clear, but they are a few versions out of date. I can’t remember all the small differences, but here are the main ones:
–To install a provision on your device, you click “Window” from the top menu, then select “Devices” — in the window that pops up, you control-click the device, and on THAT drop down you pick “show provisioning profiles.”

–Zarf’s code is set to target iOS version 4.something — but iTunes will only accept projects that target at least 5.1.1. So you select the main file in the left-hand window, then select the “general” tab in the middle window, and then in the middle window you can set the target operating system to be higher (the minimum is 6.0 I believe).

–When you first open zarf’s code (or rather, when you check out his code and make a clone of it? i am over my head as I’m sure is evident) – you’re asked if you want to update and fix issues with the code, and I just said “yes” — I think all it does is show you warnings for every command that’s been deprecated.

–Zarf’s instructions don’t go through the iTunes submission process too much. It’s finicky but well documented on Apple’s site. It involves a lot of screenshots of your game on different devices, and then searching through XCode’s menus to find the “archive” and “validating” it.

There are a million warnings on the code, but it is still accepted. (The warnings are mostly about implicit conversion of longs to integers, and then a smatter of deprecated formatting things).

My, what an exciting post this is! Anyway, I was impressed at how clear zarf’s instructions were. It’s still a slog to do, but it was possible.

Yeah, sorry, I know I haven’t updated the instructions for a while.

The Glulx project is somewhat cleaner, for two reasons: I did some cleanup while releasing Hadean Lands, and I combed over the Glulxe core source code to remove warnings. The Fizmo core source throws buckets of warnings under the Mac compiler and I just ignore them.

Makes sense. z-code is sorta deprecated. I just had a game that was well tested so I didn’t want to touch the code. Everything newer I make is and will be glulx.

Also, I didn’t mean to complain. I’m grateful and impressed you made it available, and your instructions ARE clear and get you at least… 85% of the way? Which is a lot.

Also, the Glulxe iOS project includes the UI for importing and exporting save files. This has not yet been integrated into the iOSFizmo setup. It’s not that there’s anything hard about it; I just haven’t made the changes.

For the iosgluxe package – I am trying to change the “help” tab into a map tab. Not an interactive or revealing-as-you-go map, just a JPG of a map.

I think I can create and rename graphics so that the “help” icon is a “map” icon.

BUT is there a way to make it so that tab, when you swipe on it, pans the graphic back and forth, rather than moves to another tab?

The tab-swipe gestures are defined in the viewDidLoad method of the tab’s view controller:

	if ([IosGlkAppDelegate gesturesavailable]) {
		/* gestures are available in iOS 3.2 and up */
		
		TerpGlkViewController *mainviewc = [TerpGlkViewController singleton];
		UISwipeGestureRecognizer *recognizer;
		recognizer = [[[UISwipeGestureRecognizer alloc] initWithTarget:mainviewc action:@selector(handleSwipeLeft:)] autorelease];
		recognizer.direction = UISwipeGestureRecognizerDirectionLeft;
		[webview addGestureRecognizer:recognizer];
		recognizer = [[[UISwipeGestureRecognizer alloc] initWithTarget:mainviewc action:@selector(handleSwipeRight:)] autorelease];
		recognizer.direction = UISwipeGestureRecognizerDirectionRight;
		[webview addGestureRecognizer:recognizer];
	}

You can comment out this stanza to disable the gestures. I did this in the Hadean Lands map tab.

To make the graphic itself pan, you’d have to embed the UIImageView in a UIScrollView. This is not too hard, but I’m not going to try to teach iOS programming in this forum. :slight_smile:

Understandable. Thanks!