Archive for the ‘Uncategorized’ Category

Happy Christmas from Rizer Games!

Friday, December 24th, 2010

Happy Christmas everyone! I hope you all have a great and relaxing time with your families. Thanks to everyone for their support this year – it’s been a great one, but I can’t wait for 2011! Remember to check out Flying Cats Game if you haven’t already, for a bit of thoroughly non-festive fun!

Day to Day Motivation

Sunday, August 15th, 2010

Motivation is a very odd thing. I like to think of myself as being a highly motivated person. I even have a ten-year plan outlining what I’d like my life to look like so I have a clear direction. But for some reason I find that that long term stuff, the bigger picture vision, isn’t what motivates me to get out of bed each day. I often get asked by those who aren’t self employed how it is that I don’t just end up watching daytime TV the whole time. The truth is, staying self-motivated everyday is a real struggle, but I wanted to talk about some of the things that I know do motivate me in the hope it might help myself and others.

Velocity

I’ve recently started using an online project management tool called Pivotal Tracker — as it’s just me, it’s pretty much just a fancy to do list. On it, you estimate the size of a job in points, then each week it calculates your velocity (I think that’s a scrum term) based on what you completed last week. The motivating factor here is that I can challenge myself to beat my previous week’s velocity. Something else I’ve done for a long time is to track all of my time on iCal. I put absolutely everything of any significance on there, all colour coded for business, personal and church activities. So I can see at a glance what time I started work in the mornings this week, and how much I slacked off at lunch. Knowing that if I took a three hour lunch break that I’d have to log that time and look back on it produces a heck of a lot of self discipline.

External deadlines

Things like client deadlines or iPad launch days really help. I try setting myself my own arbitrary deadlines, but I always end up missing them, and renegotiating with myself, which makes them pretty pointless. Of course, by announcing your own deadlines though your blog or Twitter, you might just create enough of an embarrassment factor for it to act as an unmissable deadline.

Money

Money is a huge motivator. If you’re an indie game developer, you’re probably not in it for the money, but I bet you wouldn’t say no to a bit more. Having no money is no fun, but having an abundance can lead to greater enjoyment in life. It’s not shallow — it’s just how we’re wired. Sometimes I like to think how I’d spend more money if I had it — what car I’d buy (another classic Mini), what house I’d move to, how I could get my parents an iPad for Christmas. The easier it is to link what you’re working on to getting paid, the more motivated you’ll be.

Dreaming of success

Look at the people who are where you want to be, and think how great it would be to be like them. Dream about the possibilities — what if this app takes off big time? Maybe this will be the one that propels me ahead of Angry Birds… OK, you can also dream of realistic success, but having a vision for what you’re working on at the forefront of your mind will drive you forward.

Not thinking

I read a great blog post earlier this week from Celsius Games Studio. Colin talks a lot about overall motivation and the bigger picture, and he starts with a great quote from Joseph Addison:

“He who hesitates is lost. Swift and resolute action leads to success; self-doubt is a prelude to disaster.”

By not thinking, I guess I mean not hesitating. There is a time to think things through — it’s at the start of a project. This is the time to look objectively at whether it’s going to be a success, and to get some external input on the idea. If it’s a bad idea, you should realise at this stage, or a prototyping stage, and so never start real work in it. But once you’re sure this is what you’re going to do, you need to put the blinkers on. I think there are times when abandoning a project is a good idea, but more often than not we’ll abandon something simply because we start to doubt ourselves. We over think things. If you’ve already decided it’s a good idea, then go for it and stop thinking about how good the idea is. Just get it done!

Love

Do what you love. Before starting a project, make sure that your love for the idea is proportional to how much time you anticipate it will take. If working on it will be fun and rewarding, the chances of you staying motivated throughout are way higher.

And if you can link the reason you’re working to the people around you you love, then even better. Maybe it’s just thinking about how you can provide for your family, or how you can make your loved ones proud — harness this in your thought patterns. Love is the greatest motivator ever, so find ways to make it part of the reason you get out of bed everyday.

UIWebViews and CSS3 Fonts

Saturday, August 7th, 2010

Web development is one of those necessary evils in life. No-one enjoys working out what the hell is going on with Internet Explorer, and why your perfectly valid markup displays something like a spilt tin of alphabeti-spaghetti when viewed on what must be one of the worst bits of software known to man. It’s sad that with all the advances we’re seeing in HTML5 and CSS3 opening up the web to a whole new world of possibilities, Microsoft is stunting innovation.

When you start to deal with content that will only be viewed in your app, though, you can completely change your way of thinking. It’s surprising how years of keeping cross browser compatibility as a primary concern can be ingrained in your mind, but targeting just one browser and knowing that’s all you need to deal with is incredibly liberating. And kind of fun. Webkit, which is the underlying rendering engine for Safari and UIWebViews, is certainly one of the more advanced HTML engines, so you can play with CSS animations, 3D elements, HTML5 videos and, what we’re looking at today – custom fonts.

Thats right, we can finally use custom fonts without the proprietary crap that Microsoft implements. There are plenty of tutorials on how to use CSS3 fonts, but when dealing with UIWebViews, there are a few caveats you need to be aware of.

Are you local?

If you want your HTML and CSS files to live on a remote server, then it’s simply a case of doing something like the following to load your HTML:

NSURL *rizerURL = [NSURL URLWithString:@"http://www.rizergames.com"];
[webView loadRequest:[NSURLRequest requestWithURL:rizerURL];

You then reference your remote CSS files in the usual way. Very simple. I should note that referencing local CSS from within a remote HTML file is not possible. If you want to use HTML and CSS from within your application’s bundle, then you need to do the following:

NSString *htmlIndex = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"] encoding:NSUTF8StringEncoding error:nil];
NSURL *baseURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]];
[[self webView] loadHTMLString:htmlIndex baseURL:baseURL];

And then in your HTML you can simply use:

<link rel="stylesheet" type="text/css" href="default.css" />

Obviously both files need to be imported into your project like any other file. The key thing here is that you set the base URL so that the UIWebView knows where to look for the CSS. You could use the loadRequest method to load a local URL, but then you have no control over the base URL. I should also point out that not using loadRequest breaks all of the forwards and backwards navigation functionality of the UIWebView, which means you’ve got to roll your own (please someone tell me I’m wrong here, but after many hours of Googling, it looks like this is the way it is).

The Squirrel is your friend

So now you just look up the CSS3 syntax and plug in your TTF or OTF file, right? Wrong. Sadly these formats aren’t supported on iOS yet, so you have to use SVG. If you don’t have an SVG you can use Font Squirrel’s excellent conversion tool to create a very handy @font-face Kit. Check out their decent selection of free for commercial use fonts too, which all have @font-face Kits that you can download straight off. You can pick out the key bit of CSS from the files in the kit – it should look something like this:

@font-face
{
font-family: "Chunk Five";
src: url("Chunkfive-webfont.svg#webfontb5K2fJwj") format("svg");
font-weight: normal;
font-style: normal;
}

Import the SVG into your XCode project, then you can then just use these defined fonts in the normal way for your elements in your CSS:

h1
{
font-family: "Chunk Five", Helvetica;
}

One more thing to watch out for – the letter-spacing property doesn’t work with SVG fonts, so won’t work here. That should be all you need to use just about any licensed font you like. Still struggling? Post a comment and I’ll do my best to get back to you!