Fancy new Buttons, and Challenge Mode.

Image

 Well that isn’t the only thing  in 1.0.1 Update also we have.

  • sped up the animations by a few frames. 
  • Hopefully fixed the issue with Keyboard auto disappearing 
  • and Fancy new Buttons more in the keeping with the style of the Game.

I Pushed this update out a week ago, guess apple is being through with checking.  

Starting to contemplate Global (Universal) High Scores, and challenge mode. Please chime in if you have any thoughts.

Right now I’m thinking you could press on a score and it would pop up a button Challenge this Time. Then your time would count down from there Score till you beat it or Loose. 

Question 1. Should you loose and the game stop or should you be given an option to continue the game.  ie: Challenge Failed Do you want to continue game? 

Question 2: should I give you different high score tables, Local, National, World. 

Enjoy the update. Please email me if you find any bugs/ weirdnesses.. 

 

Dragon Emperor’s Challenge HD – iPad specific Now available on itunes.

iOS Simulator Screen shot 2013-01-23 1.43.49 PM iOS Simulator Screen shot 2013-01-23 1.59.35 PM

https://itunes.apple.com/ca/app/dragon-emperors-challenge-hd/id596078459?mt=8

It’s finally available !! The iPad version of the game.

The funny thing about development is that you think things are going to be easier than they are. Maybe I’m a secret optimist, but I thought I could resize the UIView and all would be fine. ENTH! thanks for playing!!!

I resized and repositioned every single element by hand, ie. Calculated to  resolution and screen ratio. then moved each button recompiled and an squinted, swore and then reedited the code and repeated. Next time I’m going to create an element mover library to move that stuff around and resize, at least that will give me the correct numbers.

My cousin who is an android developer went through hell, because there are like 150 different resolution and screen ratios to deal with. I’m afraid apple is going this route with the ipad mini, the iphone 5. fingers crossed they create a UIView scaler that helps us deal with multiple resolutions and screen ratios.  If I end up writing a auto resize code I’ll post it here.

Ps. Enjoy the iPad version it’s easier to play because of the size. but also looks better !!!

Available on the AppStore

Well love it …  or don’t play.  Our first game is up on the AppStore.

Image

The AppStore – Link   It went live on the AppStore Friday night!

Which is awesome and scary, We throw it to the wind and hope.. I guess.

The pain of provisioning profile, reared it’s ugly head in the last few hours before submission, I had to schlep myself over to “Ronchy” to get my friend Leanne help me. We ended up revoking my previous developer profile and reissuing it. For those of you in the same boat. Revoke and  make a new profile. reissue the provisioning profile, seems to be the easiest solution.

As a recommendation for a book:  Beginning iOS  5 Development  – Wei-Meng Lee is an excellent book. In desperation  I just followed his AppStore tutorial to the letter and Watabing Wataboom it worked like a charm.  After Leanne forced me to actually follow the steps instead of “yeah yah I did that” attitude we all have. Hahaha!!! trust me it will solve hours of frustration. Like Kurt Vonnegut says “read the Directions.”

Time is not Simple

Spacetime_curvature

As Einstein has taught us Time is not Simple.It squishes and expands depending on how fast or how close we are to a gravitational sources. That  said in programming it should be easy… But…

For the last weeks before submitting Dragon Emperor’s Challenge to the App Store, I’ve been fighting with Time.

Initially I programmed a timer by incrementing a counter every second.

Ala:

totalTimeInSeconds=0;
myTimer = [NSTimer scheduledTimerWithTimeInterval:
(1-(4/12)) // this is the time it take the animation to complete //
target:self
selector:@selector(updateTimer)
userInfo:nil
repeats:YES];

-(void)updateTimer
{
totalTimeInSeconds++;
// do update display stuff //
}

So simple. Stop incrementing totalTimeInSeconds when you want to pause. To save the time just save the integer value and restart it. Unfortunately due to rounding time delays in animation it sometimes it skips and basically doesn’t keep good time. So I had to what I am calling calculated time.

Where I store the date/time the timer is started.

startTime = [NSDate date];

Which is great if you don’t exit the game. But of course at sometime; why? I don’t know, but you may need to exit.      Dragon Emperor’s Challenge.  So you need to save the the amount of time on the clock. In defaults as a Double.

// Save the pause time interval //
NSUserDefaults *defaults= [NSUserDefaults standardUserDefaults];
[defaults setDouble:currentTime forKey:@”currentTime”];// then when you restart the clock //
// reset the Date to now //
startTime = [NSDate date];
NSUserDefaults *defaults= [NSUserDefaults standardUserDefaults];
currentTime = [defaults doubleForKey:@”currentTime”];
// and here is the key –> subtract the previous time on the clock from the current time
startTime = [[startTime dateByAddingTimeInterval:((-1)*(currentTime))]retain];
currentTime=0; // reset the currentTime.// restart the timer //
myTimer = [NSTimer scheduledTimerWithTimeInterval:(1-(4/12))
target:self
selector:@selector(updateTimer)
userInfo:nil
repeats:YES];
}

What’s a pain is that you need to pause/restart the timer when the app exits, wakes, switches, sleeps. and beta test for all that, including crashes and low memory warning.

** Just a note about sloppy programming. Before I had a number of flags that told me when Dragon Loaded and slept etc. Which meant I was trying to bandaid(tm) around all the options, sometimes subtracting the time, sometime not.. depending on the flag.. well that was a nightmare. Just Hack the arm off and replace it with something that does work instead putting patches on patches or in this case a plethora of if else if if statements !!!

So Time isn’t Simple, and it will make your brain hurt thinking about it. but also challenging and fun.. which is what keeps us alive.