Tuesday, 4 January 2011

iPhone 4 and the retarded, I mean retina display

So, I have a shiny new iPhone 4 with all it's hi-res lovelyness. I also have an iPad with it's equally lovely hi-res screen. Imagine my surprise when I asked the SDK for the screen res of the iPhone 4 and was very disappointed to be told it's the same as the iPhone 3G. But hang on a second I hear you say, it is most definitely a hi-res screen but the OS says it's not. A little leg work later and I have an answer, and it's one of the biggest bodges to date.

iPhone 4 and the retina display cannot be accessed directly. Instead you treat it as an iPhone 3 and the OS draws text and windows etc. in hi-res. The only issue here is if you are displaying images (or graphics via OpenGL) in which case you generate a hi-res imagine and add @2x to the end of the filename. When you request your normal file (picture.png) for example, if you are on an iPhone 4 the system will instead load picture@2x.png (if it exists) instead. This makes sense so that everything is backward compatible. However there is no alternative. You cannot tell it you are writing an iPhone 4 compatible app and get the correct dimensions etc, you just have to live with the strange x2 issues. This means when drawing things to the screen with pixel positions you should specify half pixels to address the in-between pixels. Of course if you're doing an OpenGL game you're most likely already using floats for your positions and therefore everything will just automatically be hi-res for you.

OK, now I've ranted about it this does make some sense. But I still thought there'd be a direct mode. There is for iPad so why not for iPhone 4? Maybe it'll come in time with an OS release.

Oh, and Merry Christmas and a happy new year etc.


Thursday, 23 December 2010

You wait for ages then 3 come along at once

So, quite recently it seems I was ranting about not having any income after Game Room came to an end. Well since then I've been offered 3! I'm starting on a 2 months contract with the possibility of more work to follow in early January. A friend of mine arranged the work and for that I am extremely thankful. Several other friends also spread the word and I had several other inquiries come my way, one of which was an actual offer of work. I sadly had to turn it down. The third offer was a converson of a flash game to iOS. I get these a lot and usually ignore them. Mostly they are games that wouldn't work well on iPhone, games that wouldn't sell on iPhone and always with no actual payment for my services, only royalties. And since I have personal experience of how little an iOS game can sell I usually turn them down. This game was different. It's a unique "sound toy" as I've heard it described. I think it really does have a chance if selling. Plus the developer is happy to pay upfront which not only means I'm not working for nothing but it means he is invested too. It's easy to say "I'd like to see my game on iPhone" but not as easy to say "I'm willing to pay to see my game on iPhone".

The game is IsleOfTune.com and it's generating a lot of interest. I'm working full time on it until early January and then I'll be shunning friends and family and working on it evenings and weekends only. It really does help that I really like the game and I'm very enthusiastic about the whole thing. I'm ploughing through the code and I'm hoping that a good deal of it will be done over the Christmas period. I really want this to be successful to restore my faith again in the iOS market. So, head on over and have a play.

This of course has given me and excuse to buy an iPad. I've been laying off getting one as I don't really have a use. I have an iPhone which is essentially the same but smaller. However now I have one I think I may surgically attach it to my arm. Just the increased screen size makes all the difference. Things that used to be excruciating on iPhone are now simple on iPad. I'm typing this right now on iPad and I'm maintaining a decent typing speed. So, that means in the house we now have 3 iPhones, an iPod touch, an iPad, a MacPc and a MacLaptop. I am becoming the most despised of all things, an Apple fan boy. How did that happen!

Anyway, I suspect I am rambling due to the late hour.

Merry Christmas y'all!

Monday, 13 December 2010

Merry F*$%ing Christmas

http://www.1up.com/news/rumor-krome-studios-shutting-down

The wonderful, challenging and above all steadily paid project I've been on most of the year has come to an end. According to reports Krome (who were writing "Microsoft Game Room") hit financial trouble and let all but a handful of it's staff go. I was one of the lucky ones who continued to work with them on Game Room. Sadly it has now come to an end and I'm out of a job. The Krome guys were fantastic. They were hard working and diligent yet managed to be laid back at all times. We did some brilliantly technical and wonderfully challenging work on the project and everyone involved was very sad to see it come to an end.

The work itself was very diverse and interesting. I was tasked with decoding the custom hardware on the arcade boards and writing emulators for them. My time was split between analysing the hardware (photo), analysing the original arcade code and writing the emulation for the decoded components. It was at times extremely difficult and challenging but we knew it wasn't imposible. Mainly because several freeware emulators had done it all before. For obvious reasons we could not, under any circumstances, look at any other emulator. This effectively meant we were starting from scratch. We did however have one big advantage. We were legal! We had the approval and permission of the relevant arcade manufacturers. I and several other coders on the team had actually written emulators before. Personally I'd written a ZX Spectrum, Game Gear, Master System and Game Boy emulator some years back so I was aware of how this sort of system worked. I'm also an accomplished hardware designer and had previously reverse engineered several of the 8 bit consoles back in the day. But that's another story.

Anyway, back to the theme. It's Christmas and I'm out of work again. Ok, technically I'm not out of work as I work for myself but I don't have an income into my company at the moment which is the same thing. Let's hope that some of the feelers I've sent out recently come back with offers of work.

Merry Christmas everyone,

Friday, 27 August 2010

Mac v PC v laptop

I've got used to the whole Mac and PC thing now and I can easily switch between them. It takes a bit of conscious effort if I've not been on one or the other for a few days, like remembering to press alt on Mac for cut, copy and paste for instance, but apart from that I'm good. What I still can't get used to is going between my laptop and desktop. It's not just the fiddly little keys or the lack of mouse it's the desktop real estate that gets me. My laptop makes me feel claustrophobic as if I've been squeezed into a little box and forced to work. The little keyboard is partly to blame for this feeling but overwhelmingly it's the small screen.

My laptop is a cheepy. £329 and coming on for 2 years old now. It's a 15 inch screen with only 1280x1024 res. My desktop on the other hand has 4 monitors of 1600x1200 each. Going from 6400x1200 pixels to 1280x1024 is like trying to fit into those jeans I found clearing out my house. The ones from my teenage years before I discovered pie, or before I discovered I could eat all the pies anyway.

So what to do? Well there's nothing to do. You can get laptops with higher res screens but at a price I wouldn't feel comfortable with paying. So I'm stuck with it I guess. I'll just try and limit my work time on the laptop.

While I'm on a rant roll..... I found out that iOS 4, the software to write iPhone software with, does not support any Mac OS earlier than Snow Leopard. Great, except my laptop doesn't run Snow Leopard. So I either live with the old software and not use my laptop for iPhone 4 development or I try to get Snow Leopard running on it. Hmmmm, my last hackintosh attempt with Snow Leopard, albeit it very successful, took the best part of a week to get going!

Anyway, news from the development front. I'm Once again coding for iPhone. A friend of mine came to me with a nice idea and we managed to get an artist and musician interested so I've started work on it. It'll go slowly no doubt as I'm very busy with my day job and have to sneak the odd hour here and there while J's asleep on the sofa.

Watch this space for updates!

Time for bed. 1.23am and knackered from 12 hours of straight coding today. I do love my day job but it's ever so slightly addictive.

Tuesday, 13 July 2010

Run around now!

So, a few months ago I said I was full on iPhone development as my job hadn't started. Ironically the job started the week after that post. The good news is the new job is great. Really exciting work, very taxing and rewarding. The bad news is it has taken up all my time ever since. Which of course means iPhone is off the table again.

My house is still on the market and not selling. So Justine and I have decided to rent instead until it's sold and get on with our life together. We moved at the weekend and there's boxes everywhere! I've set up a temporary office. My desk is a wardrobe side balanced on 2 PC's and some books. I'm hoping to get some woodwork done at the weekend and make myself a new desk and a big workspace for my electronics which are part of my new job.

The iPhone stuff, although at a stand still, has promise. I've got several people wanting to talk to me about projects both games and specialist apps. I am planning to get into the 9-5 of a normal office day and use my spare time to do the other projects. Oh, and spend plenty of time with Justine and Luke too. Hmmm, I wonder if I can do without sleep? Does anyone know a good suppler of Provigil?

I've also got the new iPhone 4 and I'm loving it. It's soooo much faster than my old 3G and the camera is at last decent enough to compete with other phones. I've not done any dev on it yet to test the speed. I am a little pissed off though that despite not letting people touch it or even breath on it - within 4 days I've got a scratch on the screen. My 3G is 2 years old and not a single scratch on the glass. Oh well.

Anywho, I'd better get on with my paid job. Just stopped for a spot of lunch.

Thursday, 15 April 2010

It's been a while


I must apologize for my lack of blogging for the last couple of months. I had lost interest for a while. Since my last post the game has actually been released. It went into the app store on the 24th of Feb. It was approved in about 2 days which is much quicker than I expected. Which also meant I had to get the website up and running very quickly. Luckily good old DokuWiki and a nice template did the trick.

Since then I have started working on 2 more games while I waited for the sales. Part of the agreement with Apple is that you are not allowed to disclose sales figures for your apps to anyone outside of the people authorised to access your account. What I can say is that sales have been abismal. I mean really really poor. I had an average sales figure in mind based on the quality of the game and the little information I could get from the internet on other products sales. I then had a worse case figure in mind that would be disappointing but acceptable. Current sales per month are less than 10% of my worse case guess. The obvious question is why. I knew the game was an average simple puzzle game so I didn't expect much. I also knew that because of how the progression worked I couldn't release a free version which apparently helps a lot. I also didn't know how to market it so no one knew it existed unless they scrolled down a couple of thousand places in the game rankings on the app store. My brother started advertising for my by contacting many of the top review sites and giving away free download codes. All but one actually bothered to review it. Whether this was because they have a backlog or it was because it wasn't good enough to review I don't know. Either way the one review didn't see to effect sales.

But...... I've said all along, this game was the tester. Specifically picked because it would teach me all I needed to know about game dev on iPhone. So now I've learned how to write iPhone games I can bash on with my one game a month plan. Right? Well not quite. I got very disheartened by the whole thing and lost interest. I worked on stuff but it was all background code instead of just getting the two new game prototypes done and released. I've also accepted a job offer which meant I've been expecting to start full time work any day now. Unfortunately due to unforeseen circumstances the start date has been delayed. This has had the effect that I've lost motivation as I've been expecting to start my new exciting job any day.

So what now..... I've got back into the game coding and I plan to work flat out to release the next two titles asap. Now I have an idea of sales and marketing I expect more from these. I don't expect a lot more to be honest but I do expect more. I do now believe the only way I can make this work as a full time occupation is to either come up with a genuinely good game idea (yeah me and everyone else in the industry) or plan a larger scale game based on what seems to be popular at the moment and push it through a publisher. I've noted that the bigger better selling games often seem not to be self published, instead they have gone through a third party publisher. A third party has the funds to advertise and push the product and will know which bloggers to push to get the reviews out there.

Anyhoo, in other news I'm selling my Mac Mini. It's on eBay right now. As a replacement I have my uber setup for development. 3x22" monitors and 1x19". It's a joy to work on, and It's dual boot with Vista for when my proper job starts!

P.S. If you do have an idea for the perfect game please get in touch. I'm a coder, I should't be expected to be a designer too :)


Tuesday, 16 February 2010

D-1 (probably)

So, D-Day is almost upon us. I'm now on week 7 of my maybe slightly optistic 4 week schedule. I've back tracked my work and from my reconning I'm actually just starting week 5. This takes into account all the things that got in the way of doing a full days work. Or at least that's what I keep telling myself!

My dear and beloved car was sold last week. I need some money in order to live jobless for a while and the car had to go. Instead I've got a healthy bank balance which I'm trying not to spend. I nearly gave in to temptation and bought a Mac Book, with the logic that I'd get more work done when I'm with my lady at the weekends and away from my Mac Mini. Just before I clicked the add to basket button I tried the latest iAtkos Hackintosh disk on my Acer laptop and to my supprise it worked flawlessly! Sound, network, wirless etc etc. This saved me £800 on the Mac Book and did mean I got a few extra hours of work done at the weekend.

I was down to 3 bugs earlier until I actually gave it a good bashing and now I'm back up to 6. I would have had them done tonight if I hadn't been so stupid. I've spent the last 3 hours working on the one font bug. I'm getting artifacts on the characters when displaying fonts from my automatically generated bitmap font. I don't understand why. I checked and double checked all of the generation and drawing code and put in a load of debug. I finally gave up at 1am and built a test version and downloaded it to my phone to give it a quick play in bed. It is at this point i've noticed the fonts are displaying fine on iPhone. It's yet another bug of the emulator and I've spent the last 3 hours chasing an emulator bug. Grrrrrr!

Anyhoo, I'll finish up in the morning and hopefully not find any more bugs!

Night all.

Wednesday, 3 February 2010

Wherever I lay my hat

Well the 1 day move went well. However the following 4 days didn't. Day 1 was taken up with the move. Day 2 I managed an hours work before heading from new home to old home to sell the old car and do some cleaning. Day 3 and 4 was spent cleaning, decorating. Day 5 was a wash out too.

So, you may have guess I didn't make my 1st of Feb deadline. Monday this week was also a wash out as I had people viewing the other car I have for sale and I had a party to go to for a 5 year old. So, I've effectively lost a week's work. Not to worry though, things are going well this week and I'm hoping to have a finished version by Friday. This of course may be again scuppered by tickets I have to Britain's Got Telent live auditions tomorrow in Birmingham. Hmmm, who knew being unemployed could take up so much of your time!

I've finally managed to build a test version and got it out to a couple of people yesterday. I'll try and build another version today and get it out to all of the testers. The remainder of the work is making it pretty. Adding fades between screens, putting the movies and backdrops in and adding all the little bits that make it a bit more dynamic. Mr S has got the movie playback working well and it's going in between the levels in story mode. We've also created a font for the menu's that works a lot better than the original attempt.

The new office is working out well, and only 2 steps from getting out of bed to sitting at my desk. It reminds me of the old days of working from my bedroom. The internet is all connected and my server is back up and running.

So, if I'm going to get it finished in a day and a half I'd better get back to it!

Friday, 22 January 2010

Contractual obligations

I thought it was about time i actually took a look at the process of submission to iTunes store. I'd read on some blog somewhere that it can take a while for the 'contracts' to be approved. Not even knowing what these contracts were never mind how long they'd take I thought I'd better look it up.

It turns out that simply by being approved as a fully paid up developer means you can release free apps in the store. However if you want to get paid for your troubles you need to sign up to a bunch of other stuff too.

The first thing you do is read the licence agreement. It's pretty big but full of obvious stuff without getting too heavy. After you've agreed to this you need to give your contact information and your bank details so they can pay you. If you're outside the US, which I am, you also need to sign a declaration saying you have no financial connection to the US in the form of employees or renting equipment of some kind in the states. You also sign up to the tax agreement where they'll pay the relevant sales tax in your teritory if they can, and if they can't you agree to pay it yourself.
In with this information is also the payment tables of how much you get per unit from each teritory. I'm selling for 99c or 59p which gets me 70c or 36p. Which I guess means there is more tax in the UK as the equvilent US to UK conversion would be about 42p.

So I'm all signed up with this and the contracts are pending. I've no idea how long they'll take, I just hope they are all done by my submission date.

Today was a bit of a washout for work. My cold made me feel like cack all day and I only got a bit of work done. On the plus side Mr S has done a sterling job getting the main menu and options menu in. He also got the movie playback working which means the story mode is just a matter of playing some movies!

It's moving weekend for me so I won't be working till tuesday at the earliest. There's still lots to do before the first of Feb and I foresee some late nights in my very near future!

Thursday, 21 January 2010

It's a stinker

As if I wasn't already behind with my schedule I woke up with a stinking cold this morning!
Yesterday was constructive. My good friend Mr S came around and we organised him helping out with some coding. He's going to be doing the loading screens and the menu. This'll mean I may be able to catch up with my schedule.

I move on Monday which means next Monday and Tuesday will be spent moving furniture and cleaning. This only leaves tomorrow and 3 days next week to finish off everything! I think it'll be finished but there'll be a load of little non-essential things that won't be done. The move and preparing for this interview I have tomorrow has really eaten up a lot of time. Sorting out Sky TV and broadband took over 2 hours on Wednesday just on phone calls alone! This is not the ideal months to try this experiment. If I go back over the work done in the past 3 weeks I think I've actually only worked the equivalent of about 7-8 days. Less than 2 weeks. It's partly all the other things I've got to do, partly the crazy weather just after I'd started and partly how hard it's been to get back into the swing of working from home. It's not a thing everyone can do and I'm very out of practice.

The game did make progress today. I finished up on the arcade mode and level progression and got it all sorted. Mr S got the loading screens in and is looking at menu's. I'd have liked to have done more. Instead I arranged my mail redirection, cancelled my water, cancelled my gas and electric. Spoke to the estate agents about the requirements before I move and arranged to get my car valleyed ready to sell it. I've also started packing, and sniffed non stop since lunch time. Not good!

I'm off to bed a good 4 hours earlier than usual now since I have a phone interview for a job early in the morning. Hopefully I won't have lost my voice by then! I must remember to buy Lemsip tomorrow.

Tuesday, 19 January 2010

Horses, not zebras

My odd random crash ended up being memory trampling that I had introduced when I decided I may need the full 256 characters in the standard Latin font instead of just the first 127. I changed all of the code apart from the array that actually holds the character descriptors. You can imagine what fun this caused. Because I'm new to iPhone I've gotten in the habit of looking up things on Google and the iPhone forums before I start debugging. This lead me to an article on almost the exact same crash caused by threading. If I'd have been on any other system I would of course seen a random system crash out of nowhere as memory corruption. It's the most common cause. It only goes to prove, when you hear hoofbeats, think horses, not zebras!


So, I've got the font system working and the scoring in. I used a standard windows font to generate a bitmap font via a little piece of shareware I found on the net. One little problem though. I looked up the copyright on the font and it's not licensed for use in software or for redistribution or modification. No problem I thought, I'll go hunting for a free font. Although there are loads of free fonts on the internet all the ones I found were released under one of the open licences. Unfortunately although these licenses allows free use for almost all uses they have a clause about redistribution and modification which technically I am doing both. I'm modifying the font by converting it to bitmap and I'm redistributing it in the game. I'm sure there are truly free fonts out there but I can't seem to find any!!!!! I'll worry about that later I think.


I'm being visited by a good friend tomorrow who has offered to help out on the project in order for me to get it done by my self imposed deadline. Hopefully he'll be able to do some of the donkey work for me such as menu's and title screens. This'll take some boring but necessary work away from me and let me get on with the actual game bits. I've got the source control database set up and have used it remotely so there shouldn't be any problems. Assuming that is he doesn't object to my shoddy code!


I got JTB's laptop back today with a lovely new screen which means I can code away from home. I may accidentally keep it a bit longer. Thanks John!

Monday, 18 January 2010

EXC_BAD_ACCESS

I've been getting the odd random crash. I'd hoped this was nothing or something to do with the emulator. Tonight the crash went from random to consistent. I'm crashing in a CGContext function. CGContextClearRect to be exact. I had no idea why. The data being passed was fine but I still get crashes. The crashes sometimes moved around too. After a bit of research it looks like I can't use any CGContext calls from anything other than the main thread. I believe I'm using a calling thread as the crash is in the init code, which is on a applicationDidFinishLaunching callback. I'm going to have to sort it out tomorrow. Bugger!

So, last night I wrote a schedule. I'd planned 5 full days of work this week which leaves debugging for next week. The schedule started badly. I had to pick up my new car today. I'm trying to raise some money to allow me to live for a few months without needing to work. To do this I'm selling one of my cars and buying a much cheaper car instead. The plan was to get an hours work done before I left and then get back by about midday. The hour's work didn't really accomplish much and a massive traffic jam meant I wasn't back until after 1.30. Then the new car started playing up so I took 3 hours out this evening to try and fix it. Add to this the crash and I've got very little done today.

What I did get done however was to get the Font load and draw working. I found a simple bitmap font generator on the net. I generated the font on my laptop and included the generated texture on the Mac. I did try a bit of software for running windows on Mac called Parallel Desktop. I could have used Boot Camp but wanted something where I could run Windows in a window. Parallel Desktop however has a fantastic feature where is runs Windows as part of the Mac desktop by capturing the windows from the virtual Windows machine. The start menu docks into the Mac doc and the windows just appear on the Mac desktop. It truly is excellent and enabled you to use Mac and PC on the same machine as if they were the same OS. I've not given it a decent workout yet but it certainly is useful.

Anyway, back to the project. I've got to get this threading problem sorted tomorrow and the font displaying the scores. I've also got to get all the overlay and effect sprites working tomorrow. I'm still sticking to my deadline of submitting on the 1st of Feb and between now and then I'm moving house.

I've also got a job interview next Tuesday. I've been offered a couple of jobs since I lost mine at Christmas but I've used the excuse that they're too far away. I'm not prepared to move from the area as I plan to move in with my GF as soon as I can. However this job is remote working from home. It is also a very interesting and challenging position, and it's certainly a job tailored to my expertise. This does mean I have a choice to make. Should I pass up a great job for my risky iPhone work or just take the job and demote the iPhone career to a hobby? There are a lot of things to consider, but in the end it will probably hinge on the money. It may just be too good to turn down. We'll see next Tuesday I guess.

Time to look up iPhone threading.........

Thursday, 14 January 2010

Why am I supprised?

I'm new to the world of Mac, but for some reason I imagined everything in the Mac world to be shiny, user friendly and work out of the box. It is however occurring on me that Mac's and PC's aren't that much different at all. Now I've moved around a few keys and got the desktop laid out how I like it I often forget I'm on the Mac. The similarities became more obvious today when I had to replace the Mac Mail app with Thunderbird. I use Thunderbird on PC. I like Outlook a lot but it doesn't handle IMAP that well and it is expensive so I've grown to love Thunderbird. I didn't even think of using it when I switched to Mac, I just used the inbuilt Mail app and without even thinking about it assumed it would fulfil my needs. I found out today though that it hadn't been storing my sent mail on the server. After much messing and reading of forums it turns out it doesn't handle it that well either. So that's Chrome and Thunderbird instead of iExplorer / Safari and Outlook / Mail. Yep, Mac's and PC's are a lot more alike than either side would admit. I think anyone who ever joins in the Mac vs PC argument  should be forced to do their job on the other machine for a few weeks. This would give perspective and I imagine, if my experiences are anything to go on, make them realise they're are a lot more similarities than differences. One thing still bewilders me though. How on earth can Mac users live without a global shortcut to open Finder? Seriously guys!

So, today I found I had a lot of bugs. Unfortunately they're not the ones I can fix by stepping through the code. I've got fleas! Well technically the house has fleas but they are biting me! The cat's moved out a month ago in preparation for the move. They're living with my Girlfriend. Since I've been working at home I've had the heating on a lot more than previously and I guess they've come out of hibernation. I'm going to have to bug bomb the whole house at the weekend. It's driving me mad!!!

I did a lot of tidying up today. Got everything moving smoothly and put a lot of the little things in that make the game and the levels flow. I also added the final game modes where you have to keep away from certain blocks and get other blocks into the vortex's. I've got to start on the font system tomorrow. I'm not sure if I need a full font system or just numbers and do all the text as graphics. I think just numbers and graphics is by far the easiest way. I'll do numbers first and see how I feel after that.

One thing I expected but didn't really think about too much was how much system code I needed to write. Essentially I'm writing an entire system from scratch. OK the drawing is being handled by OpenGL and the input arrives via a callback but virtually everything else is written. Now obviously I knew this but it's just more code to write that I've been so used to being there for you in the engine. I've worked with engines for a long time now and when you've got a good engine you spend little time working on it and most of your time writing for it. Don't get me wrong, I love the engine code stuff. It's just that it takes so much time up that could be spent on the game.

I'm going to put a bug database in place to log bugs. It may be a bit of an overkill but it's sensible. Especially if I'm giving out test versions. It's far easier if they can just log the bugs. I must also get a task list together. I keep thinking there's loads of small things I need to do but keep putting off because of all the big things I need to do! I've never had much success with task software so for now I'll rely on the old pen and paper to schedule the remaining 2 weeks of the project. I move in 10 days time which will lose me 2 days work while I physically move and then clean the house I've just moved out of. I guess It'll also eat up time settling in to the new place. So I'm calculating I've only got 9 working days left before submission. I'd better get a move on!!!

Wednesday, 13 January 2010

Wanna buy a keyboard?


It's cool, sexy, beautifully designed and the thing that all the cool kids want. It is however still essentially a laptop keyboard for a desktop computer. I'm sure it's great for the average Mac user but for someone who hammers away at a keyboard for 8 hours a day it's just not good. I'm sure the wrist pain would subside in time but it just feels too cramped. I plugged in my PC ergonomic keyboard today and it felt like undoing the top button on those jeans you still wear from when you were in your 20's. It felt so free and easy. I did however only make this choice to go back because I found some decent software to map the PC ctrl-windows-alt keys to the correct places for the Mac's ctrl-alt-cmd keys. I even got my " and @ in the right place! Still no # key, but I've discovered that on alt-3. There's still a few crazy keymappings but it'll do for now. I also now have a very strange thing happening. Randomly the shift key sticks on. Not physically but the keyboard mapper says it's on. Pressing both shift keys together seem to do it but I'm sure it's doing it without this combination. I've checked and Sticky Keys is turned off so this shouldn't happen. And it won't turn off once it's happened. I have to pull the plug on the keyboard to fix it. Very annoying!

So, does anyone want to buy a cool Mac wireless keyboard? £40 to a good home. Anyone?

While hammering away at the code today something dawned on me. I'm writing my game in C++. Mainly because I know this language extensively and I've never seen Objective C before last week. I've limited the Objective C to the bits of the code that get called from the system and then just pass control and any relevant data on to the C++ code. This is when it occurred to me that all of my code would probably just compile on the PC with no adjustment. So, a plan came to mind. If one were to write for instance a library on PC that you could link to which passed on startup and shutdown data along with mouse click information and you also incorporated a pass through for the relevant OpenGL commands you could essentially write an iPhone game on a very basic PC iPhone emulator. It would only emulate basic touch input and OpenGL drawing, but this is the majority of your game coding anyway. It's an interesting idea if someone wants to write an iPhone game without shelling out for a Mac. Eventually you'd need the Mac to do the final testing and add sound and save data etc. but for those just wanting to give it a go it would be very handy. Hmmmm, if only I had the time! I'm currently trying to convince a friend to write the emulator. I need to find a big carrot to offer him.

My good friend John filled me in on how I can build versions for all my volunteer testers today so I'll be rolling out a demo to people tomorrow. I'm hoping to get some feedback on the control and if it crashes anywhere. This will be a great help as I'm not going to have time to test it myself before submission.

Today has been a bad day for coding. I've had the estate agent around most of the morning and lunch time showing people around. I did however fix a couple of problems I had with the gameplay and restructure some of the source code that was written in haste and needed some restructuring.

I do think however I'm developing cabin fever. I've been snowed in all week and it just snowed non stop today. I've unfortunately (or luckily) got no snacks in so in between meals I'm drinking gallons of tea and coffee. I must gather the huskies tomorrow and try and get to the shop for some supplies.

Tuesday, 12 January 2010

Noodles and tuna



I'm reverting back to to being a student. Not that I ever was a student of course! In an effort to save money while I've not got an income I've been eating cheap. Today was Super Noodles with a tin of tuna. Surely a balanced meal? You've got your carbs, your protein and your omega 3. I think I'll put it on regular rotation along with beans on toast, pasta and tomatoes and cuppa soup.

I'm still finding it hard to concentrate for the whole day when working from home. As Ben Elton said, everything is fascinating when you're trying to work. You think of all the little things you need to do that are not work related, and because you're your own boss you do them there and then instead of leaving them till you've finished work for the day. And there are a lot of little things I need to do! Since I have no job and this is all self financed, I thought it prudent to move out of my rented house and seek cheaper accommodation. This means I'm moving. And that means lots of little things to do. I'm not sure why some days I can work solidly all day and others I can't seem to concentrate. I guess it'll get easier with time. Either that or I've got no hope of doing this for a living!

So, I've essentially finished the game. The whole thing plays level after level getting harder as you go. There's a saying in the games industry, the last 10% of the game takes 90% of the time. Bring on the 90%!

There's 2 main systems that I haven't looked at yet. The menu system and the in game playback system. The menu system should be real easy but I'm not sure about the playback system. The original game I'm converting is in  flash. That means lots of movement and animation of the characters between each level. The original plan was to convert them all to video and just play them back. That may still be the plan, but since I've found out that video playback is only full screen and above everything else it doesn't exactly fit in. I've also looked into playing flash on the iPhone. The new flash supports it but I'm not about to go through the whole process of getting that implemented. The third solution is to hand animate everything through the sprite system. Luckily the animations aren't too difficult and it shouldn't take long. Ideally I'd like to write a simplified flash like animation editor on PC (or Mac) and implement a player for iPhone. however since my project is 4 weeks start to finish that's not an option. Anyone got any idea's? Or for that matter, anyone volunteering to do it for me?

Monday, 11 January 2010

I wish all days were like this




Today was a good day. I've coded virtually non stop since 10 this morning till now, just before 2am. I got bored of music and have been "watching" TV all day. When I say watching I mean I've been watching TV i've seen so many times before it's just background noise. I started with Top Gear, then QI then a Mythbusters marathon.

I got some bad news today. A company I worked for up until May last year has just closed it's doors and is dropping all the staff that don't want to relocate to head office. I've got some good friends working there and there's a lot of people without jobs as from next month. I of course don't technically have a job either so I know how they feel. I'm lucky that I have the means to try this for a few months before I need to look for a new job.

Anyhoo, today I got the grid movement finalised. It all moves lovely in all directions now. I've added the systems to handle the items on the grid that you have to match up and got one of the game modes working. I've added a level system and a state machine to handle the game modes.

I also looked up video playback so I can get all the interlevel animations going. I was very sad to find out that movie playback on iPhone is a full screen or nothing kind of thing. No rendering to a surface or a texture. And it even fades the screen to and fro from the video so you can't even transition into a game level seamlessly. I'm going to have to use a mixture of video and sprite animation to get what I need. Bummer.

I've also been thinking about the schedule for this little project today. I think I need to get it in to Apple submission by Feb 1st. This gives me 19 days or 14 more work days. This seems possible but there's still a lot to do. I expect to get all of the game modes working by the end of this week. However I then need all of the menu screens, the transition screens, the in game animations and nice bits and then testing. It may be pushing it a bit. 

Does anyone fancy being a tester?

I've been told that Apple take 10 ish days to approve the game before it goes live. Hopefully they won't find any faults. I've also been thinking of a price point. I originally thought the 99c (59p) price mark was the obvious one but I really ought to do some research on game pricing. I still suspect I'll release it at 99c. I also need to do research into "Lite" versions and if they mean more overall sales.

Then there's advertising. I need to set up my website so there's at least a web page for the game. The flash game's web page will also get a link to the iPhone version. I also need to submit it to the relevant review sites and magazines (are there magazines for iPhone games?)

Hmmm, not as optimistic anymore!

Saturday, 9 January 2010

I feel dirty

It's Mac Christmas! It has arrived. The keyboard I ordered from eBay just a few short hours ago is here. I opened the brown paper wrapping to unveil a deliciously cool completely white box with an Apple logo at each end. The beautiful milled aluminum (yes that's how you spell it cause it's american) keyboard lay inside inside what I now know to be the Apple standard shaped polythene covering. It is indeed a work of art and I feel dirty just looking at it's shininess.

I have always wondered about the solid lump of aluminum  technique. Surely you get a lot of waste aluminum after you've milled out a keyboard, laptop or Mac Mini. I guess it is just melted down again, but still it seems a waste.

I must admit I've been looking at the new Magic Mouse too. At a price tag of £70 it's a bit excessive but it does look cool and it certainly is a reinvention or at least a re-imagination of a normal mouse. I must get down to an apple store and take a look. I must remember not to look down on these people too as I now share at least a little of their Mac love.

On to the game. Not much done yesterday coding wise. Instead I set up my Perforce server. I personally feel Perforce is the best of the asset management systems or SCM's (Source code management). The only issue I have with it is the nearly $1000 price tag per seat!!! However those nice chappies over at Perforce will let you have the server for free and connect up to 2 users for free too! Since there's only me I set up the server on my home server and integrated it into XCode. This means I can now grab the project on to the Mac Book i'm borrowing (thanks JTB) and code away from home. The Mac Book does suffer from a slightly cracked screen in the shape of a pretty butterfly, but it works and it was free until I need to give it back so I'm not complaining.

I did actually do some coding yesterday. My block style game now moves in 2 out of the 4 directions it's supposed to and the other 2 directions are now ready to drop in very easily. It also recognises directional swipes on the screen and reacts accordingly. I'm hoping to get a little time over the weekend to get this finished off so I can finish up the game modes and actually play the thing!

There's more snow forecast for Sunday and Monday which may sabotage my plans a little. However with my source accessible from anywhere now all I need is a Mac and an internet connection and I'm good!

Thursday, 7 January 2010

But they're so pretty!

I've finally given in. I've bought a Mac keyboard on eBay. The wireless laptop style one. Very reasonable too! I'm still disappointed though that even the UK keyboard with the £ sign and everything still has the @ and " reversed. Apple obviously overheard someone talking about a UK keyboard layout in a bar somewhere and didn't actually do the research themselves. I've always disliked the fact that keyboards are far wider than they need to be and subsequently your mouse (if you're right handed that is) is far off to the side. I can live without the numeric keypad, and I'm sure a lot of people would agree. Anyway, new keyboard, very slimline and cool. You'll probably see it relisted on eBay next week when I decide I hate it.

So today. Finally got the main game algorithm sorted and just as I was adding all the scroll directions in I found a bug. It was a pretty obvious bug which I should have seen coming so I'll have to rethink. I planned to have it all working by today but events took over. As is often the case when you're not being managed your mind wonders and you end up doing what you want rather than what you should. This means I have a load of nice new graphics lifted from the flash version of the game I'm converting rather than much new actual code.

The game I'm converting BTW is called Blocular. You can find it at http://www.blockular.com/ it's originally written by a friend of mine who writes flash games full time. You can find him over at http://www.longanimalsgames.com/ I think it's a good choice for my first iPhone game. Nice and simple mechanic and well suited to the iPhone.

I'm not sure yet what the plan is for release. By my estimations it should be ready for submission to Apple before the end of the month. I have no idea after that on how it all works. I should really look that bit up!

Anyway, I have a plan on this bug so I'm off to fix it.

Wednesday, 6 January 2010

Adventures in babysitting


Day 3 and I'm babysitting a 4 year old with chicken pox. Poor thing. he's actually fine just spotty. I'm hoping the flat screen babysitter in the living room will allow me to do some work today. Currently I'm saying a quiet little thank you to Lord Reith who although long dead I'm sure is the main reason we have CBeebies!

I was up late again last night. When I used to freelance from home in my teens (yes that was back in the 80's) I used to work through the night and sleep in the day. That was of course before I was a family man. And had no friends. Not even virtual ones since the internet wasn't invented yet! Please no comments on ARPANET etc.

So, the plan for today. Last night I got the new framework displaying my grid again. Did I mention it was a simple block puzzle game? So back to where I was on Day 1 but now with a good framework beneath it. I also added a simple test to move the blocks around. The plan for today is to get the blocks moving in the correct way for the gameplay. I also want to get the block adjacency working which will make the game effectively functional. This I will call the gameplay demo. I may even take a wander into sound playback too if I get bored.

It's still white out there. GF has gone to work and said it's not too bad on the roads, but there's no way I'm getting my car out there. Rear wheel drive doesn't do too well in the snow.

I'm still not completely convinced that the Mac editing environment is any better than PC. XCode is pretty good but it seems to be missing (or I can't find) some functionality. For instance I can't step through build errors easily on the main window. The compile / debug / emulate cycle is pretty nice and downloading to the iPhone itself is almost as fast. All in all not too painful but not quite as nice as Visual Studio.

Bugger. It's snowing again!

Tuesday, 5 January 2010

Snow day




Well day 2 has had a little hickup. I got up just after 8 after my GF called and looked out the window an it had just started snowing. By the time I'd made the decision to drive to GF's this morning instaed of this evening it was heavy and by the time I'd packed up my Mac and was on the road we'd had an inch or so.

The 20 minute journey ended 3 hours later with me abandoning my car and walking to a friends house. To cut the story short I didn't start work until 4pm. So now i'm on the kitchen table at the GF's trying to motivate myself with a hard wooden chair to sit on and no Internet (router blew up!)

So far I've done what I intended to do and started work on a framework for the game. Proper texture and sprite managers. This of course means it'll be a day or two before I get back to where I was last night.

Oh well, I'd better stop blogging from my iPhone, flush the toilet and get back to it. TMI?

Monday, 4 January 2010

Day one - done


I meant to finish at about 7.30pm. It's now 1.04am and I'm still at it. I did have a break for beans on toast and Top Gear but that was about it.

So, how has day one gone? The Mac is now working properly, i.e. I've changed the keymappings on XCode to match Visual Studio and work is flowing a little quicker now. I thought since I've been using VS since it was launched it may be a bit stupid to maintain two sets of key configurations in my head when I can just remap the keys.

The coding is going well. I've got sprites loading and drawing and I'm recognising input from the touch screen. It's at this point I had a choice. Either continue on with the freestyle coding or actually take a step back and write a bit of a framework. I was very tempted just to push on and have a working game prototype in 2 days but this would just be for show off value and would ultimately lead to heartache while trying to maintain the mess. So step back has been taken and now I've got nothing on the screen!!!

Tomorrow I hope to have a texture / sprite loading framework in and have the basis of the game logic working. I also need to tidy my desk!!!

Anyway, the bed beckons and there's only so much Jonathan Coulton you can listen to on YouTube.


Time for lunch!

So, what have I done in the last 4 hours? What every coder does on their first day of course, I've configured my system and installed all those little apps one can't live without. Well being new to Mac I've found all those little apps that do the same job as all those little apps I can't do without.

I've also fixed some of the CRAZY issues that Mac users and Apple seem to not care about. For a start I'm using a Microsoft keyboard. However it could be any keyboard that's not apple I'm sure it'd have the same problem. I'm in the UK and therefore have my " key on shift-2 and my @ key between the ; and the hash (pound for our US friends) key. I didn't type the hash because I can't bloody find it on my keyboard!!!!! This is despite the settings being correct. A google search shows that this is a very common problem that Apple don't seem to care about. A hack or two later and it's still not working, but I'm working on that!

And what's with Home and End not actually doing what they're supposed to? That one was a little easier to fix though.

Sorry I'm ranting. I know a lot of this is because on Mac things are done a little differently to on PC and if I'd have gone from Mac to PC I'd still be having the same rant but the other way around. It doesn't excuse the keyboard layout thing though! Especially since the Mac Mini is meant to be a BYODKM (bring your own display, keyboard and mouse) and is partly aimed at the PC user wanting to go Mac without shelling out a fortune for a iMac. Sorry I'm ranting again. It's just that have you seen the prices of those machines compared to the same spec PC? do they make each one out of gold?

Maybe I'll have something to show by this evening. Either that or I'd have ordered a Mac keyboard from eBay after smashing mine into tiny pieces!

Day one of the new career or how to quit the 9 to 5 and write iPhone games for a living

I've got the shiny new Mac set up in the spare bedroom. I'm not a Mac man. In fact I've argued the Mac vs PC war from the PC side for many a year. However until Apple decide to allow iPhone apps to be written with a PC I'm a Mac man. Or at least I'm grinning and bearing it. That's a little unfair maybe. So far it's been OK. After all I'm using a 2 button PROPER mouse so how different can it be right?

So, 11am already. I didn't actually start till 10am and then I had to set everything up, install some keyboard and mouse drivers and Messenger etc. Oh and get iTunes working. Can't work without music.

So this is post 1 of hopefully many on my way to make a living from iPhone. I'm guessing there's thousands in my position, thinking they can make money from iPhone. Well yes and I'm not deluding myself. It may not work. However I do have a slight advantage. I am, or was until 2 weeks ago, a professional game developer. Have been for a greater portion of my life too. 24 years and counting now. Back from the days when game development was done with assembly and graph paper no less!

Anyway, time to get on with some work. I've got some example source code and I've spent the last 3 days since I bought my lovely Mac Mini (did I say lovely, I meant smugly stylish) reading an iPhone book and looking at example code.

Onwards.......