Nov 27 2010

And on the topic of unsubtle hints

Tag: Full Games,General lifetrevor @ 11:20 pm

So I’ve been spending the day alternately coding and preparing for the game development masterclass stuff that I mentioned last week.  I believe that I’m still on track for a “first playable” build by the end of next week.

Also, today I played a little Costume Quest, and a little Pinball FX 2.  But only a little.  Costume Quest has kind of hit that point where I’ve become extremely bored of the combat, but also die a lot during the combat.  I assume that this means that I need to grind levels a bit, which doesn’t really match my mood at the moment.  Pinball FX 2, on the other hand, I’d play a lot more if only I had a hope of improving my high score without playing for a half hour or so.

A friend recommended Vanquish to me, as playing a lot like the 2004 Transformers game that we had both worked on.  I had a brief play of the demo, and came away from it feeling quite depressed about the state of modern game design.  On the other hand, it was published by Sega, and so I really shouldn’t be surprised that it was such an uninspired design;  Sega publishes a lot of modern games that appear to have been designed in the early 90s, and it seems to be working for them.  From a certain point of view, criticising Sega for always using highly dated game designs would be like criticising id Software for always making first person shooters;  it’s completely missing the point of who they’re trying to be.

Anyhow.  I’m planning to record the first “masterclass” sometime during this coming week.  Haven’t picked the topic yet, but I have a fairly sizeable list of possibilities.  Once it’s finished, I’ll post it here, and I’ll be very interested in people’s comments and/or reactions.  :)


Nov 23 2010

Hopefully to help someone else

Tag: General lifetrevor @ 3:34 pm

When I was working on handling changing iPhone orientations, I ran into one major issue which doesn’t appear to have been addressed anywhere on the Internet.  So I figured that I’d post the solution I eventually found here, in the hopes that someone who has this problem in the future will find this blog post and the solution to their troubles.

Any non-programmers reading this blog may safely ignore this post.

When your application is running on an iOS device, you’re told the orientation in which the device is currently being held, and when that orientation changes.   In most iOS apps, you’ll provide a function “shouldAutoRotateToInterfaceOrientation” on your view controller, which will tell the iOS system whether or not you’ve accepted the new orientation.  (For example, many games will reject “Portrait”-type orientations, and all apps will reject “FaceUp” or “FaceDown” orientations)

However, programs which render using OpenGL (particularly games) usually don’t want to do that;  while it’s simple and convenient, it’s also extremely slow for various undocumented reasons.  Instead, when using OpenGL, you probably want to just change your OpenGL settings to adapt your drawing to the new device orientation.  There are plenty of tutorials about how to do that, online.

What they didn’t mention is this:

When you double-tap the home button on the iPad (with firmware 4.2 installed.  Not sure if that’s been released publicly yet?), it lifts the screen up to show the fast-app-switcher bar.  New on the iPad is that it lifts the screen upward, regardless of the orientation (whereas on the iPhone, it always ‘lifts’ away from the home button).  This leads to a small issue for iPad games which render using OpenGL:  since we’re not using “shouldAutoRotateToInterfaceOrientation” to tell iOS when we’ve accepted a new orientation, it doesn’t know which way it should “lift” the screen to reveal the fast-app-switcher.  So what iOS does is flip back to the initial orientation that the device was in when the game was launched for as long as the fast-app-switcher is open, and then returns.

So for example, if you were holding the device in Portrait mode when you launched the program, and then put it into Landscape after the game started, and then you double-tapped the home button, the game would switch back into Portrait mode until you closed the fast-app-switcher again.  And it does this because iOS has no way of knowing whether or not your app actually went into landscape mode when it asked you to.

So here’s how to fix it:

If you’re handling device orientation by modifying your rendering yourself (instead of having iOS do it for you automatically), you need to inform iOS when you accept a device orientation change.  You do this by calling:

UIApplication *theApp = [UIApplication sharedApplication];
theApp.statusBarOrientation = UIDeviceOrientationPortrait;

(Or whatever orientation you’re accepting).  Yes, you tell iOS that you’ve accepted a request for a different orientation by telling it where to put the status bar.  You need to do this even if you’re hiding the status bar.

Hope this helps somebody else avoid the lengthy struggles that I went through, trying to figure out how to make the fast-app-switcher work properly on iPad under 4.2!


Nov 22 2010

GUI takes time

Tag: Full Games,General lifetrevor @ 7:06 pm

So here’s the fun thing.  The screenshot today doesn’t look much different than the one yesterday, and yet there’s been about ten hours invested in it.  That time is mostly hidden inside the clock at the bottom center, which has some fairly complicated interactions with touch controls, much improved over the clock you could see in previous photos (which was limited to 15-minute increments).  Also, there are now some spheres.  But they’re just quick placeholders; not real artwork by any stretch of the imagination.  Also new today is lighting;  previously, everything was being flat shaded.  (The nifty gradient you see is an artefact of the photography.  A big TODO for me in the future is to work out how to make the game actually render with a cool gradient like the ones in the photos.)

As it turns out, it’s kind of tricky to make that clock appear at an unobtrusive size on the iPad, without making it ridiculously tiny on an iPhone.  In the end, I’ll probably have to lay out the main game screen separately for the two platforms.

Anyhow, I’ll post more about the game itself once I’ve finished amusing myself by giving increasingly unsubtle hints about what it could possibly be.  :)


Nov 21 2010

Bleah, sick

Tag: Engine Design,Full Games,General lifetrevor @ 7:18 pm

I’ve come to learn that being ill is an entirely different affair when you’re un/self-employed.  Far more stressful to be unable to work, when you don’t have paid “sick days” supporting you.

Yesterday I was basically unable to think straight, so ended up spending most of the day resting (and playing through the second half of “the Zombie Island of Dr. Ned”, in Borderlands).  It surprises me that that game has not yet hung a lampshade on how often it hangs lampshades on things.  But I still have two more bits of DLC to go through, so there’s still time. (I’m skipping the “arena deathmatch” DLC for now.  Not really feeling well enough to enjoy that sort of challenge at the moment.)

But today, I’m feeling a lot better.  Still not well enough to actually feel like it’d be wise to go out of the house and run errands, but better.  At the very least, my brain’s now working well enough to do a little coding again.

Continue reading “Bleah, sick”


Nov 19 2010

Multitouch

Tag: Engine,General life,VectorStormtrevor @ 12:48 am

Today I set up Multitouch gestures for iPhone/iPad.

Again, this photo is using exactly the same graphics as the past few days, just now you can use multitouch gestures to zoom and rotate the interface.  (Most of my time went into the zooming.  Surprisingly difficult to get the maths right for that, in this case.)

It feels.. surprisingly natural.  I didn’t think it’d feel this good to move an object around on the screen this way.  There’s probably a bestselling game just in that interaction, if you could figure out a way to wrap a game around it (and if somebody else hasn’t already done it.  I’m sure someone has).  I’m not sure exactly what game you could wrap around this interaction, but it does feel really, really nice.

Right now, VectorStorm supports only two simultaneous touch events.  But now that I have two working, it’d be really easy to add up to about ten.  But in this case, I only need two for the pinch/zoom interface.  So I’ll probably make do with what’s in there now.

Tomorrow, I may take a stab at sound support.  Or more likely, I’ll spend time on the game code itself, again.


Next Page »