Skip to content
March 3, 2011 / isallmaroon

We need your help!

So far, I’ve been doing all the graphics and design work for the things we do, and I’ll admit I enjoy doing all that stuff. But I’ll also admit that I’m not really all that good at it! Plus, it takes so much time and effort for me to make anything look decent, not to mention graphically coherent and appropriate etc. As we’re taking on more and more projects and bigger and cooler ideas I’m just feeling more and more overwhelmed. I need help!

So, first off, this is not a job ad, we’re not an actual company, we’re just two people who like to play around with doing this stuff in our spare time. We have day jobs and night jobs and crime fighting alter egos that all steal time from our precious app development. What we need is someone else like us, who just wants do this this for the love of doing it, but from whom “this” means drawing stuff, making uis, graphic design, more of the visual side rather than programming.

Is that you? Do you want to help us make awesome-looking things? Even small things like helping us come up with a visual style, doing a little bit of concepting based on an idea, small things like that… golden. Absolutely golden. We would worship you as if you were an ancient gargantuan serpent god.

Help us, Obi Wan Designer, you are our only hope!

If you are interested, let us know: info@ohminteractive.se.

Advertisements
February 13, 2011 / isallmaroon

Hack day – next ohm project, progress!

Cross-posted from koru.se.

Spent the day hacking on our next ohm project with Tobias, making pretty good progress. The concept is nailed down, now it’s just lots of work needed to get all the features in. This one is going to be really good! If we can get our shit together and decide on a name and basic graphical profile, I can even tell you what it is, soon…

In somewhat related news, Tobias also found a bug in in KeySea, so I fixed that and a few other minor issues and submitted another version to the app store. It’s just a minor update, but the bug Tobias found was pretty significant: PIN codes beginning with 0 broke the app…

February 5, 2011 / isallmaroon

KeySea Wallpapers

I uploaded some new wallpapers to the Media section. Hope you like it!

July 15, 2010 / Tobias Hieta

Cocos2D and orientation madness

Our first product, OHM Chess HD, uses Cocos2D. Cocos2D is a very nice library/framework for creating 2D games for the iPhone/iPad platforms, modelled after the Cocos2D framework for making indie PC games.

The library is great, but since it was originally written for the older iPhone platforms before the iPad existed, there are some issues with using it on the iPad. Most significantly, we fought very hard to get the orientation to be displayed correctly when holding the iPad different ways. On the older iPhone platform, applications are assumed to be running in portrait mode with the home button at the bottom of the screen, and an app can optionally choose to run in the landscape orientation. On the iPad, however, all applications should preferrably be able to run in any of the four orientations. As we drew nearer to release and hadn’t managed to get the orientation situation sorted, we decided to settle for running in either of the landscape modes, with a not-so-graceful flip of the screen when detecting that the device had been rotated. Now with the initial release out of the way, we decided to revisit the orientation issue and also make sure that we could display UIKit windows much better for our next version.

So what is the problem?
Cocos2d internally handles orientation by transforming the whole GLScene with glRotate, so when you call:

[[CCDirector sharedDirector] setOrientation:kCDOrientationPortraitLeft];

it will for each update do:

glTranslatef(width,height,0);
glRotatef(90,0,0,1);
glTranslatef(-height,-width,0);

This is all fine, because the normal routine for a cocos2d program is to attach it’s OpenGL view directly to the window, the listen to notifications about device rotation, when a notification about rotation would arrive you would just call setOrientation again and cocos2d would flip the view again. There are however problems with this approach: first of all it happens without transitions (take up your iPad flip any program you have and you’ll see that it will actually rotate) and if you want to mix this with UIKit you can have big problems.

UIKit, Cocos2D and orientation
In OHM Chess HD we need to show different UIView’s (for example the About dialog is a UIWebView, which seems silly to implement any other way) on top of the cocos2d view. That lead to some really screwed up code for placing it in the OpenGL scene and make sure that the orientation stayed correct and we concluded that to work properly all UIView’s really want a UIViewController at the root. So we added a UIViewController as a root object to the Cocos2d view thinking that there should not have been any problem, the following screenshot is from that attempt:

Wow, that wasn’t at all what we wanted. so what happened? It took us unnamed number of hours to figure out that when UIViewController receives the rotation notifications it actually flips the view for us by calling:

self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(-90));

which is almost the same as the glRotate from above. Effectively this double flipped the view, first once internally in cocos2d and then in UIViewController. Weexperimented with this quite a bit and it was really frustrating, because when we got our scene in the correct orientation all UIKit windows where turned the wrong way.

A solution
The solution we opted for was to try to remove the code in cocos2d for flipping the scene. After reading the code we suspected that the whole scene was flipped in [CCDirector applyOrientation], so I removed that code. At first it seemed to have worked, our view was in the correct orientation and things didn’t crash, but on closer examination we realized that we was not able to press any elements in the scene. It turned out that there where additional places that used CCDirectory.deviceOrientation to switch around the coordinate system. After some code removal we got it to work! Another positive side effect of this is that our scene now get’s animated when you switch orientation. The code is now cleaned up as a boolean option to CCDirector called disableInternalRotation, when you set this on your director it will avoid flipping the scene. We have pushed the code to our cocos2d repository at github, in the norotation branch.

How to use this
If you want to use this in your tree you need to first checkout our norotation branch of cocos2d and then you need to create a UIViewController with the following code:

- (void)loadView {
	self.view = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
	[self setupScene];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    /* OHM Chess HD only supports landscape mode, if you want to support more orientations
      * to return YES for them here and also add some more code below */
    return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}

/* if you want to support portrait orientation, you need to add this as well

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
	if (toInterfaceOrientation == UIInterfaceOrientationIsPortrait || toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown)
	{
		[[CCDirector sharedDirector] setOrientation:kCCDeviceOrientationPortrait];
	}
}
*/

- (void)viewDidLoad
{
	[[CCDirector sharedDirector] runWithScene:[SMenuScene node]];
}

- (void) setupScene
{
	if( ! [CCDirector setDirectorType:CCDirectorTypeDisplayLink] )
		[CCDirector setDirectorType:CCDirectorTypeDefault];

	[CCTexture2D setDefaultAlphaPixelFormat:kTexture2DPixelFormat_RGBA8888];
	
        /* our new option that disable the code in cocos2d for internal rotation */
	[[CCDirector sharedDirector] setDisableInternalRotation:YES];
        /* we still need to set it to a landscape orientation in order to have the right internal layout */
	[[CCDirector sharedDirector] setDeviceOrientation:kCCDeviceOrientationLandscapeLeft];
	[[CCDirector sharedDirector] setAnimationInterval:1.0/30.0];
	[[CCDirector sharedDirector] setDisplayFPS:NO];

        /* note that I create the EAGLView with 1024,768 size, don't use self.view.frame, because that is in 768,1024 resolution */
	_glView = [EAGLView viewWithFrame:CGRectMake(0, 0, 1024, 768)
						  pixelFormat:kEAGLColorFormatRGBA8
						  depthFormat:GL_DEPTH_COMPONENT24_OES
				                  preserveBackbuffer:NO];
	
	[[CCDirector sharedDirector] setOpenGLView:_glView];
	[self.view addSubview:_glView];
}

A word of warning: OHM Chess HD is not using the portrait orientations, so this is very untested. If you encounter any bugs while in portrait mode (or any mode, for that matter), please let me know.

July 12, 2010 / Tobias Hieta

What we are working on now?

If you follow us you know that we released OHM Chess HD last week, that doesn’t mean that we are taking it easy. We are working on several new projects, but first and foremost we are working on updates to OHM Chess HD, we want to add support for multiplayer, achievements and social features (via OpenFeint). We hope to get this update out there pretty quickly, but instead of promising dates we can’t keep we will just say “It will be done when it’s done” 🙂

Stay tuned!

July 7, 2010 / isallmaroon

Ohm Chess HD is now available in the App Store!

The King of Ohm
The day has finally come! Ohm Chess HD is now available from the App Store!

I will write more about the experience of developing my first iPad game here in the coming days, but for now I will just say that seeing it there in the App Store is a great feeling. Everyone who writes software, either for a living or for fun, should give it a try. Because the iPad feels so much like an appliance and not like a general computer, seeing my software on there through official channels really gives me much of the same feeling as I had seeing my first commercial AAA title on store shelves. It’s a great feeling of accomplishment (regardless of sales or reception).

I brought the iPad with me on a recent road trip to the north of sweden, and in the car I ended up next to a friend of a friend whom I hadn’t met before. When I showed him the iPad and he picked it up for the first time, the first app he launched and played around with was my game. At that point I hadn’t even mentioned having developed anything for the iPad myself yet.

That was a great feeling, too.

If you are a chess player or enjoy playing the occasional game of chess with a friend, do try it out! I am quite sure the AI will present a challenge to even accomplished players, and using the iPad and Ohm Chess HD to play against a friend is great fun. It certainly made a long car trip much more enjoyable.

June 28, 2010 / isallmaroon

Ohm Chess HD Wallpapers!

Ohm Chess HD Wallpaper 1920x1200 We now have a Media page, currently holding a wallpaper made from the title screen of Ohm Chess HD. Available in several sizes, go grab it while it’s hot!