Json without an axe!

*** Dragon Emperor’s Challenge on sale for 50% off !  ***

jason19-no-axe

Summer Sale Same great game for less.

Working on High Score Server.

So working on the global high score server.

Looks like Json will be the answer.  Pretty easy to get information and put it back.

Here’s a link to from: RAYWENDERLICH

Which is a great reference for Xcode programming and his book is highly recommended.

Working with JSON in iOS 5 Tutorial | Ray Wenderlich

Sets up a basic framework, which should be easily adapted to what I need for a global High score server.

Which I found Here:

Create a php, mysql, Json Login Tutorial  

Hope this helps.

Experiments in Fun

I was clicking around instead of actually coding like I should, which of course took me to Rock Paper Shotgun, my favorite game site. Funny insightful  writing.  

they have an article about the:

The 2013 GDC Experimental Gameplay Workshop | Rock, Paper, Shotgun  

the “game” ? Memory is broken appeals to my reto-brian give it a try: 

Memory Of A Broken Dimension – Ezra Hanson

I mean look at how cool this looks !!! 

Image

It reminds me of British Secret Service exam.. Which was fantastic fun until they took it down… AhhhhhhhGGGGGG !!!!  let’s hope they turn it on again. 

Image

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 !!!

Sweet Potato Biscuits

So we were watching The Secret Life of Bees the other day. They mentioned Sweet Potato Biscuits.

Image

So here’s a recipe. from Paula Deen with some modification

by me.

Ingredients

  • 1 1/4 cups all-purpose flour
  • 2 heaping tablespoons sugar
  • 4 teaspoons baking powder
  • 1/2 teaspoon salt
  • 3/4 cup mashed cooked sweet potatoes
  • 1/4 cup (1/2 stick) softened butter
  • 2 to 4 tablespoons milk (depending on the moisture of the potatoes)
  • (optional for heat) finely diced chili pepper and or cayenne.

Directions

Preheat the oven to 450 degrees F.

* I do this like I cook everything by feel. Mush the sweet potatoes and the wet stuff. then add the flour till it feels right..

Sift together flour, sugar, baking powder and salt. In a separate, large bowl, mix the sweet potatoes and butter. Add the flour mixture to the potato mixture and mix to make a soft dough. Then add milk a tablespoon at a time to mixture and continue to cut in. Turn thedough out onto a floured board and toss lightly until the outside of the dough looks smooth. Roll the dough out to 1/2-inch thick and cut with a biscuit cutter. Place the biscuits on a greased pan and coat tops with melted butter. Bake for about 15 minutes. (Watch your oven: If the biscuits are browning too fast, lower the temperature.)

PS: iPad version of Dragon Emperor’s Challenge is waiting for Approval so watch for it soon. Fingers Crossed.

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.”

Space Time and always looking into the past

We can never look into the future. Everything we experience has already happened.

The time it takes light to reach our eye means that everything we see is in the past.  The farther away it is, the more in the past it is. Take looking into the cosmos, as we peer further and further into deep space we see farther back in time; closer and closer to the Big Bang.  The light of those stars we see at night is in some cases millions of years old. Those star may have burnt out and the planets annihilated themselves, but because we look into their history we see what they were, many many years ago. To them we might just be slime mould crawling out of the proverbial primordial mud puddle of life.  It’s all Carl ‘Sagany’ stuff. but the thought of looking into the past of the universe. makes you feel really really fantastically small.

looking into timeframes

You decide to take your dog for a walk, you are lucky enough to see a Super Nova explode in the dusk sky. What you are seeing is multiple past event. They just happen to arrive at your eyes at the same ‘instant.’  You are seeing a collection of  various past events. “You are looking into the whole history of the universe all at once.” Brain melted yet????

“Space,” it says, “is big. Really big. You just won’t believe how vastly, hugely, mindbogglingly big it is. I mean, you may think it’s a long way down the road to the chemist’s, but that’s just peanuts to space, listen…”  HHG – Douglas Adams

We egotistical monkeys, need to come to grips with the fact, that we are not all that fascinating, smart or pretty to anyone other than ourselves. But what are you going to do?  eh!  Have another pan galactic gargle blaster and watch some more telly.

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.