Archive for the ‘iPhone’ Category

Triff goes live

Thursday, May 20th, 2010

Okay, so triff of the David’s finally manged to traverse apples guidelines and review system. It has made it to the app store, you should go grab yourself a copy of it too. I can tell you now that it’s great fun to play.

So Adam, you no longer need to build my code in an awkward way, you can just head on over to the apple store and give us fungineers 59p.

Post to Twitter

Quick note to Adam…

Wednesday, May 12th, 2010

On the DVD I have given you, there is the xcode project for our game. You can build this to your iDevice and play through the updated version of our game.

This is if the game hasn’t been released onto the iTunes store of course. It’s quite possible that it will, and possible that we need to make a few changes so i’m covering some options here.

You need to make a few changes, like the bundle identifier and the provisioning profile under the build area of info.

Oddly enough, you still may get an odd error. A popup window may come up saying something about linking or something similar. if you just go into the build menu and choose clear all targets, you’ll be fine and ready to go.

Thats a very odd error that xocde likes to throw out when you open up and try to build someone elses project.

Anyway, enjoy our game.

Post to Twitter

Up in the cloud

Wednesday, May 12th, 2010

The most important tools while creating Triff, hasn’t just been our minds and imaginations, but also cloud computing.

To get over the need to send lots of files to each other all the time and share diagrams with each other, we decided to set up accounts with sites that let us collaboratively share and view files and mind maps.

Box.net is the site we used for file sharing. It let us collaborate on Triff anywhere where we decided to work. By the end of the journey, we had over 100 files uploaded and shared with each other.

This service worked wonderfully, and was completely free. We only wanted to share small files as is the nature of our project and so the size limitations on how much we could upload wernt an issue.

The other site that played a huge role in making triff work is Mind42.com. This is a mind mapping site that let us collbarotively work on the plot and narrative of the game. More importantly, it gave us a visual basis for how the game is laid out and let me be able to link everything together and find the correct slide we needed to change with minimal fuss.

Apart from the zoo stage where that had been started on another mind map and my numbering labels were never transfered over due to Gary not liking me naming the slides and my laziness.

When working in a group like we did, being able to share files and thoughts is the most important thing. We needed a better way to discuss things, preferably through skype or some other system, but that never got put into place.

But working in the same room or in different houses, these sites let us work effortlessly together. Fantastic.

Post to Twitter

How is the app looking?

Monday, May 10th, 2010

Well, we have had a few hiccups with submitting the app, various things that apple didnt like, small things like it not working blah blah David Hasselhoff being stabbed blaah.

Anyway, there are a few screenshots of the game as it is. It all works now and so its just a case of tinkering with it so that apple approve us.

These are the screenshots that accompany the app in the app store.

BE AMAZED!

All looks pretty slick eh? Works and reacts well too, especially the iPhone features like accelerometer and mic.

Dont you just want to hire us to make you pretty apps ay?

Post to Twitter

Trifficly good.

Saturday, April 24th, 2010

Post to Twitter

The home stretch

Friday, April 23rd, 2010

In the last week or so, we have been very busy finishing up the game.

Luke has been driven insane by Gary’s mad story and having to create some very odd images. How exactly do you convey that a polar bear is hungry? Well, all is done now. The app has been created, all the images done, code linked up and story complete.

It’s even been uploaded to the app store.

That was a crazy process, uploading an app to the app store isn’t entirely clear. I know that apple have laid out precise instructions but it’s so easy to get lost and doing one small thing wrong mucks it all up and you have to start again. Boo hoo.

That happened four odd times, I created and uploaded the app only to have my binary rejected due to the fact I wrote my name slightly wrong when creating a certificate. Bloody thing.

Anyway, after the three hour struggle, it is uploaded and waiting review. Theres a few silly features in the game that need to be spruced up, but that can wait for the update. For now, we wanted a working version of the game instore and when we have more time, make it even better than it already is.

I hope you all buy this silly game now, it caused us all to have collective headaches, but at different times so it was almost like one continuous headache shared between three guys who just wanted to do an app with a Bowie joke.

Post to Twitter

Story, story everywhere and not one bit is logical.

Wednesday, April 14th, 2010

Okay, so more of our story is completed and a whole level has the artwork done. So one level is essentially done, just needs buttons and some polishing. Three more levels to go with the second well on its way.

Considering I have no more coding to do really, i’ve just been starting to polish things up and add the extra elements that make a game special.

We now have an intro animation, music and an animated menu. Looks cracking so far. It reminds me of the older lucas arts games just purely because its over the top, ridiculous and has an odd animation style in the fact that its a bit jerky but still fun.

We are aiming to submit this to the app store in a few weeks. Hopefully we will make our target and even sell a few copies.

This app will essentially be our initial showcase. A “look what we can do” type of thing that demonstrates our humour, how we work and that we like to think big.

After all, in these times of chaos, we need a little fun. And if an Australian David Bowie koala liberator cant do that, nothing can.

Post to Twitter

Balancing act.

Friday, April 9th, 2010

Gary asked me to make it possible to have a tightrope balancing type mini game. Yes this is going to be one very strange game, thats kinda the point.

Anyway, this required two things, getting an image attached to the accelerometer and always point up no matter how you tilt your phone and having simulated “wind” that can throw you off and make it more of a game.

The first part turned out to be nothing more than a code snippet I happened to find in my quest for knowledge.

- (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration {

// Get the current device angle
float xx = -[acceleration x];
float yy = [acceleration y];
float angle = atan2(yy, xx);

// Add 1.5 to the angle to keep the image constantly horizontal to the viewer.
[imageView setTransform:CGAffineTransformMakeRotation(angle+1.5)];

if(angle >=-1.3){
MvtutAppDelegate *delegate = (MvtutAppDelegate *) [[UIApplication sharedApplication] delegate];
FirstViewController *thirdView = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil];
[delegate switchView:self.view toView:thirdView.view];
}else if(angle<=-1.7){
MvtutAppDelegate *delegate = (MvtutAppDelegate *) [[UIApplication sharedApplication] delegate];
FirstViewController *thirdView = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil];
[delegate switchView:self.view toView:thirdView.view];
}

This not only keeps the image balance but also sets boundaries for when you move it too much.

For the “wind”, i set up a timer and a variable that would change

[imageView setTransform:CGAffineTransformMakeRotation(angle+1.5)];

at given time periods. This meant to throw the user off and keep them from just sitting still.

I think thats all of Gary’s crazy ideas sorted out now. Just need them to finish up story and art so I can implement the code properly.

Post to Twitter

Busy like a little bee. Made of code.

Tuesday, April 6th, 2010

Gee, the last 24 hours have been quite productive for me. I achieved three separate, but important, things.

  • Microphone Detection
  • Flipping a coin
  • Saving

Now, yes, technically I cheated by following code tutorials. But how else am i meant to garner this new knowledge? Guess? Stab the keys alot until things magically work? No, bugger that I like things explained to me.

So lets start with the microphone thing. It’s all in chronological order anyway.

Microphone

So the point of the microphone input was that for the story we may have things like leaves or dust covering the screen and you had to blow them off. How would I do that?

Well I could explain the code I used but this tutorial explains it pretty well anyway.

http://www.mobileorchard.com/tutorial-detecting-when-a-user-blows-into-the-mic/

Well that works all fine and dandy. But, I wanted it to animate an image or something when you blow. Ideally, I would like the animation to pause when you arent blowing but that caused a lot of problems due to how its structured so I dropped that. Of course, if you use an if statement for if blowing or not, not blowing constitutes the view starting up and that tended to crash things when i tried to pause an animation that didnt exist yet.

Anyway, it just required a general if statement and an action to be set up with the animation held in it. Turns out to be very simple! Hooray!

Flipping a coin.

Gary requested this one off me. He asked if it was possible to flick the phone up as if flipping a coin then having a 50/50 chance of going to two different views.

How hard could it be? Just needed an accelerometer class with the outcome being a random function set between the parameters of 1 and 2. It then had to read that outcome and then move to the associated frame.

Apparently there are two types of random function. That alone seems odd to me. One, random(); requires a lot more code and only works one time then the app has to be restarted. Is there a need for this one?

The other arc4random(); works a lot better. One line of code and it is random each time you run it.

Lets go for that one then.

int randomNumber = 1+ arc4random() %(2);

if (randomNumber == 1){
MvtutAppDelegate *delegate = (MvtutAppDelegate *) [[UIApplication sharedApplication] delegate];
ThirdViewController *thirdView = [[ThirdViewController alloc] initWithNibName:@"ThirdViewController" bundle:nil];
[delegate switchView:self.view toView:thirdView.view];
}

if(randomNumber == 2){
MvtutAppDelegate *delegate = (MvtutAppDelegate *) [[UIApplication sharedApplication] delegate];
FirstViewController *thirdView = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil];
[delegate switchView:self.view toView:thirdView.view];
}
}

Simple yes? Sets up the random function and reads the results. Marvelous.

Making the flip action work is simple too. Just a minor edit to my accelerometer code and we are away. Just had to set it to read from the z axis alone rather than all 3. I also lowered the tolerance so it reacted easier than before.

Saving.

Now this was tricky. Not because it was hard to implement because it wasnt. But because its all explained rather poorly.

What I did was to create a new button on the first screen. It reads continue and when you click it it goes to where you last left off when you closed the app. So you can close the app at any time and return to it exactly where you were.

To do this, you need to use NSUserDefaults.

For the main bulk of the remembering code, I followed along from this tutorial:
http://icodeblog.com/2008/10/03/iphone-programming-tutorial-savingretrieving-data-using-nsuserdefaults/

It handled it quite well. I just needed to get it to pick up what view it was on.

aha, well, what you need to do is to declare an integer on each page (annoyingly) so that when the user visits that page, the string gets updated and holds it in memory.
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
[prefs setInteger:2 forKey:@"saveFile"];

Replace 2 with what ever view you are on. Then just use if statements so that when you click the button it knows what view you were on last and sends you to the appropriate view.

I’m betting theres a less codey version to what I did though. Mine had a lot of lines of if statements. Crude but it works. Im pretty sure there is now some dev pro out there who’s head exploded.

wheeee hew. Now with saving sorted, the part I was most dreading seeing as the few explanations of it i found previously were horrible and involved lots of confusing words.

Everything else, interface wise will be making it look pretty now. All the hard engineering work is done I believe. I say that now but theres bound to be something else I need to do.

Post to Twitter

A story at last?

Friday, April 2nd, 2010

Today, myself, luke and gary met up and had a meeting. We needed to discuss the story that gary was constructing and agree on how it should take shape and the type of things that we wanted in the story.

Well it went great. We had a lot of laughs and pretty much cemented the general plot of the adventure.

There are eight different strands that you can take in our game and in all of them you have several choices that either lead to great jokes or death. Also David Bowie.

Now that a general structure was decided upon, I could start putting together the frame work ready to drop in the images that luke will create. Currently I have 20 pages in this frame work done and thats just getting the story started with its eight initial choices. Loads more to go yet.

Its working well so far. I had a few near breakdowns when constructing the one narrative branch that we have written. It all stopped working for reasons I couldn’t see. Luckily, doing the time old method of slowly copying and pasting in segments at a time solved the odd problem. Lets see if it sticks.

I also made the menu system look snazzy. Gave it a fungineer brushed steel look. Swanky.

Oh yeah, the other day I got bored and made the title screen graphic. Here’s my work so far.

[slideshow]

Screens so far. Title screen looks pretty good I think. With graphics like this and fantastic jokes I think this could be a kick ass little timewaster game and we could make a bit of money off this bad boy.

Post to Twitter