Advice is a two sided…something…

There are two aspects to advice, first someone has to give it to you and then you actually have to take it. As Matthew Wiggins suggested when I spoke to him last week, “Decide on the platform you’re passionate about and focus on that”. I then rattled on about technology choices, finding a GUI that would be cross-platform and possibly taking on a third party SDK.

So I spent a few days trawling for a free, OpenGL, cross-platform GUI library: Reading into Clutter before I found out that the only iOS implementation was no longer being developed and had never been part of the main release. Looking at cegui before discovering the same. Checking out QT before finding out that the iOS version has been under development since August but has no release date. Downloading LibRocket, then ccmake, then make, then trying to build the libraries both using ccmake and Xcode and failing despite following instructions to the letter (I think it might have been conflicting versions of the freetype library on my Mac causing link errors). Finally I downloaded Marmalade and started the long task of rebuilding my project in that, whilst worrying that I would lose being able to directly debug on my iPhone when using their SDK and other suggested problems.

 And then I suddenly started wondering why on earth I was focusing on being multi-platform when I’d listened to and roundly agreed with Matt’s comment above, “Decide on the platform you’re passionate about and focus on that”. So I loaded up Xcode, googled how to add a button programmatically (to check it would play nicely with my OpenGL code) and within 10 minutes had a pressable button in my game that looked just fine.

I’ll go to the trouble of adding a thin abstraction layer between my game and the objective-C calls that use the Apple UIKit, because the generalising programmer in me can’t be ignored *all* the time, but I think I’ll be making a New Year’s resolution early: To actually take the good advice I’m given.

It seems it’s not enough to simply listen to advice, agree with it and write it up because you think it will be useful to others. I actually have to take it myself. Who would have thought?

Advertisements

5 thoughts on “Advice is a two sided…something…

  1. Pingback: Pearl necklaces of wisdom, part 1 | mikeducker

  2. Hi Mike!

    Quick thoughts on cross platform gui stuff (its late, sorry if i ramble)… While apple’s UIKit might be nice and play nicely with opengl, if you’re considering android as a target platform, you’d probably be less impressed. I don’t really get the impression that the Android UI was designed to be built programatically, and although i’m sure its possible, it will involve a lot of jni calls to java code, issues with getting your data tofrom java, and probably a bunch of performance issues(unwanted triggering of GC, not to mention possible software rendering of widgets depending on device)

    In fact, NDK/ C++ on android isn’t especially developer friendly at all. So you either decide to ignore the platform entirely (making an eventual port extra difficult), or acknowledge that 99% of the cool stuff you get for free on iOS doesn’t exist there, so better to keep as much possible platform independent…

    I think abstracting the gui layer is definitely a good thing, but you might find if you end up having to use a 3rd party ui system anyway (for pc, android, linux etc.) then you might as well just have the same system on all platforms (helps immensely with debugging too). I know, i know its a slippery slope(!) but avoiding deviating code bases is good, right???

    So I *personally* would keep trying to find a cross-platform opengl based ui system (unfortunately can’t recommend one off the top of my head – will look into it). WIth my last few projects, i went crazy and wrote my own from scratch, and while very educational, i probably wouldn’t recommend that (though depends on how complex it needs to be)… The basics are pretty easy to get right, but mine got pretty all encompassing, and i’m still fixing corner cases more than a year later 😉

    I could go on for hours, but just another quick argument in favour of being “cross-platform aware”… One thing that has been invaluable to me has been being able to run a pc build of my games.
    If your code is set up to be cross platform from the start then adding another is generally pretty easy (Win32 is one of the more annoying, everything else is linux-y), but the main thing for me is the iteration time + ease-of-debugging in a win32 build is so much better than on a mobile device (though obviously some things need to be tested on actual hardware). If you can get iOS and Win32 running then you’ve pretty much solved 99% your cross-platform problems right there 😉

    Anyway. I totally get the argument about focusing on the game rather than the tech (i’m 100% guilty of not doing this), but most C++ code is pretty much portable across current platforms, so its not *that* hard to think for 5 minutes about doing it the “right” way. Some might argue your instinct to abstract interfaces for systems is “over engineering” but personally i think thats just good programming practice in general. 😉

    Yep, i rambled.

    Daniel

  3. Well that was quite a long, well considered response 🙂
    I’m glad it’s not just me who would search for the perfect solution for cross-platform ease. Having done a lot of research I just don’t think the solution is out there unless I go for something like Marmalade. If you find something then I’d dearly like to know…else…got any code I can have? 😀

    Excellent point about building on PC as well, it would make things certainly cross-platform and give me fast dev times (though I’d need to buy an up to date PC as mine is about 5 years old now) but that’s not a huge cost. I’d also like to get something working in a browser, but I don’t know how well that would work. Something to do in the future I guess. For now I’m going to focus on iPhone just because I have 0 income, the days are passing faster than expected and I’m more interested in getting a prototype I can believe in than anything else.

  4. You’re probably right about getting the prototype running quickly – motivation can be big deal, and I’ve found solo development (are you going it alone?) can be very isolating at times…

    Had a quick look into opengl based guis – you’re right, on first impression, it seems you don’t have many obvious choices available… What are looking for it to do, just rendering? managing the ui widget heirachy? input event,callbacks ? animation etc? I’d send you my UI code, though it has too many dependencies on my engine resource classes to be directly usable anywhere else ( though if you just want to LOL at my code than you’re welcome to!)
    Have you considered something “professional” like scaleform (i’ve never used it)

    So yeah, sounds like you’re probably better sticking with iOS/UIKit for now!

  5. Currently I’m going it alone but there’s always a deal on the go at the moment. I’m not finding it too isolating as of yet. Making sure I keep in touch with people helps with that. Where abouts are you located these days?

    I was hoping for a GUI solution that would handle a few choice widgets and callbacks with an easy system for custom skinning.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s