Archive for July, 2009
This story contains no information of interest to anyone what-so-ever.
But it annoyed me, so let me vent.
I was already over my time-estimate, and I had a bug. It was strange, the system was sending out two emails and one had an exclamation mark; just randomly right in the footer – But the other was fine. After staring at my code and deciding that there was nothing wrong I decided to view-source in the browser – Yup, email had an exclamation mark right in the middle.
But I wasn’t putting it in there, and the code to attach the footer to each email was exactly the same. However only one email was displaying an exclamation mark.
See this project was in .php on a linux server – I’m not a php guru, nor a linux expert – previous to last month I had written approximately 50 lines of php code, and I’ve run linux, well never.
So I was convinced it was my bug, something I’d done wrong, something about the php_mail() function that I didn’t know about – It didn’t help that the server hadn’t been patched since 2004 and was still running php 4.2 so I couldn’t use any of the email libraries that kept being recommended in my google searches and promised to make my life easier.
So I entered a new test order into the system, and I got my two emails – One with an exclamation mark and one without, but this time the exclamation mark had moved. My previous testing at always shown it in the same place.
Test and measure, it’s the scientific method.
So I try entering a new order, this time adding exactly 4 characters to the address on the order form. This time the exclamation mark has moved exactly 4 places to the left.
Ah ha, I’ve got something! – I thought to myself. The system was no longer random, no longer chaotic, I had something deterministic – I had no idea why but the length of the email was causing an exclamation mark to be inserted
I modified my code output the email to the browser before sending it to php_mail() – No exclamation mark, formating all correct, everything fine. But when I recieved the email – exclamation mark.
It turns out that sendmail inserts an exclamation mark into an email if it receives a string that is too long without a line break. Why? I have no idea.
Because I was sending HTML I wasn’t bothering to insert line breaks ‘\n’ into my string before passing it to php_mail() – Instead I was using <br>
So some programmer, somewhere at sometime working on sendmail decided that if a string was too long they would split it up by inserting an ! character – This is probably some strange legacy thing from eons ago before HTML was even invented.
And only one of the emails was inserting an exclamation mark because the other was under the threshold for the maximum length before sendmail inserts an exclamation mark.
So that’s a boring story about how I lost 4 hours of my life and one of the stupid reasons why software is often over budget and over schedule.
Reports are coming in that the games industry is not quite so recession resistant as previously thought. What we have been witnessing over the last 1-2 years is a nose dive in prices for downloadable games, the near disapearance of PC games from retail stores. And the re-release of lots of back catalog titles.
All of this is a good thing™
Games have been historically expensive, backwards compatability has always been a pain, and only being able to choose from the ‘top 40′ equivilent at your local store was hurting the medium as an art form.
All of this means the game has changed. Dramatically.
As someone with disposable income, there are alot of games out there for me to choose from. I’ve mentioned before that I’ve got way too many unplayed games on my shelf with not enough time to play them all.
And now with the low prices seen across the board for digital distribution from the likes of Steam, Big Fish Games, The iPhone App Store, Gamers Gate, Good Old Games, PSN and XBLA – For less than a take-away meal I can buy more than an entire weekends worth of entertainment.
The flip side to this is of course – How sustainable is this model for the developers of games?
The music industry got a shake-up in the early 2000′s and I have a feeling it’s going to be the games industries turn to have to re-think business and the way it turns ideas into products. And unfortunately, unlike the games industry, we can’t earn money by playing live shows. T-Shirts maybe, but live shows? Probably not.
I think we are going to see more small studios, making smaller-budget (and by small-budget, I don’t imply low-quality at all) niche titles. (ie. like the old days.)
And with niche titles, it’s all about the unique selling point.
If I have $10-$20 to spend, and a spare weekend, I need a reason to buy your game and not someone elses.
The irony here is that it’s not price that will be my deciding factor, it will be all the irrational fuzzy aspects of my personality which will lead to me making a purchasing decision – It might be interesting story, art style, maybe promote some message I agree with, invoke my sense of nostalga or capture my interest in some other way.
In any case, your game has to be in some way special.
Developers, indies in particular, have to think what their game stands for – what does it, I dare say – mean?
I’m taking a break from working on my game this month. Mainly because I’ve been terribly busy at the day job. But I got a nice raise this year – So that’s good.
I have been thinking about trying to port the engine to C#/Mono – If I can deploy it with the mono runtime and not require a seperate download I think it will be the way to go.
C++ is nice for what it’s good at, but I don’t think it’s a very good fit for my project. I’m far more efficent with the C# language and given that I program mostly in C# at work – If I can get a proof of concept hello world app out, it will help with the context switching overhead so I don’t have to reorganise my brain to remember how C++ does things.
I’ll also have to see if I can get Lua and SDL working with mono.
Of course, getting all these different libraries to work togeather might be more trouble than its worth.
(Oh, I guess that means I’m buying a mac)