Just a quick one to let you all know that I’ll be out of the current iDevBlogADay rotation and back into the waiting list for now.
Life’s been pretty busy, especially given I’ve unexpectedly started a new job this week. While my iOS work continues, I now have significantly less mental bandwidth to allocate to it, and even less to think about blogging, so I thought it best to hand over the torch to the next in line.
I’ll still be posting about the next game (just less regularly), so please keep an eye out for more updates!
Work continues on the word game, which I’m currently referring to by the very boring handle of “Project WC”. The code itself is coming along well, and so far TDD has been working really well for me — it’s keeping me much more focused on only writing code that I need, instead of normal habit of trying to pre-emptively implement functionality that doesn’t necessarily end up going into the finished product. At the same time, there’s been a lot of other stuff going on, and so things haven’t been going quite as quickly as I’d like.
The area where I’ve made the biggest progress this week has been in the design and feel of the game. You see, the wife and I have both been playing some old PS2 games recently, while the newer consoles made their long nautical trip home, and I’ve been inspired by a game I never would’ve thought to look at for inspiration: We ♥ Katamari.
In hindsight, perhaps it shouldn’t be such a surprise. Both games are built around a single, simple mechanic. But there’s a huge variety or stages in Katamari, and while sometimes that variety is achieved through different settings and visuals, there are a number of stages that have fun and/or crazy tweaks to the way the game plays, and particularly how the stage ends. (A particular entertaining stage — especially when watching someone play — is the cowbear stage, which can only be completed by avoiding the many cows and bears scattered around the place.
It’s an approach that seems to have a lot of potential, and I’ve already had a number of ideas for twists that would make a big difference to the types of words you’d want to play. (For example, a stage where you could play as many vowels as you want but limited consonants.) I’m also starting to get a sense for how to present the game as a whole, but I’d rather keep that one up my sleeve until I can actually show it.
This new approach is going to push me back towards the original design for the game, and away from where I was thinking of taking it, but it does seem to be solving some of the big design challenges I was having with both. With some of them addressed, I can look forward to a whole new set of design problems to attack!
This post is part of iDevBlogADay, a group of indie iPhone development blogs featuring two posts per day. You can keep up with the rest of the group here.
It’s been a while now since the wife and I moved back to Oz, and I’m starting to get a little restless. A lot of my time and attention after we returned was put into getting set up and settled in here, but I’d put far less time into thinking about what comes next. Over the last fortnight I’ve been thinking a lot more about what I want to be achieving over the coming months, and in particular I’ve been looking at what sorts of habits and routines I want to start developing to help me get there.
With previous projects, I’ve tended to just jump in and worry about the details later, and it’s been very much a “weeks of coding can save you hours of planning” kind of affair. While progress on the latest project has been minimal in terms of lines of code written, I’ve been making steady progress on the design side of things. There’s still a big missing piece in terms of the exact style and thematic focus of the game, and without that things aren’t really clicking together as much as I’d like, but I have a few ideas and brains I want to pick on that topic over the coming week or so.
Where I have been working on coding, I’m working on developing some new coding practices. I’ve spent some time looking at TDD, and am looking forward to trying it out on this project. I’ve decided to stick with cocos2d too — I’m thinking I’ll be able to strike a good balance there of what I already know (or have a good idea of) how to do, and new stuff I’m going to have to learn.
Still, the biggest challenges to my development work are all outside of the work itself. In the absence of a job or any other major external demand on my schedule, I’ve been struggling to hold myself to any sort of daily routine. Speaking of jobs, finding work is a big priority at the moment, and a lot of time is going into job hunting. I’ve decided that for the moment I really want to keep my development work as a side thing, and look for employment elsewhere, and there are a few amazing sounding public service positions that I’ve been applying for. Applying for those jobs is really time consuming, but I’ve managed to score myself an interview tomorrow afternoon, and I’m pretty positive about my chances there. Getting set up in a job would be a major relief at this point, so fingers crossed.
In terms of other good habits, my wife and I have been really conscious of improving the quality of our food intake, which has been great. Next up is getting back into a good exercise routine (despite the weather’s efforts to sap my motivation there). The idea is to really work on boosting my energy levels, which in turn should improve my work productivity. One thing that is really obvious to me looking back over the last year or so is that as soon as I start neglecting one area of my life, all the others suffer too — looking at it all as being part of the same issue is actually really motivating.
By my next iDevBlogADay post, the plan is to have made some real progress on the WorldPlay reboot. I’m looking forward to sharing that then. I also have another super-secret collaboration that I want to talk more about, but I’m still a way off being in a position to announce anything on that one. Stay tuned!
This post is part of iDevBlogADay, a group of indie iPhone development blogs featuring two posts per day. You can keep up with the rest of the group here.
Although it’s been a while since my last blog post, today feels like the perfect time to start again, as it feels like a day that’s full of beginnings, all of them exciting. So I’m just going to jump straight into it!
Blogging with friends
This post marks my entry into the iDevBlogADay family, which is pretty exciting for me, as it’s an amazing community, and I’ve learnt a lot from reading other peoples posts there. It’s also a little terrifying — so far I’ve kept my work pretty quiet, and I really want to lift the quality of these posts to match the rest of the blogs. Let me start with a quick intro for any new readers. I’m a long time gamer who’s always dreamt of making games, but it took me a long time to realise that didn’t have to be some sort of impossible dream. I ended up going back to uni and learning the basics of programming, and while my working life has gone in a different direction since graduating, I’ve kept on programming in my spare time, eventually deciding that iOS was a good platform for me to be working on.
There’s still a lot there that I’m learning, in terms of the actual programming as well as developing good development practices, and it’s that stuff that I’ll be blogging about over my iDevBlogADay stint. Most of that will be in the context of my next project, which I’ll introduce a little later in this post.
Big changesThis post also marks a second beginning of this blog, after an 11 week hiatus. It’s been a crazy 11 weeks for me — 2 days after my last post Japan was hit by the Tohoku quake and tsunami, and then the Fukushima nuclear accidents. While we were fortunate enough to be living on the other side of the country, most of our free time was spent watching the news and keeping on top of developments, as well as all of our moving efforts (which got pretty nuts in that last week).
For the last month, we’ve been living back in my hometown of Melbourne, Australia, slowly filling up the empty apartment that we moved into. It’s only in the last week that I’ve managed to get a working area set up, which is pretty cool. I managed to get a standing desk too, which I’ve been wanting to try out for ages, and so far I’m loving it. All of which means I’m finally gearing up to get back to development work properly.
My last project (Project NP) is pretty much shelved for the moment, as it was way too safe and unambitious, and it really wasn’t something I was going to be happy releasing. Which brings me to my new project…
Back to the drawing board
A while back I started work on an iOS word game which was tentatively called WorldPlay!, although I never really liked that name. The core of the game was good, but the rest of the design was pretty shaky — it would have required generating a huge amount of static content, most of which would represent a pretty poor return on the development time invested. Initially though I was far too attached to that particular design, and so put it aside. (If you’re interested in the game, you can check out the TIGForums DevLog, or an early video of the gameplay.)
It’s still a concept that I like though, and so I’ve decided to go back and reboot the project. The fundamental gameplay is still going to be along the same lines, although the dressing for it will be quite different — the gameplay really doesn’t need the extensive set of hand-crafted levels or grand story I’d initially imagined, so the single player portion of the game will be stripped down a lot, with the levels being more procedurally generated. I’m also looking at a few ways of implementing a multiplayer mode.
In terms of setting out something a little more concrete, these are the features I’m currently aiming to have in the initial release, roughly in priority order:
- The main “get as many points as you can with limited resources” single-player mode
- “Power ups” and “traps” (more on how these will work in the future)
- Levelling up and special abilities
- Multiple distinct (both visually and somewhat gameplay-wise) stages
- Increasing difficulty as player reaches higher stages
- Amazing visuals (I have an amazing go to guy for this stuff)
- Solid sound (I need to develop resources for this)
- Online leaderboards and achievements
- Multiplayer modes
In terms of feeling, I want the game to be fairly accessible, but I do want it to have a slightly quirky sensibility, and (given it’s a word game) would also like to celebrate some of the more unusual and interesting words in English.
The next step is to start actually programming and prototyping stuff. In the past I’ve used cocos2D for most of my work, and I’m looking at continuing that, although I’m planning on taking a look at Corona, and whether that would be a viable alternative. I’m looking forward to sharing the results of that in a couple of weeks!
This post is part of iDevBlogADay, a group of indie iPhone development blogs featuring two posts per day. You can keep up with the rest of the group here.
(Wherein our beleaguered protagonist is afflicted by a severe case of life.)
This week’s going to be a bit of a cop out. The week’s been very productive in terms of Project NP though — the twist functionality, along with pretty much all of the actual game controls, is in place and functional, and I’m in the process of implementing a proper scoring system. My good friend and illustrator god Cronobreaker is doing amazing things to and for the visual side of the app. There’s definitely a sense of momentum building up for me at this point, which is awesome.
I would’ve loved to write and share a little more about the app at this stage, but it’s still just a little early, and I wouldn’t really have time to do that and publish this in time to meet my self-imposed schedule. Instead I thought I’d briefly share a little about what’s happening outside of the dev work, because big changes are afoot there. (Which in turn are the main reason for the lateness of this post. It all fits together, see?)
For those of you who don’t know me so well, I’m currently living in Japan, where I spend (some of) my days teaching English for a day job. It’s been the better part of 3 years since my wife and I came here, newlywed and with big plans. It’s been an amazing couple of years here, but it’s finally coming to an end. We have a lot of things that we want to achieve as a couple and as a family, and we can’t really do those things over here. So last week we officially handed in our resignation letters, and we’re headed back at the end of next month.
Of course, there’s all the fun that goes along with that now — house hunting (which is potentially almost sorted *fingers crossed*), job hunting, which is the reason this post is as late as it is, and more. It’s all starting to feel real now, which is exciting, but I’m also a little unsure of where Third Raven is going to fit in, and how much time I’m going to be able to dedicate to it once we get back.
Time will tell, I guess!
(23:59. Yes!)
(Wherein our demotivated protagonist breathes new life into the project — and himself.)
On Monday, after an impressively unproductive day of work on Project NP, I had a crisis of faith. Things were going nowhere fast, and it was very tempting to just write the whole project off as a waste of time. After some hard thinking though, Project NP is back on track, and I’m feeling more motivated about it than ever. I thought I’d take to opportunity to share what changed.
If you’ve been following this blog, you’ll probably have noticed I’ve been posting less and less about Project NP itself, and it’s no coincidence. Over the last couple of weeks, I’ve been losing momentum, and everything’s been getting harder and harder. There’ve been a few things that I’ve been banging my head against with no results, and I was losing confidence that the project was worth all the time I’ve put into it (which is far more than I originally intended).
As always, I find that if I have a problem with the project, that problem usual lies more with me than with the project. Looking honestly at how I’d been working on (and relating to) the project confirmed this: I had no passion for the project, and was working on it out of some misplaced sense of obligation. It was even worse because I’d stopped working to any sort of plan — I was just working for working’s sake, instead of to achieve something. Unless you’re getting paid by the hour there’s no way to justify that financially, and it’s always bad from a quality of life perspective.
So I started looking for something new to bring to the work, and two things jumped out at me. The first one was partnership. One goal I had was to try and do as much of this work as I could by myself, but somewhere along the line I confused that with not being able to ask for help. I have a number of friends whose creative input is always really helpful, but I hadn’t really spoken to any of them.
The second was ballsiness (although I really wish I could think of a better word for it). Coasting along like I have been is all good and fine, but I really need to be demanding more from myself. And if I’m going to be speaking with other people, I shouldn’t be afraid to ask for big things (better they say no than I decide they’d say no).
Even just picking those things out and looking at the project again from that perspective really lifted my level of motivation. It also immediately opened up a few actions that I’d missed before. I’m going to bring back the “twisting” feature, which I’d thought of but then scrapped, and I have a clear idea of how I want to implement it (which had been missing before). This morning I’ve also been speaking with a friend of mine who’s a brilliant graphic designer, and he’s given me an amazing point to work from visually. I’m also going to spend some time to get flat on what there still is to be done, and look at building a proper timeline for the project.
All there is to do now it actually go do it, right? I’m about to jump back into making a few improvements to the game itself, which should be fun. Stay tuned for progress updates next week!
(Wherein our studious protagonist shares his solution for cropping an image in Project NP.)
Recently I’ve been hammering away at the menus for Project NP. I get a little weird spending so much time on visuals while doing so little programming — it has the same sort of feel for me as grinding in an MMO -_-;;
A key feature of the app for me was being able to select any picture on your iDevice to use for the puzzle. It’s unlikely that all of those pictures are square though, so there needed to be some facility for cropping the pictures. While I’d always planned on implement a user driven implementation for this, up until recently I’d been doing it automatically. When I got to redesigning the relevant screen it seemed like good time to finally implement it, and it turned out to be easier than I expected!
The user interface
The interface was fairly simple — I have a UIScrollView the size of the slice I want to take (in my case a 300 x 300 square), which in turn contains an UIImage of the full sized image. Scrolling works straight out of the box, but the zooming took some minimal changes. First, the scroll view’s delegate needs to implement viewForZoomingInScrollView:, which should just return the view to scale:
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView {
if (scrollView == scrollView_)
return imageView_;
return nil;
}
Secondly, you need to provide a minimum and maximum zoom scale for the image — they have to have different values for the view to support zooming. My main requirement was that the image needs to fill the selection. I did set a constant for a max zoom scale too (currently I’m leaving it at 1.0, although I might play around with it a little). Given I’m creating the view for a particular image, viewDidLoad seemed like a good place to go about doing this:
- (void)viewDidLoad {
[super viewDidLoad];
imageView_.frame = CGRectMake(0, 0, image_.size.width, image_.size.height);
imageView_.image = image_;
scrollView_.contentSize = imageView_.frame.size;
CGFloat minXZoom = scrollView_.frame.size.width / imageView_.size.width;
CGFloat minYZoom = scrollView_.frame.size.height / imageView_.size.height;
CGFloat minZoom = minXZoom > minYZoom ? minXZoom : minYZoom;
scrollView_.minimumZoomScale = minZoom;
if (minZoom > kMaxImageZoom) {
// The image is too small to fill the screen, even at the maximum allowed zoom
// Disable zooming by setting minimum and maximum zoom scale to the same value
scrollView_.maximumZoomScale = minZoom;
}
else {
scrollView_.maximumZoomScale = kMaxImageZoom;
}
}
Thirdly, the docs say that the delegate must also implement scrollViewDidEndZooming:withView:atScale:. …But I haven’t bothered with it, and haven’t had any problems for not implementing it.
As an extra detail, I also wanted the image to be shown centered and fully zoomed out when the window appears:
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[scrollView_ setZoomScale:imageScrollView.minimumZoomScale animated:NO];
CGFloat centreOffsetX = (imageView_.frame.size.width - scrollView_.frame.size.width) /2;
CGFloat centreOffsetY = (imageView_.frame.size.height - scrollView_.frame.size.height) /2;
scrollView_.contentOffset = CGPointMake(centreOffsetX, centreOffsetY);
}
Done! You should now have a view that allows you to pan and zoom (from filling the view to as large as you allow) your image. Now you just need to be able to cut out the visible part of the image. Read on…
Cropping the image
Previously, when I’d been automatically cropping the image to fit, I’d used cocos2d (which I was already using for the game parts of the app) to create a sprite of the image and then scale and chop it us using a CCRenderTexture. It was a bit messy, but it involved zero learning — it was stuff that I knew and had used before. Of course, it also crashed when I tried to pass an image that was larger than the allowed texture size (1024×1024 for older iDevices, 2048×2048 for newer ones), an issue I didn’t notice for a long time. I’ll chalk that particular oversight to a lack of thorough testing — it was only by fluke that I had a large enough image to realise it (it was a map I needed to get somewhere!).
Anyways, in trying to find a solution to the issue, I realised you could do basically the same thing in all using UIKit. You can use UIGraphicsBeginContext() or UIGraphicsBeginContextWithOptions() to create a new graphics context, draw to it, and then get the image with UIGraphicsGetImageFromCurrentImageContext() (and finally clean up with UIGraphicsEndImageContext()). Here’s what it looks like in practice, to return the selected slice:
- (UIImage *)currentSlice {
// Get the size of the scaled image
CGSize sliceSize = imageView_.frame.size;
// Create correctly scaled image
UIGraphicsBeginImageContextWithOptions(sliceSize, NO, 0.0);
[image_ drawInRect:CGRectMake(0, 0, sliceSize.width, sliceSize.height)];
UIImage *scaledImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
// Create and return the image slice
CGRect sliceRect = CGRectMake(scrollView_.contentOffset.x, scrollView_.contentOffset.y, scrollView_.frame.size.width, scrollView_.frame.size.height);
CGImageRef imageSlice = CGImageCreateWithImageInRect(scaledImage.CGImage, sliceRect);
return [UIImage imageWithCGImage:imageSlice];
}
See, easy!
(Wherein our normally reserved protagonist ruminates on writing for a potentially wider audience.)
Another Wednesday, and time for another update. I’ve not had an abundance of stuff to write about though recently, so I thought I’d write a little about this blog.
Setting up a Third Raven website is something I’d been looking at doing for a long time before it actually happened properly, particularly while I was still spending a lot of time over on the TIGSource forums (there’s a heap of really interesting stuff going on over there, but I have trouble managing my forum reading time…). One of the things that came up a few times, in discussion of indie dev websites, was the importance of communicating yourself through your website. In a lot of ways, you want to be marketing your brand (which is basically you) as much as, if not more than, your products.
One issue for me, however, is that I have a tendency to be overly formal in writing. It is a skill that’s come in handy when writing resumes and cover letters (or proofreading them for others), but it’s not really what I want to be projecting through this blog. Thankfully my wife is very quick to point out when I’ve gotten like that here, and I think I’m starting to find a medium that I’m happy with in that regard.
With that part under control, I guess the next part is sorting out the kind of content I want to be putting up, and that’s where I’m still a little stuck. Honestly, my posts to date have largely felt a little self-indulgent (possibly in part because I’m not that fond of speaking about myself at length), but at the same time I haven’t felt I’ve stumbled across that many wonderful coding discoveries that I should be sharing with the world. Sharing my development progress is good, but recently progress has been slow, so I’ve got to pick that up — I’m going to take MysteryCoconut‘s advice and plan a feature worth writing about every week (thinking about what I’m going to write sometime before Wednesday morning could help too!).
The next part after that is going to be sprucing up this site a little. It’s a little bland at the moment, and not in any good way. At some stage, it’s going to need a new coat of paint — another thing to look forward to!
If nothing else, at least writing these posts always seems to motivate me a little more, which is just what I needed right now.
A couple of other updates from the week:
- Progress is still being made on Project NP, albeit slowly. This week has mostly been overhauling some of the hideous code I had running in the background.
- Over the weekend I spent a bit of time brainstorming ideas for my next project, and I’m excited! I’m thinking about setting the weekends aside for prototyping and brainstorming new things. Looking forward to getting this to where I can start talking about it!
(Wherein our contrite protagonist acknowledges the shortcomings of his previous offering and turns it into something he can be truly proud of.)
It’s been a couple of weeks now since Crossword Sidekick was released, to much elation and self-backslapping on my part, and I wanted to spend a bit of time talking about what’s happened since then. It was great at first — I had something finished (itself an accomplishment for me) and that I could point people towards and say “I made this”. There was just one problem: the app wasn’t all that good, and not something I really wanted to point people towards.There are a lot of other crossword helper apps on the app store and mine, while somewhat original for the focus on quick refinement of search patterns was more original, was slow. Noticeably, uncomfortably, almost unusably slow. Ultimately, I was left with a lingering sense of guilt — there’s enough crap on the app store without me adding to it.
A couple of unexpected things happened though. Firstly, people are downloading the app. Not a huge amount (just cracked 300 downloads yesterday), but people are, and with pretty much no effort on my part. Crossword Sidekick was also featured in a Utilities > New & Noteworthy on the Oz app store (not a hugely visible spot, but still something). I also started to see a very slow trickle of money from iAd. Suddenly I was starting to feel like I should make some improvements. So I decided to devote Saturday and Sunday evening to working on it (weekends are normally pretty unproductive due to my day job), and if I made any decent headway to release an new version.
One of my goals for Crossword Sidekick had been integrating iAd, but the implementation didn’t seem great — I had the ADBanner in a cell in my first table view, but if the user wasn’t on that screen (which would be a lot of the time), it wouldn’t be visible. After a bit of jiggling things around, and the usual “fun” that involved (I’ll write another programming post today/tomorrow about that side of things), ads should now consistently display through all of the (non-modal) screens. (The next step here is to start looking at moving towards AdWhirl or the like, I guess.)
The other (and bigger) task was to speed up searches. It turns out it really wasn’t that hard. When I initially wrote my DAWG walking class, I tried to make it all things to all men, and it ended up horribly bloated. Given Crossword Sidekick was borrowing it from another project, most of the stuff in there was entirely unnecessary too. I rewrite of the recursive search function in C reduced search times by ~75% (!) in some cases. The searches still seemed sluggish though, which is where I discovered another big issue I’d overlooked — at one point I was making updates to the UI (specifically to display the search results) from outside the main thread. Whoops!
Having addressed those issues, the app now feels a lot better, and a lot more usable. It’s actually something I feel proud of now! It’s in review at Apple now, but I look forward to other people being able to get their hands on it too. Exciting stuff!
Crossword Sidekick v1.0.1 should go live sometime this week. Stay tuned for updates here or on twitter.



