Musicians seeking to do game music… A few pro-tips… And why did I repost this?
Note: I am reposting this from a post I made on reddit.com because it is actually pretty well written.
I’m always up to listening to musicians show off their talent to try and land a job in game development, even if it is just for free to gain some experience. While some of the music I hear isn’t too bad in and of itself, I do hear a few tracks from time to time that are, well, not aimed at the right venue per say. To help along my fellow Bloggers, I want to list a few items that I think are important to make me not close your website half way through the first track, and hopefully other gamedevs can help share their thoughts as well in the comments.
Note that I don’t consider myself an expert in game development, but I do consider myself knowledgeable and make an active effort in the Indie world of iPhone gamedev (sorry, not trying to self promote, just validate credentials). Of course, I am fully capable of being wrong, out of my mind, or just plain stupid myself, so, take what I say here as you will.
A few protips:
- Always make a website with a variety of your sample tracks available (and preferably have a good few of them all on a splash page (so one doesn’t need to learn your site nav) using simple flash or similar plugin) – this is your portfolio and the first thing many gamedevs look at with any musician. Don’t necessarily worry about how your site looks (you’re a musician, not a graphics artist, and we know that – just as long as it doesn’t look done by a 13 year old kid you’ll be fine) or how long/short your samples are, or even how complete they are, but rather focus on what you can provide a game company with. Variety is a plus, as is more than one track. Existing promotional services are fine, especially if they aren’t too flash crazy. Also be sure to clearly make visible your contact info, services/collaboration info (e.g. are you willing to work (or provide creative feedback or similar) for free (but maybe with self promotion rights), do you expect payment up front or on a monthly basis, do you accept profit sharing (instead of or in addition to), etc.), as well as any track licensing notices (so if I hear something I like if I know I can rip it or not).
- side edit: Some people do put a bit of effort into the look of their site and can make a valid point about it helping to sell their work. This isn’t a bad thing – I am just making the point that looks is not as important as the music itself. Between hiring somebody with a poorer site but better music than a competitor, guess who gets the gig?
- Please make music for video games, not for a stand-up/live audience, like one would do if they were going to be a live performer. The music you’re making is for video games, not live performances. This cannot be stressed enough. Music, like art, like programming, like marketing, etc. is just one part of the entire puzzle of building a game – don’t try to make it out to be the only part (which likewise is certainly the case with a live performance).
- Game music always acts as a complement to the definition of a visual scene, IMO especially in terms of mood. I highly recommend that you pair your audio with a visual as to show how you can take your music to define the visual in an emotionally interpreted sense. Sung vocals are a really hard one to pull off in this regard (but I’ve seen them done well at certain points), but keep in mind that music is there to invoke something inside the gamer the visual alone cannot, not necessarily tell its own story.
- side edit: My current musician is very keen on mentioning that the intended emotion in a piece may not be the way people necessarily feel it. I personally feel that regardless of the way people may feel about it, the more that they are effected by your work the better. There will always be a good deal of variant interpretation regardless, but IMO the better you can capture the intention the better the piece.
- Avoid rock-n-roll. I know, sometimes it does fit, but likewise I’ve seen far too many who think that putting an Ozzy Osbourne or ACDC like track to a fast action FPS or likewise fits… More often than not it does not fit. Remember, game music complements the visual, not stands on its own. The game is there to create an experience, and everything must aim towards this end – music cannot in this way be trying to stand on its own.
- If the game has music that overlaps and cross fades, trying to keep it in the same key really helps the cross fade not sound like crap.
- Motifs are really awesome (especially when complementing a certain character’s appearance on screen), but they have to stand out and be used in the right way. A few notes of a motif doesn’t do much to non-musical people, but a solid melody, reused in the right situation, can be quite powerful (e.g. darth vader).
- Be capable of working with multiple kinds of instruments, in multiple genres, and understand what various forms of notes and rhythms make up various styles/genres. As a game progresses, there are soft parts as well as hard parts, and being flexible (and showing that you can be on your portfolio with multiple tracks) is a huge bonus to make you look like a professional musician.
- A lot of music comes later on in a game project, as music in a lot of ways is built to fit a particular visual scene (think musical scoring for movies). Good game musicians should know how to take a visual and create a musical interpretation of it. Sometimes though music can act as the means to build a game up around, and in such case the approach is to build out from the music (of course, in terms of game design, you can do build outs from a variety of aspects, including music, but not limited to just). Regardless of the approach, games that have a special harmony between audio and visual really speak out (since that’s the way it’s done right).
- Be prepared to work with others who may have ZERO musical knowledge. As a professional programmer myself, all too common I come into situations where a client is looking not just for me to program, but to counsel them on, and this may sound mean but it’s so true, on why they are stupid, and what they need to know to be smarter. Communication is a huge thing here, especially with musicians who are selling themselves to projects as an independent contractor. Remember, it’s more than just making the music, it’s also counseling and educating clients to help them figure out what they want too, even if they can’t pinpoint it just yet.
- side edit: A lot of the marketing books I’ve read that deal about service based industries talk quite a bit about education being a central part of the client relationship. I agree with such an approach, as even with myself I’ve had a lot of my own issues understanding music and the composition process until investing time into learning some basics.
- Be prepared to possibly take crapshoot work to build up and pad your portfolio. Now, please, I’ve gotten into some huge arguments on this point before, and have heard some good points, especially around doing free work for an established studio being much more rewarding than doing free work for a newer Indie studio… But here’s the thing: you still need to be managed, still need to be told what to do, still need to be dealt with, etc. – an established studio may not want to waste their time on those aspects because the person doing that dealing with you is on salary, and unless you really do have the skillset needed, your work may simply not cut it for the ship (read as, you’re not good enough (yet)), thus possibly wasting their time (and pissing people off). Regardless, any amount of work you put out (even if the project goes nowhere, even if it is just Indie) is really hard to be used against you – trust me, there is no such thing as failure in trying. Also, a lot of business professionals (myself included) are biased and feel that unless money is involved in the equation, “free” talent may simply not have the needed motivation to stay on task (not always of course, but those people have awesome written all over them from the start anyways), even if the project interest isn’t to blame (and I can attest to this first hand!) – I’ve recently written about such in Indie Game Magazine about this actually (sorry, self promotion), and even have heard of people so desperate for experience that they pay the companies to hire them on (was an article on Reddit at one time even).
- side edit: If you can land work at a good studio, awesome, but don’t expect a high pay outright just because you’re here – the game industry is heavily saturated and you have to be real good to make it anywhere. If you do land a free spot though, please, don’t be lame and cut out a week or two into it – if you agreed to go into it for free be prepared to put out the same effort as though you were being paid (sounds one sided I know, but, honestly, nothing sucks worse than having to find a new musician/artist/etc. any amount of way into a new project).
Finally, I love it when musicians advertise for their services and am always up to listening. The downvoters to these kinds of threads (especially those who go nuts over self promotion) need to take a hike – musicians, like any other professional, spend a lot of time on their profession and it is always awesome to see somebody really excited about what they do.
And to other game devs, feel free to post your own lists of items you think are helpful.
Best of Luck!
MAC OSX Python build issues /w PIL (Imaging-1.1.7)
So we had some fun getting PIL (Python Image Library) to build on my artist’s machine lately.
We want to use PIL to do some sprite sheet work with Blender, and we needed it to run on Python 2.5 (since Blender 2.49b MAC OSX uses Python 2.5). But of course, when we tried to follow the simple install instructions, namely, on the command terminal:
sudo python2.5 setup.py install
(note that you can use ‘python’ in place of ‘python2.5′, or even ‘python2.6′, but we wanted to use explicitly Python 2.5 so that’s how you do it)
We were greeted with a really fun error:
cc1: error: unrecognized command line option "-Wno-long-double" cc1: error: unrecognized command line option "-Wno-long-double" lipo: can't figure out the architecture type of: /var/tmp//ccAN3ISQ.out error: command 'gcc' failed with exit status 1
Naturally I thought maybe Xcode wasn’t installed, but it was (that is obviously square 1 for anything compiler related). Trying to download some prebuilt packages failed as well, since they were old and for 10.4.
That’s when I began searching and came across this:
http://www.reddit.com/r/Python/comments/9gpuc/snow_leopard_and_python_compatibility_issues/
and of course this:
http://mtrichardson.com/2009/09/fixing-jinja2-and-pycrypto-and-probably-others-on-snow-leopard/
and if you want to see why that option falls out, read this:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35961
Naturally I though “All right, a fix!” and sadly, the guys on this blog posting were, well, misguided. Especially the follow up reply post.
I’m not making this up, but literally, what is happening is that if you ever had OSX 10.4 on your machine, and now using say 10.5 or 10.6, guess what? You got TWO different versions of Python 2.5 installed. Yup, TWO. Not one, but TWO. And guess what else? The default, thanks to a rogue PATH variable, may be set to the OLD 2.5, the one for OSX 10.4. WHAT JOY!
On that second link above, they talk about going into /Library/Frameworks/Python.framework/Versions/Current/lib/python2.6/config/Makefile and editing out all occurrences of “10.4u” and replacing with “10.6″ (including a “10.3″ reference to “10.6″ that they forgot, and also removing the “-Wno-long-double” option from the C build flags), and that surely will get a compile going.
But it’ll be wrong. It’ll install the PIL module, or any module for that matter, into the old Python install path in /Library/…, not the newer Python install path in /System/Library/….
The correct location of Python on an OSX 10.6 system should be at /System/Library/…, but there may be a PATH variable set up in the ~/.bash_profile to look in /Library/… first for the Python run binaries, a left over, if you will, from upgrading from OSX 10.4 to the newer 10.5 and 10.6.
Two things you gotta do to really fix this:
1) Remove the Python.framework folder from /Library/Frameworks/, or, make a symlink over to /System/Library/Frameworks/Python.framework instead:
cd /Library/Frameworks/ sudo rm -fr Python.framework sudo ln -s /System/Library/Frameworks/Python.framework Python.framework
But of course when you run ‘python2.5′ or ‘python’ from the command line, it will most likely still be broke so, in that case…
2) Edit your ~/.bash_profile and remove the PATH settings where it says “/Library/Frameworks/Python.framework/Versions/Current/bin/:” – in the case I worked on this just meant removing the two lines that say PATH = …. and export PATH (considering that you don’t have other PATH modifications). Or you could just delete that file all together:
cd ~ rm .bash_profile
And viola, the install script now works, correctly puts PIL into /System/Library/Frameworks/Python.framework/…, and in the Blender console: “import Image” now works flawlessly.
Hurray updation woes. Hope this helps.
Best of luck.
100k Apps means you better be on one of Apple’s lists, and why are people led like pigs to a slaughter?
Congratulations on reading this. You are one of the few people who have gone above and beyond the App Store’s doors and have actively found something outside of the App Store. In fact, you are so few in number reading this that the fact that you’re even here is a testament to the human race, let alone the slaughterhouse that the App Store has become.
I’ve gotten so sick and tired of all the moronic “stop crying – do more marketing” posts that have surfaced in the last few months relating Indie developers to somehow being complete idiots who deserve failure for failing to do any marketing. The presumptuous idiocy that these posts have inherited speak volumes for the reality that all developers must face: Most consumers don’t care about you. In fact, most consumers find it more fun to laugh in your face than give you any bit of helpful advice, let alone go outside the App Store.
Some of these posts go so far as to mock developers for not understanding concepts that are covered in all marketing 101 books, even though, not too surprisingly, they mention not one detail on how they plan to do what they tout (such as be the purple cow). How quaint.
Now, I don’t want to point fingers to direct posts (because I guess that’s “unprofessional”). Do a Google search – I’m sure you’ll find plenty. I’m sure you’ll also find plenty of Indie developers who are writing about things the App Store could do to not only make it easier for Indie developers looking for their “big break”, but also create more fun and interesting experiences for the consumers of the platform.
There are 100k Apps, and developers are saying they have tried everything to market their Apps, and consumers are complaining that they can’t find a developer’s App and so blame the developer. I wonder what’s going on?
I have seen countless posts talking about how it’s the fault of Indie developers for not marketing. It’s funny, really, that these people sit on their pedestals as critics and think that the world should revolve around them – that all the visibility in the App Store should ever need is the various top 100 lists. That the reason for the failures is simply that they, as an individual, haven’t seen your App due to the developer’s own pathetic efforts at marketing, and that the developers should orient their life around just these critics’, as though their opinion counts. Funny that they mention how they never seen your App when all they do, like all the other pigs to a slaughter, is look at only what Apple has provided, and severely limited.
Many of these developers aren’t crying – they’re frustrated that Apple has, as the middle man, shot themselves in the foot, and are taking consumers, and especially Indie developers trying to run viable businesses, with them.
By far, in my honest opinion, the biggest problem with the App Store is that it’s limited to top 100 lists. If you take a look at this, over 100k Apps, yet you can only see the top 100 in any category, what kind of coverage does anybody expect to see? Even if you take 1/10 that number, you still have a harsh market to compete in, let alone the full 10/10.
And this assuming people will go to places other than the App Store, or pay more than 1$ for anything, let alone 1$ to begin with (they’ll pay $200.00 plus for an iPod touch or an iPhone, yet spending 1$ on an App that took somebody 8 months to make is such a stretch as compared to spending 1$ on an Icee that it took a store clerk 8 minutes to put together).
The reality though is that the typical and general means to market simply don’t work, and relating to my own personal experiences here is why:
1) Review sites won’t even touch you. Unless you have something really neat, or pay them (which we’ve done, 3 times, and have only 1 paid review up at TheiPhoneAppReview (7/10), and 1 free review at AppGirlReviews (9/10)), or have some sort of backwards connection, well, forget even trying. Their intake on review requests is absolutely staggering /w 100k Apps, and unless you have a brand name you’re working off of… you’re screwed for reviews…
2) Mobile advertising is expensive and has a low conversion rate that doesn’t translate well to sells. To let your ads go world round, AdMob, the largest advertising service for iPhone, you can put down $0.03 bids on per-click. We put down $50.00 and had that used up within a few hours. We tried again, this time localizing to just the U.S. and had to pay $0.10 bids on per-click. That was used up within two days. So, what has the convergence rate been? We’ve made, maybe, 5 sales. Not enough to cover costs. So $100.00 was dropped that resulted in hardly anything.
3) Website advertising is expensive, and doesn’t translate well to visits (and usually you can’t get CTR data since the owners don’t have it set up correctly). We put down $50.00 for about two weeks of main banner at AppGirlReviews, another $50.00 for a month of side 125×125 icon on TheiPhoneAppReview, and 15$ for a 1/2 page ad for Indie Game Developer Magazine. Out of all of this, our analytics clearly shows that the rate of which we get people from those redirects has very minor influence from those sites, even after dropping yet another $115.00 for only meager visits.
4) In-App-ads don’t get clicked on enough to matter. Although our App has a Lite version available, which is downloaded 10-25 times every day pretty consistently, we haven’t made more than $1.00 off the AdMob adverts (that we get paid for by-the-click). So even though we have expanded the revenue stream to include money coming in from such, it still hasn’t made much of a dent.
5) We also put down $50.00 for business cards that we sent out to various people to hand out. We’ve dropped $150.00 for trade/expo shows that we spent all day at (not including traveling costs). We have even talked to professional marketers about our approaches. Doesn’t matter what we try, nothing translates to sells very well. Another $200.00 down the drain.
6) We even tried getting into cross branding opportunities, such as App Treasures. We tried doing promo code contests (half of them aren’t even being used that we have freely displayed on various websites), as well as experimenting with price drops to spark events in the sites that automatically scan for price changes on Apps in hopes for coverage.
7) We have even went to communities we recruited from, posted forum posts, thanking the communities for the talent that helped us complete our projects, and hardly anything resulted. This also includes getting into fights on forums and the likes.
So what translates to sells?
The reality is that consumers are, with all due respect, lazy. Of course they are – they are relaxing and want to be spoon fed entertainment, just like our modern society has grown up with. By you reading this, you probably aren’t in that group, so you don’t count, but the real reality is nobody cares (especially about the “whinny Indie developers”). They do the top 100 lists on their devices and that’s more than enough. Hardly anybody is going to go beyond that system to look for other Apps – it’s information overload. For those that do go above and beyond, probably do find posts like these, and probably find our Apps even, but even then…
Top 100 lists = quality, ease of use, an appearance of a “filter” to just the good stuff, and… most importantly… the most consumer visible.
If you get your App featured in one of Apple’s lists, especially top 100, you’re set. I’ve talked to a variety of developers, and for those who haven’t been featured, who have been doing everything they humanly can to market their product, it’s the same ball game. For instance:
1) I’ve heard of developers that have come to the conclusion that they will stop writing games for people, and start writing them for just Apple (because Apple has a “what we’re playing” list). Apple becomes their biggest costumer, because the potential to be “sponsored” is of much more value than what any consumer would ever think.
2) I’ve heard developers talk about how the App Store lists system sometimes screws up so badly that, for instance, the “recently released” list is displaying Apps that were released from over a year ago, or that their App, which in one case the author self admitted to being of inferior quality, is placed on a top 100 list in error for several days or sometimes weeks. Developers who are lucky to be in the “bug” are making bank.
3) I’ve heard of other developers, that haven’t already bailed for more reasonable platforms like Android, going the route of offering a free app with a buy-in mechanism, basically the freemium path (Google it).
4) And of course, developers who have existing brand names find very little problem getting involved and making sales. Anything that a developer can do to “expand their brand” is a business decision that has far reaching benefits.
In my honest opinion, consumers in the App Store want everything for nothing. They are led like pigs to a slaughter to a list that represents less than 1% of the available Apps. By opening the doors to everybody, prices fell to nothing. Although the early birds made bank and attracted the modern day “gold rush”, anymore unless you have a AA – AAA quality title or a brand name backing you up, you have nothing. Nobody is going to waste spending any money on trying out a brand that they don’t know or haven’t heard of, or isn’t featured on one of Apple’s lists. It takes too much of their time to click to go further and look for themselves.
So really, we’re sitting in the modern day version of the digital gold rush, and, like always, the consumers, the ones we Indie developers rely on for our livelihood, are laughing at us for “not marketing”, yet don’t realize just how much we’re doing behind the scenes, and meeting with no success. Obviously it’s our fault for trying everything, but the real success being the almighty top-100 list.
But no, we should trust the pigs going to slaughter that the real reason is just that we’re not marketing enough. Of course! What a novel opinion by those who see not where they’re going.
Best of luck… You’re gonna need it.
Referenced types are my friends, and why does C++ suck so much?
I’ve noticed a trend I’ve started using more and more… I take much more notice of the memory implications of everything I use in code and any more I see that extra effort as a means to view all data as being in one of two piles: value types and referenced types. And there is a huge difference that leads to some pretty important things.
Value types are the things that I know are one-of-a-kind. They exist in memory once, and if I want to make another one, I have to create another space of memory to hold a copy. All the primitive data types fall into this category and make up the base to work off of.
The next kind of type is the referenced type that I use all over the place to reference data, usually via pointer. They still have a section that is value type based (namely, their acute data pointed to), but it has to be shared around the code base via pointer. All this sharing needs to be tracked some how and this leads to very close ties to reference counting, since, well, that’s about the only way you know when you can return the memory back to the system.
Now, in small fry programs a lot of the memory return situations are well defined. Having just vanilla pointers makes perfect sense. But, in larger programs where data is shared from all over, and who knows when data can make its way back to the system, well that’s a different beast entirely and it needs to be a very important part of normal data management activities.
As I’ve been working in other languages, I’ve seen the referenced types and value types adoption quite liberally. In C# and Java, almost everything is treated as a dynamic referenced type (value types are still available of course, but are in the minority), and I can set objects to be other objects at my own wilm. No fanciness needed, just put and go. Need to add to an array? Not an issue, just assign and go.
Well, the same is true for a lot of the newer languages too. From Python to Ruby, from C# to Java, the rage is referenced types… well… except for C++.
Aww yes… And this is where C++ epic fails.
You see, in C++, there is no real concept of referenced types. You can have pointers to classes and values, sure, but there is no immediate reference counting in the language dynamics (such as STL), and this leads to a horde of issues that I think, honestly, is one of the major roots of most of the evils in C++. Other languages, in particular Objective-C, don’t have this evil because reference counting in put right into the framework.
I love referenced types. They seem so much more… realistic. I want to reference data from all over the place. I want to point to it. Even in database you get an ID number. But, in programming, I just want to point. That object, over there, please.
So what am I getting at? Well, let’s use the most basic example – adding a class instance into an array. Sounds like a simple enough job, right? Shouldn’t be the cause of too many issues, right? Well, every other language has nailed it down, but not C++.
So taking a look at the STL, we can easily see why C++ sucks. Now, I know, STL is _not_ C++, but in these days, the framework you’re working in is so closely paired with the language that I find it hard to see C++ and STL as their own things (even though I am fully aware they are). It’s kinda like the difference between Ogg and Vorbis (yes we know, one is a container, another is a codec, we get that, but they are so common it’s ridiculous why I have to have a 50 lined libogg and a 50,000 lined libvorbis). C# would not be nearly as neat as it is without all the frameworks that come with it that make life easy, as with Java, as with Python, and as with about every language I’ve ever worked with (even Lisp has a module that links into C based libraries). C++ is still versatile enough that you don’t need to use STL, you can certainly write your own code to do this in, but that isn’t what is being argued here. Let’s use what the language gives us as a standardized tool and run with it.
The STL has at its core a variety of nifty things, all the basic data structures you would want, plus a few fun template metaprogrammed things that, with a bit of study, can do some pretty impressive work in a few lines of code (which is, IMHO, a bad thing when it comes time to debug what isn’t working), but it lacks heavily in one fundamental aspect: All STL methods that add/remove/etc. data expect a VALUE TYPE. Now, what this of course means is that if you have a class, you can certainly add the class to the array, or list, or whatnot, but it’s going to invoke a copy constructor, and now you have TWO pieces of data instead of one.
With large classes that have a lot of data, a copy constructed value type copy is entirely out of the question here. You are almost always forced into doing it via pointer reference.
Now of course it makes sense to do it with value types this way. If all you’re working with is, say, integer data, you don’t really care to have an integer allocated out there in never land and a pointer to it from multiple places – that doesn’t make a lot of sense at all (… or does it?). But, and this is from years of experience, copy constructors do NOT imply memory management! Even if you use a pointer to add into the list, a pointer is a value type, and it’s copied directly into the structure somewhere, without any memory management overhead of any kind being done upon add and upon remove. This is bad… Very bad…
This is where libraries like Boost come into play. Boost gives us a handy wrapper class called a shared pointer. The shared pointer is an object that, you guessed it, is an over glorified pointer that points to a class and has a reference counter in it. Now, when we add the shared pointer object into the array, the copy constructor DOES do memory management. This isn’t a feature of the language though, but of the fact we’ve used a Boost shared pointer object. On add we increase a reference count, and on remove we decrease a reference count. We have a referenced object that has the appropriate memory management aspect tied to it.
But there is a problem. First off, you can’t dynamic_cast<>() a shared pointer, because you would be casting the shared pointer object instead of the object being pointed to. Luckily we have a special method in the shared pointer class that lets you do this, even if that’s a bit nonstandard. Second, we have a lot of issues with 1-0-1 counting associated with returning and passing as argument that affect the shared pointer. This is of course greatly explained in literature, but adds another piece of complexity (which is bad). Lastly, and this is the kicker, if you are in the code segment in the object being pointed to, and you need to return or pass into call a pointer to yourself, you don’t return or pass a vanilla pointer (that could potentially be up-casted into yet another shared pointer – creating a situation with TWO shared pointers with TWO independent reference counts -> that’s a seg fault just WAITING to happen), you need to return or pass that SHARED pointer object… but you have NO way of knowing where the heck the shared pointer object that is pointing to you is located at! You can’t have a reference to it inside of yourself, otherwise you have a circular reference and will never be deallocated and that’s bad, so you’re forced almost into a table lookup, or worse, a redesign.
So, what the heck?
(I should note STL also has an auto_ptr object, but it has ownership transfer semantics and is much less useful than the Boost shared pointer object)
Well, along comes a fancy aspect. It is almost always critical that we delegate reference counting to the object ITSELF. The object, ITSELF, needs to be responsible for how much other code is using it, and needs to be responsible for providing the mechanism to retain and release itself appropriately, deallocating on zero count.
With C++, STL does not even give you the option of a callback routine to call upon addition or removal into a list. It assumes the data you are passing in is value-type only data. It will never check to see if it can make the call to a retain or release method (let alone have the reflection capability of doing so other than at the class level). Good grief.
In the Irrlicht 3D engine, the designer did something very smart, yet very in vain. He forced ALL objects to inherit from an object that exposed retain and release dynamics. He forced everybody to understand that before you add the object to some place, you needed to manually retain it, and when removed from that same some place, you needed to manually release it (a bit of a problem, really). He forced this into his documentation, and, to be honest, it served itself quite well. And when I say itself, I mean that quite literally, as it introduced something “non-standard” to the C++ coders (oh noes), and the community had to learn something shockingly different, “memory management” (and yes that is to be said in a scary voice to a C++ programmer). Not that people didn’t adapt, but, it was a non-standard thing to do in the likes of C++.
But something is better out there that does all of this for us already, besides the bloat and overhead from the Java and C# languages. Objective-C has retain and release built right into the data structure classes. It is a fundamental aspect of the entire NextSTEP foundation layer that memory management is so critical to work with. When you add an object to an NSArray, you’re adding a referenced type only, and that referenced type will have retain and release calls sent to it. It will be managed correctly. Even the C based data structures in geWiz ES has callback routines for add and remove, amongst other things, that can be used to do per-object retain/release counting, or any other specialness.
There is a very good reason why Objective-C has served Apple so well, and C++ served Microsoft so poorly that they had to call in a special person to hack a better version of Java together (who did a very good job and made C#, which I think is a great language, as long as you don’t mind being tied to Microsoft, which I am not a fan of at all, and no Mono doesn’t count).
Of course, when dealing with referenced types only, you wind up with containers, like NSNumber, that store simple value types, like integers and floats. That is a needless waste of memory, absolutely, but it’s better than not having any memory management at all. Not such a bad idea after all, once you get used to it. Reminds me of the love for C#’s automatic boxing and unboxing.
It’s the simple things… the things like this… that make C++ suck so much. Although I’d kill for a way in C/Objective-C to call egwSin() and have it redirect the call to the appropriate egwSinf(), egwSind(), or egwSint() routine based on data type passed… *sigh* Can’t have everything.
Best of luck.
MAC OSX 10.6 & iPhone OS 3.1 Simulator Linking Errors
For those getting linker errors, try some of the advice below.
If you’re having libcrt linker errors, similar to:
ld: library not found for -lcrt1.10.6.o collect2: ld returned 1 exit status Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
This can be solved by creating a sym link from crt1.10.5.o to crt1.10.6.o:
MacMini-2:lib johannes$ pwd /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/usr/lib MacMini-2:lib johannes$ sudo ln -s crt1.10.5.o crt1.10.6.o MacMini-2:lib johannes$ ls -la *crt* -rw-r--r-- 1 root wheel 17324 Dec 22 2007 crt1.10.5.o lrwxr-xr-x 1 root wheel 11 Sep 15 19:38 crt1.10.6.o -> crt1.10.5.o -rw-r--r-- 1 root wheel 18212 Dec 22 2007 crt1.o -rw-r--r-- 1 root wheel 18472 Dec 22 2007 gcrt1.o
If you’re getting gcov linker errors similar to:
Undefined symbols: "_vproc_transaction_begin", referenced from: ___gcov_init in libgcov.a(_gcov.o) _vproc_transaction_begin$non_lazy_ptr in libgcov.a(_gcov.o) "_vproc_transaction_end", referenced from: _gcov_exit in libgcov.a(_gcov.o) _vproc_transaction_end$non_lazy_ptr in libgcov.a(_gcov.o) ld: symbol(s) not found collect2: ld returned 1 exit status
The problem is the implementation is missing for some reason… Apple screwed up somewhere. Here is a small blank stub version to at least get the compiler to compile:
#include <Availability.h>
#include <sys/types.h>
#include <sys/cdefs.h>
#include <sys/syslog.h>
#include <sys/time.h>
#include <stdbool.h>
#include <launch.h>
#include <vproc.h>
typedef struct vproc_transaction_s *vproc_transaction_t;
vproc_transaction_t vproc_transaction_begin(vproc_t vp __attribute__((unused))) {
return NULL;
}
void _vproc_transaction_begin(void) {
return;
}
void vproc_transaction_end(vproc_t vp __attribute__((unused)), vproc_transaction_t vpt) {
return;
}
void _vproc_transaction_end(void) {
return;
}
I’ve tested this and at least got a compile to work and a build going, but obviously something is now being broken purposely. If anybody wanted to take a closer look, an implementation of the functions might be able to be hashed from:
http://www.mirrors.docunext.com/websvn/launchd/checkout/trunk/launchd/src/libvproc.c
Hope this helps. Best of luck.
Exposure is everything, and why is everybody so shallow?
It’s rather interesting how marketing plays out. The means to which normal people find your game seems to be one of the most vital aspects of doing well. One must analyze not just how to get onto the golden street, but also how to wow a person into picking your game up.
Recently we’ve been having a bit of grief on how one would side step the conventional mechanism, such as the App Store’s top 100 lists. It has been said all over that the key to success is to get on that list. While it is probably the case that many Apps are in fact crap, cheaply produced and cheaply put together, the reality is that all those add up. When it comes down to it, every spot out there is a spot one must compete with, and how does one really know what to do to get ahead?
Well, the algorithm of the App Store isn’t published, and while it is obvious there are a few variables that are going into play concerning “popularity”, it looks as though gaming the system has been nailing itself shut. The reality anymore is that one must do some honest marketing and highly polished presentation to attract the sales.
Some players already have it made, though, thanks to their name branding. Other players, particularly Indies who can’t afford to get into the technological warfare game, have no name branding to go by nor for that matter high polish and, in that case, it is vital that we use every means possible to increase exposure to our target audience.
So where does the target audience hang out at? Through what places would they be moved to take a look at our stuff without it costing us an arm and a leg? Truly, the amount of money slapped on advertising needs to really make up in end sales. Although not everything will require money to advertise with, there are a few key positions that will mean everything. The target audience has to be told, somehow.
Without survey and market data available to show the alternate means to which potential buyers would see our game, we really are almost blind and in the dark. The only potential to come through is to make an educated guess.
The guess work, though, shouldn’t need be too conservative, since there really should be a bit of overlap, but the guess work needs to be based on a few statistical factors, such as unique visits and click through rate. Based on those numbers, coupled with price tag, an idea can be built up as to just how potentially valuable the various advertising routes are.
Probably more difficult to guessimate though is the few other routes that don’t come with a price tag or featured position, such as online forums, Twitter, YouTube videos, etc. While there will be views, followers, discussions, etc. it is hard to know just will work, but in those cases it only takes a few hours of work to create a large number of online bases to provide exposure.
But of course, the most important aspect is, if anything, that a game has the points nailed down that make it stand out. Particularly, gamers are horribly shallow, and everything revolves around first looks and appearances. While the saying “don’t judge a book by its cover” has a lot of truth to it, the reality is that the cover, the presentation, and the polish is absolutely critical to nailing a sale.
Other forms of marketing, such as annoying everybody who walks by you on the street, is also valid, but is notoriously akin to shaddy marketing that helps create backlash effects that may make exposure inadvertingly be counter productive. Of course, even negative PR is good for marketing, it shouldn’t necessarily be a focus, especially for Indie developers.
Other mechanisms also exist, such as banding together of Indie artists under a name branding, such as App Treasures is trying to accomplish, but even then the problem exists with consumer image. While App Treasures makes every attempt to keep their titles top notch, there are plenty of games lacking polish that are well worth the buy, but of course probably wouldn’t make it far in an approval process for that branding. Other branding that is more open ended and larger in inclusion would be better, but with such a shallow market that may make things worse.
Either rate, you gotta stand out to get the sales. Do your business homework or fail, end of story.
Best of luck.
iPhone: Notorious marketing, idea piracy, and why should we be exposing new revenue streams?
I’ve been involved with the “iRis” project for the last 9 months at Rogue Pirate Ninja Interactive, LLC and finally just submitted our work for approval. You can check out the product spec over at http://www.roguepirateninja.com/games/iris
If there is one thing we’ve been feet frozen over it is how we’re going to take our game, which is on the order of complexity of about 80,000 lines of C & Objective-C, as well as 25 MB of art and audio assets, and correctly market it to the masses in a market that is starting to be salted with big-name companies like Id, EA, etc. Although we’ve done our homework well and have a pretty solid game, we’re seeing other Indie game developers get black balled into the twilight of the App Store, with little to no room to let their fun little apps breathe. There is no room left to win the technological warfare game the larger corporations can wage.
We’ve been focusing our entire energy on how we are going to market our game, not so much as an afterthought, but as an additional phase of production. We’ve been looking at a few other similar concepts and have come up with a few thoughts to help make us stand out.
First off, it can’t be said enough that the market of the iPhone is very giving to those who make fun quick little Apps that act as the laugh-getting party favours. From iBeer to iFart, to the Zippo lighter to Zen garden, if the App appeals to the cheap fun atmosphere of a bar or party, it almost certainly takes off with little effort. These sorts of games help sell themselves because the concept is easy to comprehend and requires only minimal effort to create. There is something peculiar about these Apps, as will be discussed later, but to put it briefly: minimal input, maximum ouput.
There is also another layer of marketing that is starting to be seen more and more. Apple has done itself a major dis-service by its submission and acceptance policies, getting backlogged into weeks at a time, even for just simple updates to an already existing App. Add to this the inexperience required to do such a job, perhaps poor overhead management, and you have a massive dysfunctional team of under-trained and under-experienced people with little ability to communicate internally. As a result of this, we’ve seen Apps get rejected for some of the most inane, most inappropriate of reasons, while other Apps with the same thing get off Scott free. There are online sites sprouting up that collect information on how long it took for Apple to get around to responding to an App, as well as database sites that collect reasons for rejection.
The best example of this is of course Eucalyptus, a reader application that was nothing more than an App that access web-accessible content and puts it into a nice book-like format. Since one of the books it could access was the “Karma Sutra”, and in text-only format, it was rejected on the basis that it had sexual content.
Okay, so this story is not new and has been touted on many a blog… But that’s the point… A lot of people have all heard about this story. Because of the notoriety it gained with being rejected for such a silly reason, it gave it the attention and grounds to create a following, a following of which was all too pleased to see it finally be approved. I was part of that following, and, as soon as I pulled up the product on the App Store on my iPod, I was shocked to see the price tag, a shiny 10$ USD.
But like all the marketing gurus always say: there is no such thing as bad press. The reality of the rejection process has sparked a few applications to get into the spotlight and have, rather directly, aided in the exposure of these applications. This has basically lead me into thinking that notoriety marketing is a real way to market something on the iPhone. However, this assumes that the action being done is against the ones submitting the App, not the other way around. It probably wouldn’t be the best for a company to rob a store for a marketing gimmick, even if they do get on the local news.
Secondly, part of the marketing process comes from just having something worth selling. Good ‘ol marketing theory 101 here, you have to have something unique, different, and neat about your App that makes it stand out against the rest. I recently was involved in a thread on Gamasutra forums that revolved around this. Sadly, developers simply can’t expect yet another simon-says game to be “different” enough to do well. There are hundreds of other free ones doing the same thing, and probably a whole lot better. Developers must do their homework and reach out and see what other games out there are doing.
So what is a good thing to build a game off of? One particular example of something that works is to simply steal the idea from a similar game. In some fashion or another, all games are guilty of this, perhaps some less than others, but in the end they are called genres for a reason.
iRis encountered one such occurrence. About two months prior to release, another application was released that showed similar gameplay concept to what we were doing. Being a bit upset at first, we decided to look closer to see what we were missing. It didn’t take much more than looking at the first couple review comments, and we were already back to the design board ensuring that we were going to add in the features being requested, as well as maintaining features others liked. While one could say we stole, because, well, we did change things based on another App’s reviews, the more appropriate thing to say is that we researched the competition so that we could make a better product. Not that we were doing it out of malice or out of a way to truly squash another Indie down (which is never the case in the Indie world), but simply that we had a preview of the comments that were to come if we released without certain things.
But with all the copy-cat applications out there, one must truly start to wonder, what does it take to really make a game good? The only real sure fire way to compete is to take an existing product that did well, analyze its failures and successes, and do the same thing. Idea piracy is not only a significant part of the business, but near required to stay afloat.
Lastly, the App Store has been blasted over and over again by its exclusivity clause. Basically, if you used Apple software to make your App, unless you get special clearance from Apple, you are being locked into selling your product exclusively on the App Store. Forget trying to change the routines and make it run on a desktop, and forget asking Apple to let you, you might as well come to the immediate realization that whatever you write that goes into the iPhone belongs to Apple.
But it isn’t all that bad, really. There has been people who make a tidy sum by their efforts in using the App Store. Surely Apple has done well by it, but the ability to take your App and port it to a different system is just another form of attaching yourself into another revenue stream.
Exposing new revenue streams should be a goal of any entrepreneur, and Rogue Pirate Ninja Interactive has been looking into providing extra content, such as its original sound track, an extended e-Manual, wallpaper, etc. as a supplementary digital download off such other distribution sites like Lulu.com. If it’s not the software that can be distributed through other means to generate more revenue, then the marketing potential for extra material can surely attract a few loyal customers, if not making a name for yourself to begin with. The goal of any business is to make money, and you have to have the revenue streams to provide a means to that end.
Overall though, in the game world, there is a war being waged. You either can employ the technological advantage or go the horde advantage. Given that most Indie developers out there simply don’t have the resources to employ a large development team to compete with the likes of the big names, the technological advantage really is a troublesome route to go in. Although even Indie games have a technological warfare side of them, the reality is that as more big name companies start to enter the iPhone market, marketing, branding, and rapid development are going to be crucial assets for any Indie game developer to leverage. Release fast, release often, or get into the technological warfare and spend 9 months making an App that can’t compete with the big name 3D point-and-click-adventures.
Of course, compared to some other games out there… iRis holds its candle pretty well. Others and myself, we all did a bang up job on it. Technical aspect we nailed. It’s the marketing aspect we’re struggling on now.
Lessons learned, moving on.
Best of luck.
A few crazy game ideas, Part I, and why are zombies so popular?
As a game developer I get into a lot of talk with others about what type of games we could make. A lot of fun discussions ensue, so this time around I am going to give ideas out to a zombie based game, and get crazy.
Just a note, when I say “get crazy”, that means this post is rated mature. Very mature. If you’re the stuck up kind, skip this one.
Idea 1:
Zombie upgrades. As you devour more you get more and more zombie abilities and can modify what kind of zombie you are and what you look like. Seriously cool shit can happen, like special abilities that allow you to rip heads off other people and make them into walking spiders that help you along. As you progress through the ranks, eventually you get powers that let you transform into a normal looking person, such as some hot chick, only to fool them in the end and bite their appendeges off. Since zombies don’t really date, the game would be MMO based and based entirely on competition to become the most powerful zombie, while at the same time avoiding being killed by anti-zombie squads. We’re talking some seriously epic gameplay here, complete with zombie task force missions and other AI generated battles, that way it feels like co-op play against an AI instead of just uncoordinated head-to-head. Damn that would require a lot of code and art work.
Idea 2:
This idea would never make it in the US, but what if we had a game that took place after Christ was resurrected (as a Zombie) and the nations had to go to war now to supress the religious radical zombie worshipers (who just happen to dribble… a lot…). I think the fact that you’re goal is to kill a superhero like Christ is the selling point by itself. No more game needed, have someone write a neat story line and done, excellent. Moving on.
Idea 3:
I like to think that we can extend RPG gameplay to the likes of a more somber tone. Instead of orcs, wizards, knights, and the likes, we need an RPG centered more on vampires, zombies, wraiths – basically the emo subculture. It would basically be WoW but for emos. The object of the game would be to die and gain soul points from dieing and performing rituals. You know what, this is scary just by the sounds of it. Somebody is going to do a jenga board in Lua and piss off all their religious parents and we’d be in a shit storm of trouble. Good PR though.
Idea 4:
Taking the normal idea of killing as many zombies as possible, what if the object here wasn’t so much killing the zombies, but rather an offshoot of a drug experiment to make uber soldiers? Like, soldiers that had some sort of chemical that could make others join their side? We’re talking SkyNet, but for Zombies. The entire game would be based on choosing the different sides involved, one of the crazy populus who use might, one of the technical minded folk who use technology to fight, and the zombie constituants who just want to build their nation by themselves. Well, needs some more polishing, but the idea is to have a triangle (because 3 sides (e.g. “Star Craft”, “Supreme Commander”) is better than 2 (“Command & Conqueror”, “Warcraft”)). At any rate, this may work better as 2 sides, but the idea is pretty cool. You tend to feel some compassion for the other side, but only to realize they feel none for you, so the war must go on. Bloody battles continue and the entire game is oriented around blood and violence and death and chaos. Won’t do good for female players, but males would dig that up fast.
Idea 5:
Speaking of female players, lets try to reorientate this and make more of a nuture game out of zombies… Let’s see here… Nuture… Zombies… Nuture…. Zombies…. Maybe something like a Sim-Zombie, where people have started making Zombie farms and zombies are used to power things or become a re-usable energy source of some kind. You know what, nothing about zombies has any appeal to any of this. There is no way zombies can be utilized for female players. Moving on.
Idea 6:
Zombie racing! That’s right folks, you too can pick your zombie and pick your competition and have a bunch of family fun, zombie style. It’s like “Mario Cart”, “Mario Party”, and “Mario Paint” all rolled up into a zombie-style adventure the whole family can enjoy. The entire game would just be one gigantic comedic relief parody of existing games, with a variety of mini-games that would sure to be more of a way to laugh and have fun, if you’re into the zombie sort of thing that is.
*sigh*
Well I’m out of ideas for now. Tune in next time.
Best of luck.
If there is a God, he isn’t a God, but a more advanced being, and what if it’s all “for the lulz”?
This is my first post on Atheism. For me, I tend to stay away talking from politics and religion in any professional context, well, simply because there aren’t enough people in the world that know how to respectfully debate an issue (guilty of not being that way myself every now and then), and wind up generating a lot of hostility, but screw it, it’s my blog, and I’ll do what I want. If you disagree give me a good argument in comment and if you dribble some stupid nonsense you’ll just get the ban hammer.
There is not a God. None. There isn’t any evidence supporting it. The Bible isn’t evidence -> using it to prove what it preaches is circular logic (e.g. I wrote a book about topic A, thus A must be true because I wrote this here book about A). I am a militant Astheist, not in a sense that I use it as a religion, but in the sense that I am not bound to any dogmatic beliefs, not bound to any ritual or code, and am free to define the world based on reason and empathy. I am bound only to evidence.
With that said, if there was a “God”, it would be an alien. It would be a higher advanced organism. It would of caused the big bang and all that jazz, and would sit around with a beer in one hand and watching the show unfold. We are but parts of an amusement ride, all done “for the lulz”. This higher being gives little shit about us. In fact, it’s more than likely that this higher being doesn’t even exist: no evidence to date has provided clear and convincing non-subjective test data, repeatable in a non-biased venue, subject to serious peer review, etc. that could lead one to really think anything out there existed to be such.
To be honest though, that is what is so liberating about life as an Atheist. There is no higher power at work who is going to deliver justice onto me if I do something “bad”. My morals need not be defined by some ancient code, but rather by the experiences of going through life and discovering “hey I didn’t like how that event made me feel, so I won’t cause others to have to experience that event at my doing”. Everything becomes possible all of a sudden, but only at the hand of effort. There is no self-absolvement of one from any and all responsibility through prayer, just cause and effect through action, and inaction.
But there is a double edge sword at work here: In the course of debate, one must be able to open their mind and say “If you make a logical argument, I will change my opinion, but if I make a logical argument, you must change your opinion”. This sword is the double edged blade of “I may be wrong”. Religious folk may start rejoicing and praise “Oh, maybe there is hope in this poor disillusioned soul yet!”, but if so, well, you failed the game. You see, religion teaches people to NOT question their beliefs. To NOT substantiate their beliefs with evidence. To BLINDLY give faith without due course of the establishment of trust. Religion really does require blind faith because blindless cannot exist where there is logic. As a militant Atheist, I am willing to change my opinion if evidence came to pass, but militant religious folk cannot claim the same. CANNOT CLAIM THE SAME. There is a fundamental difference at work here, and my double edged sword beats your narrow minded axe.
A few examples. If Adam and Eve had two boys, how did the procreation chain continue? One of them “got a wife”, but where the heck did this chick come from? Anybody with two cents to their mind know right well what would have had to happen: we’re all the descents of incest. We’re screwed from the get-go.
Of course, we all know that’s not how it really happened. We all can understand that natural evolution allowed us to build up complicated life to the point that there was always a mechanism for reproduction, at one point only requiring self. It is more beneficial to the gene’s search state to have male/female distinction, since information is increased by combining different settings, as opposed to staying static. Oh wait, I’m getting into punctuated equilibrium (honk if you understand that (*honk*)).
Another example. Why is accepted that a senior citizen, with no prior ship-building experience, built an ark while in walking distance of all animals of the planet? Then repopulated the planet afterwords. Well, not only are we descendant now from incest not once but twice, but then we had a serious case of gene pool chlorine. All that information gained was lost. How quaint.
Last example. So a guy dies from being nailed to a piece of wood by a bunch of religious nutcases and then comes back after being dead and says “Oh hai guyz! BRAINS!”? You have to understand something about zombies: If you don’t disconnect the brain stem from the rest of the body, the thing keeps going. Perhaps they didn’t get the memo. Well, no wonder religious folk dribble. Zombie worshiping folk tend to do that.
So in summation, people who think there is a God are disillusioned, if there is one he’s nastier than /b/ (and that’s on a good day), and to demand my servitude or be forever punished, well, I’m not a sheep headed for slaughter. Religion was great back before we understood the world around us, but science is here now. Time to adapt to the new world.
Best of luck.
OOP is the tradeoff I was looking for, and is it really no wonder some lack good design skills?
We’re back again for another installment of OOP wars, this time with your host, well, me.
This time around I am going to make a more solid case over OOP and why it has, in my particular instance, helped me accomplish my work. Again I stress that OOP is not the solution to everything, but when used in the right way for the right problem, it really does work wonders. Again I also stress that one can do OOP-related activities in procedural languages, but the job of the OOP work is delegated to the coders and not done automatically by the language.
I am going to try and provide examples relating procedural code (e.g. C) to OOP-ified code (e.g. ObjC/C++), sticking to languages that I have had the most experience in, and while discussing the trade off mechanisms involved.
The first example I want to examine is polymorphism, or the ability/mechanism one can utilize to call base methods in derived classes. This one is probably a cornerstone of OOP. In C++ this amounts to a class inheriting into another, in ObjC same thing, and in C this amounts to, in one particular kind of incarnation, a structure being a part of another structure (such as at the starting address). In C, so long as the memory passed into a routine is in the correct formating, byte offsetting, packing, etc. one may change raw data to look as any other raw data. This works, so long as the data is in-fact correctly intended – any error checking is delegated to the coder and if no error checking is ever made (even if disabled for release builds) then if “bad things happen” ™, well, too bad. Program does wierd things and you never know. In C++, one expects to find a similar outlay, except that classes always have a VTL pointer for the method listings, and dynamic invocation can fail and halt execution when “bad things happen” ™. While C++ has a VTL that is strictly for methods, ObjC goes a step further and instead has an isa pointer that tracks exactly what kind of class is at the memory location. This easy trick simply allows for immediate reflection and, thanks to the ObjC’s message passing interface, true run-time method invocation.
Another way to visualize a pseduo polymorphism trick, that I’ve employed in various degrees of usage, for an example is a 4×4 matrix having its rows (or columns) be treated as 4d vectors. Although not strictly polymorphism in a sense, one can see the layout as similar and build into this and just treat row/column data as 4d vectors, employing such data directly into vector routines and the likes. So long as there aren’t any isa or VTL pointers, this turns out really nicely.
Just briefly I want to make note that I have a multitude of reasons to prefer writing math and data structures in C over ObjC or C++, and a lot of this has to do with the environment being worked in and the APIs worked with. There are a few technical reasons why C++/ObjC is avoided here, but it has more to do with a much grander OOP layout that extends far beyond language barriers.
The second example I want to discuss is encapsulation. As I have previous mentioned in prior posting, encapsulation allows one to take complexity and contain it into something, to hide it away from other’s eyes, so that when a programmer is working along, they don’t need to know all the little details about how a particular routine works, just that it does work and work correctly. Encapsulation is beautiful like that because it allows other coders to reduce the amount of complexity being dealt with. How? Well, for example, if something “special” has to happen to set a value (such as a syncronization invalidation, an event spawn and handle, or some other wierd specialty logic), when utilizing said class all these particulars don’t need to be immediately known: all that matters is that the intention is satisfied. The underlying system is free to handle the request as it sees fit, which may amount to more than just something small.
Even between C, C++, and ObjC one can allow this encapsulation to happen anyways. One can write special routines to do these sorts of tasks, and make nasty notes in the documentation to always use that invocation. Well, here is where the slight difference starts to occur -> while most class design forces ideas of setters, getters, triers, etc., one can always tend to stray from the establishment and edit things manually. The fact that one works with data so directly as such tends to even encourage this (if a structure has a member called “count”, isn’t it nicer to just access it directly then through a function call?).
But here’s the difference… As a result of objectifying something, we can start to tend to only worry about functionality that is relevant to the data at hand. By correctly abstracting, one can eventually build up to a reduced set of routines that allows enough interaction with said data to accomplish meanigful things. While a stray speciality routine can come and play, OOP forces that special routine out of play and delegates it to a derived class (C++) or possibly an extension to said class (ObjC). Encapsulation, with correct means of abstraction, forces coders to worry about the routines that matter while providing a clear and crisp decarnation line against speciality code for speciality situations.
When writing OOP, one tends to think more clearly in terms of generalizations (thanks to the inheritance chain) and less in terms of what can be clustered together. This leads to more encapsulation, less hacks, and finer differentiation between logic groups.
The beautiful part here is that most procedural languages (again ones that allow you to pseudo-OOP anyways) can still do this exact same thing. The difference is that it does not provide nearly as fine a decarnation line.
The third example I would like to discuss is the “we’re already doing it for you” aspect of using OOP. Take for instance a variety of issues such as the following:
- I want to change one pointer and have a different set of routines be invocated.
- I want to dynamically figure out which routine to invocate based on certain conditions.
- I want to dynamically figure out which routines are even available to be invocated.
- I want to, without changing syntax, rewire routine calls to a different set of routine calls.
- I want to redefine a routine’s implementation when its using this structure over that structure.
For those who have the keen eye, they should already realize, “wait, OOP already does all of that”. Well, it does. The above factors are not only already present in C++ and ObjC (especially ObjC), but also are already tested, verified, and well established. While one can still do a lot of this in procedural terms, the burden of doing it is shifted onto the programmer.
With the ability to do dynamic testing of all sorts, the ability to fully reflect upon one’s being and look and test different parts of it for methods, etc. etc. there is a significant advantage to use what is already there. This helps saves mainteance costs, help saves time spend coding, and ultimately just works better. It’s basically akin to using a library already built to do exactly what you need – still kind of is the idea with ObjC (just link in -lobjc and viola, instant classes in C), and what C++ initially did before it made the jump to its own language.
Lastly, I want to break the train of thought here and now play the opposite field. Above I have compared a bit of doing things in different ways, but I have a pandora’s box here that I haven’t yet opened. One reality about entering the world of OOP is that new constructs are introduced. New ideas require explaining. New opportunities to screw up and “do it the wrong way” ™ thus result. One thing about OOP that I’ve come to notice over the years is that, like all things, it can be screwed up pretty badly. Add in the pandora’s box of human nature’s incredible stupidity (and I assure everybody I’m guilty on this too), well, when coders are forced to work with designs that were never intended to solve problems that come up without being able to change the design due to issues beyond one’s control, well, problems start to boil. It is in my humble opinion that the true purpose of OOP is not to provide just a solution, but a solution to a well defined problem. Problems occur when a design can’t change, or when a design doesn’t address the full problem, or when a design is just bad. OOP can solve a lot, but when utilized poorly, an even poorer solution can result. The reality of understanding any OOP based solution is to not understand the implementation’s details so much as understanding the underlying problem. When one takes the time to understand what problems were being solved, one starts to truly understand why the system was laid out a particular way.
When that problem domain changes, or wasn’t fully understood, well, that’s bad. OOP really is one of those things that are either done really right or really wrong, it’s no wonder so many hate working with it. C++ is especially nasty in that regard, but that’s another post.
Best of luck.
Leave a Comment